This app provides RESTful API for "getir backend" app.
- Install node js (v14.16.0+)
- Run: git clone https://github.com/JSASHU/getir-backend.git
- Run: npm install
- Run: npm run start
- Run: npm run lint
- Run: npm run lint:fix
- Run: npm run test:unit
https://getir-backend-api.herokuapp.com/records
POST
Input | Type | Required |
---|---|---|
minCount | Number | Required |
maxCount | Number | Required |
startDate | Date String (YYYY-MM-DD) | Required |
endDate | Date String (YYYY-MM-DD) | Required |
-
“startDate” and “endDate” fields will filter the data by createdAt field.
-
Sum of the “count” array in the documents will be between “minCount” and “maxCount”.
{
"startDate": "2016-01-26",
"endDate": "2018-02-02",
"minCount": 2700,
"maxCount": 3000
}
{
"code": 0,
"msg": "Success.",
"records": [
{
"key": "ibfRLaFT",
"createdAt": "2016-12-25T16:43:27.909Z",
"totalCount": 2892
},
{
"key": "pxClAvll",
"createdAt": "2016-12-19T10:00:40.050Z",
"totalCount": 2772
},
{
"key": "XCiSazeS",
"createdAt": "2016-12-13T18:58:33.864Z",
"totalCount": 2906
}
]
}
{
"_id" : ObjectId("5ee1e209e07f053f990cea8c"),
"key" : "TAKwGc6Jr4i8Z487",
"createdAt" : ISODate("2017-01-28T01:22:14.398+0000"),
"counts" : [
NumberInt(150),
NumberInt(160)
],
"value" : "Getir Task"
},
{
"_id" : ObjectId("5ee1e8dee07f053f990ceaa1"),
"key" : "TAKwGc6Jr4i8Z487",
"createdAt" : ISODate("2017-01-28T01:22:14.398+0000"),
"counts" : [
NumberInt(170)
],
"value" : "Getir Task"
}