/user/new/ |
POST |
username Username of the new user. Must be uniquepassword Password of the new userfirstname First name of the new userlastname Last name of the new userfacebook_id Facebook ID of the user (if logging in with Facebook) [optional]picture URL to user picture. Can be blank, but the header is requiredphone Phone number of the new user
|
200 All OK. Returns new user object400 Invalid request409 Duplicates detected in conflicting fields. User not added
|
Response code 200 |
API key |
/user/new/ |
PUT |
username Username of the new usercode Confirmation code of the new user
|
200 All OK. User object sent as response204 User object not found. This would occur if this step is attempted before initializing the new user400 Invalid request401 Unauthorized. Confirmation codes did not match409 Duplicate fields found. This occurs when another user has signed up before the current user has completed his/her authentication process
|
firstname First name of the userlastname Last name of the userfacebook_id Facebook ID of the user (only appears if the user initially authenticated with Facebook)password Hashed password (for local authentication)username Username of the userphone Phone number of the userpicture URL of the user picturefriends Friend's user object of the current usercurrent_status Current status of the user
|
API key |
/user/picture/ |
GET |
username Username who's picture is to be retrieved
|
200 All OK. Returns correct object204 No user found corresponding to username. This could only occur if a search for a user picture is attempted before he/she registers400 Invalid request
|
username Username of the user who's picture is being returnedpicture URL to the user's picture
|
API key |
/user/exists/ |
GET |
username Username to be checked for availability
|
200 All OK. Request succcessful400 Invalid request
|
availability Boolean value. True if available, false if not
|
API key |
/user/exists/fb/ |
GET |
facebook_id Facebook ID of the person to be serached for in the database
|
200 All OK. Returns the user object of the corresponding person (if it exists)204 No user found for the corresponding ID400 Invalid request
|
firstname First name of the userlastname Last name of the userfacebook_id Facebook ID of the user (only appears if they registered with it)password Hashed password (for local authentication)username Username of the userphone Phone number of the userpicture URL of the user picturefriends Friend's user object of the current usercurrent_status Current status of the user
|
API key |
/user/login/ |
POST |
username Username of the person to be logged onpassword Password of the user
|
200 All OK. Returns user object204 Username not found on server400 Invalid request401 Unauthorized. Valid username, invalid password
|
firstname First name of the userlastname Last name of the userfacebook_id Facebook ID of the user (only appears if they registered with it)password Hashed password (for local authentication)username Username of the userphone Phone number of the userpicture URL of the user picturefriends Friend's user object of the current usercurrent_status Current status of the user
|
API key |
/user/login/encrypted/ |
POST |
username Username of the user to be logged onencrypted_password Encrypted password of the user to be logged on
|
200 All OK. Returns user object204 No user found for the corresponding username400 Invalid request401 Unauthorized. Valid username, invalid password
|
firstname First name of the userlastname Last name of the userfacebook_id Facebook ID of the user (only appears if the user initially authenticated with Facebook)password Hashed password (for local authentication)username Username of the userphone Phone number of the userpicture URL of the user picturefriends Friend's user object of the current usercurrent_status Current status of the user
|
API key |
/user/find_friends/ |
POST |
number_list Array of phone numbers to be searched for in the databaseusername Current username of the user (for validation)
|
200 All OK. Returns JSON array of user objects corresponding to list of phone numbers204 No user found that corresponds to the username. This would only be because the user has not yet registered with the application400 Invalid request500 Internal server error. Contact developer if this occurs
|
results Array of user objectsfirst_name First name of the userlast_name Last name of the userusername Username of the user
|
API key |
/user/invite/ |
POST |
username Username of the user making the requesttarget_phone Target phone number of the person to be invited to the application
|
200 All OK. Request sent successfully204 No user corresponding to the username found on the server400 Invalid request
|
|
API key |