Skip to content

Sync

sync

Syncs a Notion database with a Google Tasks task list.

SyncGTasks(*, notion_db: Database, tasklist: GTaskList, completed_col: Column | str, completed_val: Any, not_completed_val: Any, due_col: Column | str, name: str = 'SyncGTasks', conflict_mode: ConflictMode = ConflictMode.NEWER)

Syncs a Notion database with a Google Tasks task list.

completed_col = completed_col instance-attribute

completed_val = completed_val instance-attribute

due_col = due_col instance-attribute

not_completed_val = not_completed_val instance-attribute

notion_db = notion_db instance-attribute

tasklist = tasklist instance-attribute

title_col = self.notion_db.schema.get_title_col().name instance-attribute

get_notion_objects() -> list[Page]

Get all pages from database.

get_other_objects() -> list[GTask]

Get all Google Taks from Tasklist.

notion_create_obj(**kwargs: Any) -> Page

Create a new page.

notion_delete_obj(obj: Page) -> None

Delete the page.

notion_hash(obj: Page) -> str

Get the hash of the Notion page for object mapping/linking.

notion_id(obj: Page) -> ID

Get the ID of the Notion page.

notion_timestamp(obj: Page) -> datetime

Get the timestamp of the Notion page.

notion_to_dict(obj: Page) -> dict[str, Any]

Convert a Notion object to a dictionary.

notion_update_obj(obj: Page, attr: str, value: Any) -> None

Set an attribute of the Notion object, e.g. page.

other_create_obj(**kwargs: Any) -> GTask

Create a new other object.

other_delete_obj(obj: GTask) -> None

Delete the other object.

other_hash(obj: GTask) -> str

Get the hash of the other object for object mapping/linking.

other_id(obj: GTask) -> ID

Get the ID of the Google Task.

other_timestamp(obj: GTask) -> datetime

Get the timestamp of the Google Task.

other_to_dict(obj: GTask) -> dict[str, Any]

Convert another object to a dictionary.

other_update_obj(obj: GTask, attr: str, value: Any) -> None

Set an attribute of the other object.