-
Notifications
You must be signed in to change notification settings - Fork 0
Mobile APIs
Tao Peter Wang edited this page Oct 2, 2016
·
3 revisions
- Validates and logs user in
- Method: POST
- Parameters (x-www-form-urlencoded):
-
email: user email -
password: user password (encoded)
-
- Response:
-
error-String: error if any -
user-
email-String: user email -
verified-boolean: whether the user has verified his/her email
-
-
- Registers user
- Method: POST
- Parameters (x-www-form-urlencoded):
-
email: user email -
password: user password (encoded)
-
- Response:
-
error-String: error if any -
user-
email-String: user email -
verified-boolean: whether the user has verified his/her email
-
-
- Synchronize local user with server
- Method: GET
- Parameters:
-
email: user email -
password: user password (encoded)
-
- Response:
-
error-String(optional): error if any -
email-String: user email -
verified-boolean: whether user is verified
-
- Change password
- Method: POST
- Parameters (x-www-form-urlencoded):
-
email: user email -
oldPassword: old password -
newPassword: new password
-
- Response:
-
error-String: error if any,nullmeans change password success
-
- Tell server to re-send verification email
- Method: GET
- Parameters (x-www-form-urlencoded):
-
email: user email -
password: user password (encoded)
-
- Response:
-
error: error if any,nullmeans send success
-
- Synchronize local version of stops with server's
- Method: GET
- Parameters:
-
lastUpdated: last updated time in milliseconds
-
- Response:
[{ name: $stopName, stopId: $stopID }, ...]
- Make request for pick up
- Method: POST
- Parameters:
-
email: user email -
password: user password (encoded) -
stopId: MongoDB formatted objectId for the stop requested
-
- Response:
-
error-String: error if any,nullmeans request success
-
- Cancel pending request
- Method: POST
- Parameters:
-
email: user email -
password: user password (encoded) -
stopId: MongoDB formatted objectId for the stop of the cancelled request
-
- Response:
-
error-String: error if any,nullmeans cancel success
-