To-Do List

Models

class pytm4srv.controllers.api.to_do_list.ToDoSection
items: list[ToDoItem]

List of items in this section, in descending order of priority.

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.

Endpoints

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.