feat(tasks): add recurrency, rrule, reminder fields to get_tasks (v0.9.0)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-17 09:02:44 +02:00
parent af2cfc8728
commit 6d9f358e76
5 changed files with 54 additions and 7 deletions
+1 -1
View File
@@ -1 +1 @@
__version__ = "0.8.3"
__version__ = "0.9.0"
+47
View File
@@ -398,6 +398,7 @@ def get_tasks(list_id: str, only_open: bool = True):
_fw_debug = os.environ.get("FW_DEBUG") == "1"
_known_fields = {
# output fields
"metaId",
"text",
"description",
@@ -406,6 +407,34 @@ def get_tasks(list_id: str, only_open: bool = True):
"dueDate",
"assigneeIds",
"taskListId",
# recurrency fields
"recurrency",
"recurrencyInterval",
"rrule",
"byDay",
"recurrencyDeletedOccurence",
"reminder",
# always-present housekeeping fields
"moodStarShortcut",
"bestMoment",
"lastAction",
"lastActionAuthor",
"lastActionDate",
"categories",
"moodMap",
"sortingIndex",
"comments",
"editable",
"creationDate",
"completedDate",
"familyId",
"toAll",
"accountId",
"medias",
"modifDate",
"assignee",
"taskId",
"clientOpId",
}
result = []
@@ -425,6 +454,20 @@ def get_tasks(list_id: str, only_open: bool = True):
file=sys.stderr,
)
raw_recurrency = task.get("recurrency")
raw_interval = task.get("recurrencyInterval")
recurrency_interval = int(raw_interval) if raw_interval is not None else None
raw_reminder = task.get("reminder")
if raw_reminder and isinstance(raw_reminder, dict):
raw_val = raw_reminder.get("value")
reminder = {
"unit": raw_reminder.get("unit"),
"value": int(raw_val) if raw_val is not None else None,
}
else:
reminder = None
result.append(
{
"id": task.get("metaId"),
@@ -434,6 +477,10 @@ def get_tasks(list_id: str, only_open: bool = True):
"category_id": task.get("taskCategoryId"),
"due_date": task.get("dueDate"),
"assignee_ids": task.get("assigneeIds") or [],
"recurrency": raw_recurrency,
"recurrency_interval": recurrency_interval,
"rrule": task.get("rrule"),
"reminder": reminder,
}
)