X-Git-Url: https://git.ktnx.net/?a=blobdiff_plain;ds=sidebyside;f=doc%2Fprotocol.md;h=d70f595f1e14301ad9723c3b1ca6ff0d7d16e1a0;hb=3d86c18e79cfffaf61fe76a6a9bc1ea90b7b9416;hp=ae7bad53862528ed15f5a9343393953ee9c0c692;hpb=a50686a07cedc9ab0a800b4897757b24d593c444;p=lsl.git diff --git a/doc/protocol.md b/doc/protocol.md index ae7bad5..d70f595 100644 --- a/doc/protocol.md +++ b/doc/protocol.md @@ -14,8 +14,11 @@ GET /list Returns a JSON object with the following keys: - - `lists`: a list of shopping list URIs. Referred to as `/list/$list_id` - below. + - `lists`: a list of objects with the following keys: + - `uri`: the list URI. Referred to as `/list/$list_id` below. The part after + the last `/` (`$list_id`) is an integer that is unique among all shopping + lists + - `name`: list name as entered by users - `lists_version`: a number that is incremented by 1 each time the list of shopping lists changes. Changes include adding, removing and renaming a shopping list, but not changes to individual shopping list items. @@ -25,9 +28,10 @@ GET /list/$list_id Returns a JSON object with the following keys: - - `name`: list name, as entered by users - `items`: a list of shopping list item objects with keys: - - `uri`: the URI of the individual list item + - `uri`: the URI of the individual list item (refered to as + `/list/$list_id/$item_id` below. The part after the last `/` (`$list_id`) + is a positive integer that is unique amont the items in the shopping list. - `description`: item description - `done`: a boolean flag marking the item as done - `version`: a number that is incremented by 1 each time the list items