-
Notifications
You must be signed in to change notification settings - Fork 0
Web APIs
Tao Peter Wang edited this page Aug 18, 2016
·
6 revisions
- Shut down MiddRides server completely
- Method: POST
- Parameters (x-www-form-urlencoded):
-
password: admin password for MiddRides server, ask Peter Wang (taow@middlebury.edu) for more information
-
- Response:
-
error-String: error if any -
status-boolean: server running status,falseif shutdown success
-
- Turn MiddRides server on
- Method: POST
- Parameters (x-www-form-urlencoded):
-
password: admin password for MiddRides server
-
- Response:
-
error-String: error if any -
status-boolean: server running status,trueif turn-on success
-
- Enter dispatcher login page
- Method: GET
- Parameters: N/A
- Response: [HTML]
- Enter dispatcher home page, with all the stops and live information
- Method: GET
- Parameters:
-
password: admin password for MiddRides server
-
- Response: [HTML]
- Tell server to send fcm messages to all users waiting at certain stop
- Method: POST
- Parameters (json):
-
stopId: MongoDB formatted objectId for the stop to be notified
-
- Response:
-
error-String(optional): error if any
-
- Replace old stops in database with new ones
- Method: POST
- Parameters (x-www-form-urlencoded):
-
password: admin password for MiddRides server [{ $stopName: $_id }, ...]
-
- Response:
-
error-String: error if any -
inserted-Number: number of stops inserted into database
-
- Get number of people waiting at each stops
- Method: GET
- Parameters: N/A (So I decided that this API should be open for any creepy stalker to use)
- Response:
[{ $stopId: $_id, numWaiting: x }, ...]