Change a list
edit_listChanges a list that already exists, all of it in one call. list sets the list's own title, display unit, trip dates and trail (only the fields given; an empty string clears a date or the trail). folders renames, reorders, reclassifies or removes folders, named by id or current name; removing one removes its rows. add puts new rows on, into a folder by name (made when missing) or under a group by the parent row's id. update changes rows by the ids get_list gives: any field, null clearing one that can be cleared; a new folder, place or group; a catalog_id to link or relink the row where it sits, null to unlink. remove takes rows off by id, a group's nested rows with it. The parts apply in that order as one change, and nothing is applied unless every part is valid: a row or folder named that isn't there fails the whole call. A name or weight changed on a catalog-linked row is kept as the owner's own. Takes the list's edit link, or its share code under a signed-in account that has filed it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| add | No | New rows. Each may name its folder, or the group to join. | |
| list | No | The list's own fields. Only the fields given change. | |
| again | No | A call with rows to add that is identical to one made in the last ten minutes is taken as a retry and does nothing: the earlier result comes back with repeated set. Pass true to make the same change a second time on purpose. | |
| remove | No | Ids of rows to take off, from get_list. | |
| update | No | Changes to rows that exist, each by id. | |
| folders | No | Changes to folders that exist. | |
| edit_link | No | The list's edit link, whole (mahonia.app/e/CODE#token). The part after # is the write capability. Leave it out to name a list filed under the signed-in account by share_code instead. | |
| share_code | No | Instead of the edit link: the share code or share link of a list filed under the connector's account, as get_list with no share_code gives it. Takes a sign-in with read-and-change access, and reaches only the lists that account has filed. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| unit | Yes | The unit the list displays in. Weights are in grams regardless. | |
| added | Yes | Rows added, nested ones counted. | |
| dates | Yes | ||
| title | Yes | User text. | |
| trail | Yes | ||
| totals | Yes | Whole grams, summed over every row of the list. | |
| folders | Yes | Every folder's name, in the list's order, after the change. | |
| removed | Yes | Rows taken off: by remove, with a removed group, or with a removed folder. | |
| updated | Yes | Rows changed, moved or regrouped. | |
| repeated | Yes | True when this call, with rows to add, repeated one made in the last ten minutes: nothing was done again, and the figures are that call's. Pass again: true to do it a second time. | |
| share_link | Yes | ||
| folders_made | Yes | Folders that didn't exist and were made for rows named into them. | |
| folders_changed | Yes | Folders renamed, reordered, reclassified or removed. |