Corrections and deletes
How to change what the journal holds without leaving duplicates.
Replace by id
- To change an entry, call
log_foodwith itsidand the full new state. - Keep
itemIdon the items that stay. Items withoutitemIdare new. Stored items missing from the list are removed. - An omitted
timeis cleared.dateandtimeZonedefault to the stored ones. save_foodandlog_weightreplace by id the same way.- Use a new
requestIdfor a correction. Reuse arequestIdonly to retry the same call.
Common corrections
- "Actually it was a medium latte" replaces that one item and keeps the other items with their
itemId. - "Those are not nuggets, that is a McChicken" replaces the wrong item.
- "No, it was all yesterday" moves the entries you just logged. Replace each one by id with the new date.
- "Did you log the chips?" asks you to check. Read the journal and answer from what it returns.
Deletes
- To remove one item, send the entry with the remaining items.
- To remove a whole entry, call
deletewith itsentry_…id. - "Remove the jerky, also add 20g soy sauce" is one
deleteand onelog_food.