Paul Liverman III 5 years ago
parent
commit
87cf00673c
1 changed files with 45 additions and 0 deletions
  1. 45
    0
      api notes

+ 45
- 0
api notes View File

@@ -0,0 +1,45 @@
1
+/random/:id ?
2
+- id specified for random is currently undefined, but will be used to get a random from a list id/name
3
+
4
+/list/:page
5
+- id specified for list is currently undefined, but will be used to get via list ids/names
6
+
7
+---- new stuff to do with multiple lists:
8
+
9
+lists {
10
+  id: serial
11
+  user_id: user this belongs to!
12
+  parent_id: another list, optional
13
+  name: when generated, make a slug, if slug is not unique, append a number and try again (incrementing number until a new unique slug is found)
14
+  slug: based on name, uniqueness required (enforced behind the scenes by name, unless explicitly given (in which case, must meet constraints and not exist already))
15
+  timestamp
16
+}
17
+
18
+tasks -> {
19
+  list_id: optional foreign key
20
+  parent_id: optional foreign key (to a task!)
21
+}
22
+
23
+
24
+/new -> option to add list_id or parent_id or parent_content or list_name
25
+/edit -> option to add / remove same things
26
+/list -> option to only select from same things
27
+         - deprecate /list and use /get for its options!
28
+/random -> option to only select from same things
29
+/get -> option to get from list / parent via id/content/name
30
+
31
+/list/new/:name -> create a list
32
+/list/get/:nameORslugORid -> get a list
33
+/list/do/:nameORslugORid -> mark everything on a list done (alternately, lists themselves can have seperate done values!!)
34
+/list/undo/:nameORslugORid ->
35
+/list/edit/:nameORslugORid ->
36
+/list/delete/:nameORslugORid -> all tasks are deleted or are removed from list to either its parent, or no list (depending on options sent)
37
+
38
+/list/parent -> get parent list
39
+/list/children -> get children lists
40
+
41
+/parent -> get parent task
42
+/children -> get children tasks
43
+
44
+
45
+/list(/:id_or_slug)(/:page) --- ?