1 Lazy Shopping List protocol
2 ===========================
7 Returns a JSON object with the following keys:
9 - `lists`: URI for the list of shopping lists available. Referred to as
15 Returns a JSON object with the following keys:
17 - `lists`: a list of shopping list URIs. Referred to as `/list/$list_id`
19 - `lists_version`: a number that is incremented by 1 each time the list of
20 shopping lists changes. Changes include adding, removing and renaming a
21 shopping list, but not changes to individual shopping list items.
26 Returns a JSON object with the following keys:
28 - `name`: list name, as entered by users
29 - `items`: a list of shopping list item objects with keys:
30 - `uri`: the URI of the individual list item
31 - `description`: item description
32 - `done`: a boolean flag marking the item as done
33 - `version`: a number that is incremented by 1 each time the list items
34 change. Changes include adding, removing, renaming and marking a shopping
35 list item as done or pending.
36 - `lists_version`: the current version of the list of shopping lists
38 GET /list/$list_id/$item_id
39 ---------------------------
41 Returns a JSON object with the following keys:
43 - `description`: the description of the shopping list item
44 - `done`: a boolean flag marking the item as done
45 - `list_version`: the current version of the list
46 - `lists_version`: the current version of the list of shopping lists
51 Creates a new list. Request body is a JSON object with the following keys:
53 - `name`: list name as entered by the user
55 Response is a JSON object with the following keys:
57 - `uri`: the URI of the list (`/list/$list_id`)
58 - `version`: the initial version of the list
59 - `lists_version`: the version of the list of lists
64 Modifies a list. Request body is a JSON object with the following keys:
66 - `name`: new list name
67 - `version`: current list version as known by the client
69 Successful (HTTP status 200) response is a JSON object with the following keys:
71 - `version`: the curre version of the list
72 - `lists_version`: the new version of the list of lists
74 Possible error responses:
76 - HTTP status 409 (conflict): the list has been modified
77 Suggested client action is to fetch a fresh copy of the list data, present
78 the differences to the user and either cancel the request and keep the newly
79 fetched data as current, or re-submit the change using the fresh version
85 Deletes the list. No request body. Always succeeds, even if the list doesn't
86 exist server-side, in which case the `lists_version` isn't changed.
88 Returns JSON object with the following keys:
90 - `lists_version`: the new version of the list of lists.