X-Git-Url: https://git.ktnx.net/?a=blobdiff_plain;f=doc%2Fprotocol.md;h=7d5de4e880d5364bdd5a990c4d38dde35e94606c;hb=446f81036c7082123098d6afe641c5a149deac25;hp=d70f595f1e14301ad9723c3b1ca6ff0d7d16e1a0;hpb=73020ec0d31c70350ef13067a60f8d2b0554d03a;p=lsl.git diff --git a/doc/protocol.md b/doc/protocol.md index d70f595..7d5de4e 100644 --- a/doc/protocol.md +++ b/doc/protocol.md @@ -72,7 +72,7 @@ Modifies a list. Request body is a JSON object with the following keys: Successful (HTTP status 200) response is a JSON object with the following keys: - - `version`: the curre version of the list + - `version`: the current version of the list - `lists_version`: the new version of the list of lists Possible error responses: @@ -132,3 +132,14 @@ Possible error responses: the differences to the user and either cancel the request and keep the newly fetched data as current, or re-submit the change using the fresh version number. + +DELETE /list/$list_id/$item_id +------------------------------ + +Deletes a list item. No request body. Always succeeds, even if the list item +doesn't exist server-side, in which case the `list_version` isn't changed. + +Returns JSON object with the following keys: + + - `list_version`: the new version of the shopping list whose item was deleted. + - `lists_version`: the current version of the list of shopping lists