-
Notifications
You must be signed in to change notification settings - Fork 0
Steps
Vadim Sokoltsov edited this page Jan 3, 2017
·
2 revisions
Create new step for direction
-
user_id- type:integer- id or nickname of user -
id- type:integer- id or slug of direction -
title- type:string- name of step -
description- type:text- step's description
-
id- type:integer- id or slug of direction -
title- type:string- name of direction -
description- type:text- direction's description -
is_done- type:boolean- flag shows us is the step completed or not -
direction_id- type:integer- id of related direction -
direction- type:json- object of related direction
- title -
can't be blank - description -
can't be blank
{
"step": {
"title": "New direction",
"description": "New direction description"
}
}{
"step": {
"id": 2056,
"title": "New direction",
"description": "New direction description",
"is_done": null,
"direction_id": 1602,
"direction": {
"id": 1602,
"title": "New direction",
"description": "New direction description",
"percents_result": 0,
"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
-
direction_id- type:integer- id or slug of direction -
id- type:integer- id of step -
title- type:string- name of step -
description- type:text- step's description
-
id- type:integer- id or slug of direction -
title- type:string- name of direction -
description- type:text- direction's description -
is_done- type:boolean- flag shows us is the step completed or not -
direction_id- type:integer- id of related direction -
direction- type:json- object of related direction
- title -
can't be blank - description -
can't be blank
{
"step": {
"title": "New direction",
"description": "New direction description"
}
}{
"step": {
"id": 2056,
"title": "New direction",
"description": "New direction description",
"is_done": null,
"direction_id": 1602,
"direction": {
"id": 1602,
"title": "New direction",
"description": "New direction description",
"percents_result": 0,
"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"
]
}
}Delete directions step
-
user_id- type:integer- id or nickname of user -
direction_id- type:integer- id or slug of direction -
id- type:integer- id of step
-
id- type:integer- id or slug of direction -
title- type:string- name of direction -
description- type:text- direction's description -
is_done- type:boolean- flag shows us is the step completed or not -
direction_id- type:integer- id of related direction -
direction- type:json- object of related direction
{
"step": {
"id": 2056,
"title": "New direction",
"description": "New direction description",
"is_done": null,
"direction_id": 1602,
"direction": {
"id": 1602,
"title": "New direction",
"description": "New direction description",
"percents_result": 0,
"steps": [
{
"id": 2055,
"title": "New direction",
"description": "New direction description",
"is_done": null,
"direction_id": 1602
}
],
"user": {
"id": 1063,
"nick": "ololosh",
"first_name": null,
"last_name": null,
"description": null,
"location": null
}
}
}
}