To-Do List
- GET /api/todo/
Get the list of current to-do items.
The result is cached for 1 minute (per-locale and per-timezone) and will be returned until it expires.
- Query Parameters:
refresh (int) – set to
1
to bypass the internal cache and recompute the list. The result will still be added to the cache and returned for future requests without this parameter set.
- Returns:
a list of to-do sections in descending order of priority.
- class pytm4srv.controllers.api.to_do_list.ToDoSection
-
- key: str
Unique key of this section. Constant for this type of section.
- scheduled: bool = False
True if items in this list are predicted.
- title: str
User-facing section title.
- class pytm4srv.controllers.api.to_do_list.ToDoItem
- actions: dict[str, str]
Action buttons to offer for this item. Keys are labels and values are the same as Alert actions.
To-do items can only have client actions and URLs (no server actions) at this time.
- data: dict[str, Any]
Additional data fields that may be needed for certain actions.
- message: str
Item body (HTML).
- title: str
User-facing item title.