Users¶
User authorization handled by tokens
User information¶
/users/{user_id}/
method | GET |
Auth | NO |
Parameters
Parameter | Type | Description |
---|---|---|
user_id | integer | User’s ID |
Response
Parameter | Type | Description |
---|---|---|
id | integer | User Id |
name | string | Use name |
family_name | string | Family name |
about | string | About yourself |
phone | string | Phone |
points_total | integer | Total amount of points |
tasks_total | integer | Total amount of tasks |
votes_total | integer | Total amount of votes |
date | timestamp | Registration date |
birthday | timestamp | User’s birthday date |
sex | string | male/female |
avatar | string | Link to user avatar |
skills | array | User skills |
places | array | User places |
{
"status": "ok",
"response":
{
"id": 4,
"name": "Ivan",
"family_name": "Sidorov"
"places": [
{
"lat": 55.33,
"lng": 33.3,
"address": "Moscow, Lenina 1"
}
],
"skills": [ 1, 6, 18 ]
}
}
HATEOAS
/points/?user_id={user_id} | User’s points |
/skills/?user_id={user_id} | User’s skills |
New user¶
/users/{user_id}/
method | POST |
Auth | YES |
Input user
Parameter | Required | Type | Description |
---|---|---|---|
name | string | Use name | |
string | |||
family_name | string | Family name | |
about | string | About yourself | |
phone | string | Phone | |
birthday | timestamp | User’s birthday date | |
sex | string | male/female | |
avatar | string | Link to user avatar | |
invitation | string | Invitation |
Parameters
Parameter | Type | Description |
---|---|---|
user_id | integer | User’s ID |
Response
Parameter | Type | Description |
---|---|---|
id | integer | Id newly added user |
Edit user¶
/users/{user_id}/
method | PUT |
Auth | YES |
Parameters
Parameter | Type | Description |
---|---|---|
user_id | integer | User’s ID |
Input vars
Parameter | Type | Description |
---|---|---|
Look user-information |
Response
Parameter | Type | Description |
---|---|---|
result | 1 |
Remove user¶
/users/{user_id}/
method | DELETE |
Auth | YES |
Parameters
Parameter | Type | Description |
---|---|---|
user_id | integer | User’s ID |
Response
Parameter | Type | Description |
---|---|---|
result | 1 |
User favourite places¶
Coming soon...
User adds favourite place¶
Coming soon...