-
Notifications
You must be signed in to change notification settings - Fork 0
Directions
Vadim Sokoltsov edited this page Nov 13, 2016
·
4 revisions
Return list of user's directions
-
user_id- type:integer- id or nickname of user
-
id- type:integer- id of direction -
title- type:string- Name of direction -
description- type:text- Direction's description -
percents_result- type:float- relation between finished and unfinished steps for direction
"directions": [
{
"id": 1600,
"title": "Another direction",
"description": "Description for this direction",
"percents_result": null
},
{
"id": 329,
"title": "Rails 41",
"description": "Rails 4 description",
"percents_result": 0
},
{
"id": 325,
"title": "adaw",
"description": "awdawd",
"percents_result": 0
},
...
]Return detailed direction information
-
user_id- type:integer- id or nickname of user -
id- type:integer- id or slug of direction
-
id- type:integer- id of direction -
title- type:string- name of direction -
description- type:text- direction's description -
percents_result- type:float- relation between finished and unfinished steps for direction -
steps- type:array- list of directions steps -
user- type:json- user information object -
user.attachment- type:json- user avatar information
{
"direction": {
"id": 1600,
"title": "Another direction",
"description": "Description for this direction",
"percents_result": null,
"steps": [],
"user": {
"id": 22,
"nick": "vforvad",
"first_name": "Vadim",
"last_name": "Sokoltsov",
"description": "Software Engineer",
"location": "Saint-Petersburg",
"attachment": null
}
}
}
}Creates new direction
-
title- type:string- name of direction -
description- type:text- direction's description
-
id- type:integer- id of direction -
title- type:string- name of direction -
description- type:text- direction's description -
percents_result- type:float- relation between finished and unfinished steps for direction -
steps- type:array- list of directions steps -
user- type:json- user information object -
user.attachment- type:json- user avatar information
- title -
can't be blank - description -
can't be blank
{
"direction": {
"title": "New direction",
"description": "New direction description"
}
}{
"direction": {
"id": 1601,
"title": "New direction",
"description": "New direction description",
"percents_result": null,
"steps": [],
"user": {
"id": 1063,
"nick": "ololosh",
"first_name": null,
"last_name": null,
"description": null,
"location": null
}
}
}{
"errors": {
"title": [
"can't be blank"
],
"description": [
"can't be blank"
]
}
}Update directions information
-
title- type:string- name of direction -
description- type:text- direction's description
-
id- type:integer- id of direction -
title- type:string- name of direction -
description- type:text- direction's description -
percents_result- type:float- relation between finished and unfinished steps for direction -
steps- type:array- list of directions steps -
user- type:json- user information object -
user.attachment- type:json- user avatar information
- title -
can't be blank - description -
can't be blank
{
"direction": {
"title": "New direction",
"description": "New direction description"
}
}{
"direction": {
"id": 1601,
"title": "New direction",
"description": "New direction description",
"percents_result": null,
"steps": [],
"user": {
"id": 1063,
"nick": "ololosh",
"first_name": null,
"last_name": null,
"description": null,
"location": null
}
}
}{
"errors": {
"title": [
"can't be blank"
],
"description": [
"can't be blank"
]
}
}