-
Notifications
You must be signed in to change notification settings - Fork 4
Settings Page
siddharthakonakanchi edited this page Dec 5, 2017
·
5 revisions
Settings page enables user to modify the details like Email address, Name, Date of Birth , Location and Hometown
This Page contains two API calls in which one API called is made whenever the /settings pages is loaded here we have an AJAX call that populates the logged in user details from he database . We have another API call which takes the newly enterd field in the text box upon update click in the edit link.
/updateDataupdateData
POST
| Key | Description | Type | Required |
|---|---|---|---|
| New Value | Newly entered value corresponding to the edit feild | String | Yes |
Status codes: 200,400,501
Example:
code: 200 OK
##Table Name: users
| Key | Description | Type | Required |
|---|---|---|---|
| name | User Name | String | Yes |
| Email ID of the user | String | Yes | |
| location | Current location of the user | String | No |
| hometown | Hometown of the user | String | No |
| language | Language preferences | String | Yes |
| birthday | Date of birth of user | String | Yes |
| gender | Gender of user | String | No |
| bio | Short biography about the user | String | No |
| password | Encrypted password | String | Yes |
/getUser
GET
| Key | Description | Type | Required |
|---|---|---|---|
| userid | Four digit unique id generated for each user | String | Yes |
| Password | New Password | String | Yes |
This API is used to fetch all the details of the user through a 4 digit unique id of the user. This API is called before page loading of the settings through AJAX
Status codes: 200,400,501
Example:
code: 200 OK
##Table Name: users
| Key | Description | Type | Required |
|---|---|---|---|
| name | User Name | String | Yes |
| Email ID of the user | String | Yes | |
| location | Current location of the user | String | No |
| hometown | Hometown of the user | String | No |
| language | Language preferences | String | Yes |
| birthday | Date of birth of user | String | Yes |
| gender | Gender of user | String | No |
| bio | Short biography about the user | String | No |
| password | Encrypted password | String | Yes |