Last active
August 6, 2018 16:32
-
-
Save ivan-hilckov/bb7f64f15e32c5c8823124ce4467d734 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // моожет быть либо id либо layer_id | |
| // id может быть {'layer_id': 2} или {'label_id': 2} | |
| // сунуть первым в лейбл с -- top_id (всегда int) - label_id; либо null (или вообще не приходит) - чтобы сунуть в корень на самый верх | |
| // left_id может быть {'layer_id': 2} или {'label_id': 2} - узел с left_id будет НАД узлом с передаваемым id | |
| // rename | |
| /api/labels/5/ PATCH {'id': 1, 'name': 'NEW NAME AHAHA'} // новое имя | |
| //move | |
| /api/labels/5/ PUT {'id': {'layer_id': 2}, 'top_id': 3} | |
| /api/labels/5/ PUT {'id': {'layer_id': 4}, 'top_id': null} | |
| /api/labels/5/ PUT {'id': {'layer_id': 4}, 'left_id': {'layer_id': 3}} | |
| что куда | |
| // create | |
| /api/labels/5/ POST {'left_id': {'layer_id': 3}, 'name': 'NEW NAME'} | |
| //remove | |
| /api/labels/5/ POST {'delete_id': 1} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment