caldav_tasks_api.utils package¶
Submodules¶
caldav_tasks_api.utils.data module¶
- class caldav_tasks_api.utils.data.TaskData(attachments: 'list[str]' = <factory>, completed: 'bool' = False, changed_at: 'str' = '', created_at: 'str' = '', deleted: 'bool' = False, due_date: 'str' = '', list_uid: 'str' = '', description: 'str' = '', notified: 'bool' = False, parent: 'str' = '', percent_complete: 'int' = 0, priority: 'int' = 0, rrule: 'str' = '', start_date: 'str' = '', synced: 'bool' = False, tags: 'list[str]' = <factory>, summary: 'str' = '', trash: 'bool' = False, uid: 'str' = '', x_properties: 'XProperties' = <factory>, _api_reference: "Optional['TasksAPI']" = None)[source]¶
Bases:
object- static from_ical(ical: str | bytes, list_uid: str) TaskData[source]¶
Build TaskData from a VTODO iCal string.
- delete() bool[source]¶
Deletes this task from the server using the API reference.
- Returns:
True if deletion was successful, False otherwise.
- Raises:
RuntimeError – If no API reference is available.
PermissionError – If the API is in read-only mode.
ValueError – If the task list or task is not found.
- attachments: list[str]¶
- changed_at: str = ''¶
- property child_tasks: list[TaskData]¶
Returns a list of child TaskData objects, if this task has children and an API reference to search for them. Searches for tasks whose ‘parent’ field matches this task’s UID.
- completed: bool = False¶
- created_at: str = ''¶
- deleted: bool = False¶
- description: str = ''¶
- due_date: str = ''¶
- list_uid: str = ''¶
- notified: bool = False¶
- parent: str = ''¶
- property parent_task: TaskData | None¶
Returns the parent TaskData object, if this task has a parent UID and an API reference to search for it.
- percent_complete: int = 0¶
- priority: int = 0¶
- rrule: str = ''¶
- start_date: str = ''¶
- summary: str = ''¶
- synced: bool = False¶
- tags: list[str]¶
- trash: bool = False¶
- uid: str = ''¶
- x_properties: XProperties¶
- class caldav_tasks_api.utils.data.TaskListData(color: 'str' = '', deleted: 'bool' = False, name: 'str' = '', synced: 'bool' = False, uid: 'str' = '', tasks: 'list[TaskData]' = <factory>)[source]¶
Bases:
object- color: str = ''¶
- deleted: bool = False¶
- name: str = ''¶
- synced: bool = False¶
- uid: str = ''¶