4747 Attachment ,
4848 Collaborator ,
4949 Comment ,
50- Due ,
5150 Label ,
5251 LocationReminder ,
5352 Project ,
@@ -1592,30 +1591,47 @@ async def add_reminder(
15921591 * ,
15931592 reminder_type : Literal ["relative" , "absolute" ] = "relative" ,
15941593 minute_offset : int | None = None ,
1595- due : Due | None = None ,
1594+ due_string : str | None = None ,
1595+ due_date : date | None = None ,
1596+ due_datetime : datetime | None = None ,
1597+ due_lang : LanguageCode | None = None ,
1598+ due_timezone : str | None = None ,
15961599 service : Literal ["email" , "push" ] | None = None ,
15971600 ) -> Reminder :
15981601 """
15991602 Create a new reminder.
16001603
16011604 For relative reminders, provide `minute_offset`.
1602- For absolute reminders, provide ` due` .
1605+ For absolute reminders, provide due date fields .
16031606
16041607 :param task_id: The ID of the task to add the reminder to.
16051608 :param reminder_type: The type of reminder ("relative" or "absolute").
16061609 :param minute_offset: Minutes before the due date/time to trigger (relative).
1607- :param due: The absolute due date/time for the reminder (absolute).
1610+ :param due_string: The due date in natural language format (absolute).
1611+ :param due_date: The due date as a date object (absolute).
1612+ :param due_datetime: The due date and time as a datetime object (absolute).
1613+ :param due_lang: Language for parsing the due date.
1614+ :param due_timezone: Timezone for the due date.
16081615 :param service: The notification service ("email" or "push").
16091616 :return: The newly created reminder.
16101617 :raises httpx.HTTPStatusError: If the API request fails.
16111618 """
16121619 endpoint = get_api_url (REMINDERS_PATH )
16131620
1621+ due = kwargs_without_none (
1622+ string = due_string ,
1623+ date = format_date (due_date )
1624+ if due_date is not None
1625+ else (format_datetime (due_datetime ) if due_datetime is not None else None ),
1626+ lang = due_lang ,
1627+ timezone = due_timezone ,
1628+ )
1629+
16141630 data = kwargs_without_none (
16151631 task_id = task_id ,
16161632 reminder_type = reminder_type ,
16171633 minute_offset = minute_offset ,
1618- due = due . to_dict () if due is not None else None ,
1634+ due = due or None ,
16191635 service = service ,
16201636 )
16211637
@@ -1634,7 +1650,11 @@ async def update_reminder(
16341650 reminder_id : str ,
16351651 * ,
16361652 minute_offset : int | None = None ,
1637- due : Due | None = None ,
1653+ due_string : str | None = None ,
1654+ due_date : date | None = None ,
1655+ due_datetime : datetime | None = None ,
1656+ due_lang : LanguageCode | None = None ,
1657+ due_timezone : str | None = None ,
16381658 service : Literal ["email" , "push" ] | None = None ,
16391659 ) -> Reminder :
16401660 """
@@ -1644,16 +1664,29 @@ async def update_reminder(
16441664
16451665 :param reminder_id: The ID of the reminder to update.
16461666 :param minute_offset: Minutes before the due date/time to trigger.
1647- :param due: The absolute due date/time for the reminder.
1667+ :param due_string: The due date in natural language format.
1668+ :param due_date: The due date as a date object.
1669+ :param due_datetime: The due date and time as a datetime object.
1670+ :param due_lang: Language for parsing the due date.
1671+ :param due_timezone: Timezone for the due date.
16481672 :param service: The notification service ("email" or "push").
16491673 :return: The updated reminder.
16501674 :raises httpx.HTTPStatusError: If the API request fails.
16511675 """
16521676 endpoint = get_api_url (f"{ REMINDERS_PATH } /{ reminder_id } " )
16531677
1678+ due = kwargs_without_none (
1679+ string = due_string ,
1680+ date = format_date (due_date )
1681+ if due_date is not None
1682+ else (format_datetime (due_datetime ) if due_datetime is not None else None ),
1683+ lang = due_lang ,
1684+ timezone = due_timezone ,
1685+ )
1686+
16541687 data = kwargs_without_none (
16551688 minute_offset = minute_offset ,
1656- due = due . to_dict () if due is not None else None ,
1689+ due = due or None ,
16571690 service = service ,
16581691 )
16591692
0 commit comments