Name: btr-api
Owner: Laboratório Analytics
Description: Server for the Melhor busão app
Created: 2017-05-19 20:09:03.0
Updated: 2017-12-21 18:53:30.0
Pushed: 2017-12-21 19:09:02.0
Size: 29192
Language: Python
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Best Trip Recommender API (BTR API) is a Web Service which exposes the Best Trip Recommender (BTR) features to applications.
One of the features of BTR is the prediction of bus trips duration. The input is the user trip origin, destination, date and time. In order to retrieve predictions from the API, applications must send a POST request to the server, in the format specified below:
| Field | Specification | | ——– | ——– | | Endpoint | /btr_routes_plans | | Method | POST | | Content Type | application/json | | Returned Value | A JSON formated string containing the suggested itineraries with their predicted duration. |
| Argument | Description | | ——– | ——– | | fromPlace | comma separated string with latitude and longitude | | toPlace | comma separated string with latitude and longitude | | mode | “TRANSIT,WALK” | | date | string using the format ?mm/dd/YYYY? | | time | string using the format ?HH:MM:SS? |
rl -X POST \
tp://<host:port>/btr_routes_plans \
'cache-control: no-cache' \
'content-type: application/json' \
'{
romPlace": "-25.39211,-49.22613",
oPlace": "-25.45102,-49.28381",
ode": "TRANSIT,WALK",
ate": "04/06/2017",
ime": "17:20:00"
Click here.