todoist#

Description#

Todoist integration.

You’ll also need a Todoist token. You can get it here.

Configuration#

todoist:
  # [Required]
  # Todoist API token.
  # You can get it `here <https://todoist.com/prefs/integrations>`_.
  api_token:   # type=str

Dependencies#

pip

pip install todoist-python

Actions#

Module reference#

class platypush.plugins.todoist.TodoistPlugin(api_token: str, **kwargs)[source]#

Bases: Plugin

Todoist integration.

You’ll also need a Todoist token. You can get it here.

__init__(api_token: str, **kwargs)[source]#
Parameters:

api_token

Todoist API token. You can get it here.

add_item(content: str, project_id: int | None = None, **kwargs)[source]#

Add a new item.

archive(item_id: int)[source]#

Archive an item by id.

complete_item(item_id: int)[source]#

Mark an item as done.

delete_item(item_id: int)[source]#

Delete an item by id.

get_collaborators()[source]#

Get list of collaborators.

Returns:

[
  {
    "data": {
      "key": "value"
    }
  }
]

get_filters()[source]#

Get list of Todoist filters.

Returns:

[
  {
    "color": 23,
    "id": 98,
    "is_deleted": true,
    "item_order": 60,
    "name": "string",
    "query": "string",
    "user_id": 91
  }
]

get_items()[source]#

Get list of Todoist projects.

Return .. schema::

todoist.TodoistItemSchema(many=True)

get_live_notifications()[source]#

Get list of Todoist live notifications.

Returns:

[
  {
    "completed_last_month": false,
    "completed_tasks": 17,
    "created": "string",
    "id": 40,
    "is_deleted": true,
    "is_unread": true,
    "karma_level": 25,
    "notification_key": "string",
    "notification_type": "string",
    "project_id": 23,
    "promo_img": "https://example.org",
    "user_id": 70
  }
]

get_notes()[source]#

Get list of Todoist notes.

Returns:

[
  {
    "data": {
      "key": "value"
    }
  }
]

get_project_notes()[source]#

Get list of Todoist project notes.

Returns:

[
  {
    "data": {
      "key": "value"
    }
  }
]

get_projects()[source]#

Get list of Todoist projects.

Returns:

[
  {
    "child_order": 60,
    "collapsed": false,
    "color": 37,
    "has_more_notes": true,
    "id": 87,
    "inbox_project": false,
    "is_archived": true,
    "is_deleted": false,
    "is_favorite": false,
    "legacy_id": 52,
    "name": "string",
    "parent_id": 24,
    "shared": true
  }
]

get_user()[source]#

Get logged user info.

Returns:

{
  "auto_reminder": 4,
  "avatar_big": "https://example.com/user/100x100.png",
  "avatar_medium": "https://example.com/user/50x50.png",
  "avatar_s640": "https://example.com/user/640x640.png",
  "avatar_small": "https://example.com/user/25x25.png",
  "business_account_id": 123456,
  "daily_goal": 100,
  "date_format": "dd-mm-yyyy",
  "dateist_inline_disabled": true,
  "dateist_lang": "en",
  "days_off": [
    0,
    6
  ],
  "default_reminder": "string",
  "email": "user@example.com",
  "features": {
    "key": "value"
  },
  "full_name": "John Doe",
  "id": 123456,
  "image_id": "string",
  "inbox_project": 123456,
  "is_biz_admin": false,
  "is_premium": true,
  "join_date": "2020-01-01T00:00:00+00:00",
  "karma": 89,
  "karma_trend": "string",
  "lang": "en",
  "legacy_inbox_project": 5,
  "mobile_host": "string",
  "mobile_number": "string",
  "next_week": 82,
  "premium_until": "2020-01-01T00:00:00+00:00",
  "share_limit": 56,
  "sort_order": 27,
  "start_day": 5,
  "start_page": "string",
  "theme": 32,
  "time_format": "24h",
  "token": "string",
  "tz_info": {
    "key": "value"
  },
  "unique_prefix": 97,
  "websocket_url": "https://example.org",
  "weekly_goal": 12
}

sync()[source]#

Sync/update info with the remote server.

unarchive(item_id: int)[source]#

Un-archive an item by id.

uncomplete_item(item_id: int)[source]#

Mark an item as not done.

update_item(item_id: int, **kwargs)[source]#

Update an item by id.