Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/henriquecarv/netlolo-challenge
Netlolo developer challenge
https://github.com/henriquecarv/netlolo-challenge
api book express henriquecarv mocha netlolo nodejs offers
Last synced: 10 days ago
JSON representation
Netlolo developer challenge
- Host: GitHub
- URL: https://github.com/henriquecarv/netlolo-challenge
- Owner: henriquecarv
- License: mit
- Created: 2018-08-23T17:58:46.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-11T19:47:09.000Z (almost 2 years ago)
- Last Synced: 2023-03-02T10:45:55.525Z (over 1 year ago)
- Topics: api, book, express, henriquecarv, mocha, netlolo, nodejs, offers
- Language: JavaScript
- Homepage:
- Size: 177 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Netlolo developer challenge
[![LICENSE](https://img.shields.io/github/license/henriquecarv/netlolo-challenge.svg)](./LICENSE)
[![Dependabot Status](https://api.dependabot.com/badges/status?host=github&repo=henriquecarv/netlolo-challenge)](https://dependabot.com)## User Story
A customer needs to search in a orderbook. He wants to buy offers below some price, and also sell offers to earn some money.
Returns json data about offers, based on one or more specific amounts. These results can also be sorted in ascending or descending order with an optional parameter.
## System Requirements
* **[NodeJS](https://nodejs.org/en/)** (version >= 8).## Installing
* ```npm install```## Running Application
* ```npm start```## Running UnitTest
* ```npm test```### Examples
* **URL**
/offer/:amounts/:sort?* **URL Params**
**Required:**
`amounts=[float]`**Optional:**
`sort=[string]`
* **Sample Calls:**
```javascript
$.ajax({
url: "/offer/80000/desc",
dataType: "json",
type : "GET",
success : function(r) {
console.log(r);
}
});
```
http://localhost:3000/offer/80000/desc```javascript
$.ajax({
url: "/offer/30000,20000/asc",
dataType: "json",
type : "GET",
success : function(r) {
console.log(r);
}
});
```
http://localhost:3000/offer/30000,20000/asc