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`: tjhe list URIs. Referred to as `/list/$list_id` below.
+ - `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.
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
- `description`: item description
{ order_by => { -asc => 'name' } } )->all
)
{
- push @{ $r{lists} }, uri_for( "/list/" . $list->id );
+ push @{ $r{lists} },
+ { uri => uri_for( "/list/" . $list->id ), name => $list->name };
}
$dbh->txn_commit;