Skip to content

Task#

pyticktick.models.v1.responses.task #

Response models for task related endpoints in TickTick API v1.

Classes:

Name Description
ItemV1

Model for a response with checklist item information in the V1 API.

TaskRespV1

Model for a response with task information in the V1 API.

ItemV1 pydantic-model #

Bases: BaseModel

Model for a response with checklist item information in the V1 API.

This model is used to represent a checklist item in the V1 API. It is used in the TaskRespV1 model to represent checklist items of a task. It maps directly to the checklistitem definition in the V1 API docs.

Show JSON schema:
{
  "description": "Model for a response with checklist item information in the V1 API.\n\nThis model is used to represent a checklist item in the V1 API. It is used in the\n`TaskRespV1` model to represent checklist items of a task. It maps directly to the [checklistitem](https://developer.ticktick.com/docs#/openapi?id=checklistitem)\ndefinition in the V1 API docs.",
  "properties": {
    "id": {
      "description": "Subtask identifier",
      "title": "Id",
      "type": "string"
    },
    "title": {
      "description": "Subtask title",
      "title": "Title",
      "type": "string"
    },
    "status": {
      "description": "The completion status of checklist item. Normal: 0, Completed: 1",
      "title": "Status",
      "type": "boolean"
    },
    "completedTime": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Subtask completed time in `yyyy-MM-dd'T'HH:mm:ssZ`",
      "title": "Completedtime"
    },
    "isAllDay": {
      "description": "All day",
      "title": "Isallday",
      "type": "boolean"
    },
    "sortOrder": {
      "description": "Subtask sort order",
      "title": "Sortorder",
      "type": "integer"
    },
    "startDate": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Subtask start date time in `yyyy-MM-dd'T'HH:mm:ssZ`",
      "title": "Startdate"
    },
    "timeZone": {
      "description": "Subtask timezone. Example: 'America/Los_Angeles'",
      "title": "Timezone",
      "type": "string"
    }
  },
  "required": [
    "id",
    "title",
    "status",
    "isAllDay",
    "sortOrder",
    "timeZone"
  ],
  "title": "ItemV1",
  "type": "object"
}

Config:

  • extra: ignore

Fields:

Validators:

completed_time pydantic-field #

completed_time: str | None = None

Subtask completed time in yyyy-MM-dd'T'HH:mm:ssZ

id pydantic-field #

id: str

Subtask identifier

is_all_day pydantic-field #

is_all_day: bool

All day

sort_order pydantic-field #

sort_order: int

Subtask sort order

start_date pydantic-field #

start_date: str | None = None

Subtask start date time in yyyy-MM-dd'T'HH:mm:ssZ

status pydantic-field #

status: bool

The completion status of checklist item. Normal: 0, Completed: 1

time_zone pydantic-field #

time_zone: str

Subtask timezone. Example: 'America/Los_Angeles'

title pydantic-field #

title: str

Subtask title

TaskRespV1 pydantic-model #

Bases: BaseModel

Model for a response with task information in the V1 API.

This model is used to represent a task in the V1 API. It is used in a few different endpoints, including GET /project/{project_id}/task/{task_id}, POST /task, and POST /task/{task_id}. It maps directly to the task definition in the V1 API docs.

Show JSON schema:
{
  "$defs": {
    "ItemV1": {
      "description": "Model for a response with checklist item information in the V1 API.\n\nThis model is used to represent a checklist item in the V1 API. It is used in the\n`TaskRespV1` model to represent checklist items of a task. It maps directly to the [checklistitem](https://developer.ticktick.com/docs#/openapi?id=checklistitem)\ndefinition in the V1 API docs.",
      "properties": {
        "id": {
          "description": "Subtask identifier",
          "title": "Id",
          "type": "string"
        },
        "title": {
          "description": "Subtask title",
          "title": "Title",
          "type": "string"
        },
        "status": {
          "description": "The completion status of checklist item. Normal: 0, Completed: 1",
          "title": "Status",
          "type": "boolean"
        },
        "completedTime": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Subtask completed time in `yyyy-MM-dd'T'HH:mm:ssZ`",
          "title": "Completedtime"
        },
        "isAllDay": {
          "description": "All day",
          "title": "Isallday",
          "type": "boolean"
        },
        "sortOrder": {
          "description": "Subtask sort order",
          "title": "Sortorder",
          "type": "integer"
        },
        "startDate": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Subtask start date time in `yyyy-MM-dd'T'HH:mm:ssZ`",
          "title": "Startdate"
        },
        "timeZone": {
          "description": "Subtask timezone. Example: 'America/Los_Angeles'",
          "title": "Timezone",
          "type": "string"
        }
      },
      "required": [
        "id",
        "title",
        "status",
        "isAllDay",
        "sortOrder",
        "timeZone"
      ],
      "title": "ItemV1",
      "type": "object"
    }
  },
  "description": "Model for a response with task information in the V1 API.\n\nThis model is used to represent a task in the V1 API. It is used in a few different\nendpoints, including `GET /project/{project_id}/task/{task_id}`, `POST /task`, and\n`POST /task/{task_id}`. It maps directly to the [task](https://developer.ticktick.com/docs#/openapi?id=task-1)\ndefinition in the V1 API docs.",
  "properties": {
    "id": {
      "description": "Project identifier",
      "title": "Id",
      "type": "string"
    },
    "projectId": {
      "description": "Task project id",
      "title": "Projectid",
      "type": "string"
    },
    "title": {
      "description": "Task title",
      "title": "Title",
      "type": "string"
    },
    "isAllDay": {
      "description": "All day",
      "title": "Isallday",
      "type": "boolean"
    },
    "completedTime": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Task completed time in `yyyy-MM-dd'T'HH:mm:ssZ`",
      "title": "Completedtime"
    },
    "content": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Task content",
      "title": "Content"
    },
    "desc": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Task description of checklist",
      "title": "Desc"
    },
    "dueDate": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Task due date time in `yyyy-MM-dd'T'HH:mm:ssZ`",
      "title": "Duedate"
    },
    "items": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/ItemV1"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Subtasks of Task",
      "title": "Items"
    },
    "priority": {
      "description": "Task priority. None:0, Low:1, Medium:3, High:5",
      "enum": [
        0,
        1,
        3,
        5
      ],
      "title": "Priority",
      "type": "integer"
    },
    "reminders": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "List of reminder triggers. Example: ['TRIGGER:P0DT9H0M0S', 'TRIGGER:PT0S']",
      "title": "Reminders"
    },
    "repeatFlag": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Recurring rules of task. Example: 'RRULE:FREQ=DAILY;INTERVAL=1'",
      "title": "Repeatflag"
    },
    "sortOrder": {
      "description": "Task sort order",
      "title": "Sortorder",
      "type": "integer"
    },
    "startDate": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Start date time in `yyyy-MM-dd'T'HH:mm:ssZ`",
      "title": "Startdate"
    },
    "status": {
      "description": "Task completion status. Normal: 0, Completed: 2",
      "title": "Status",
      "type": "boolean"
    },
    "timeZone": {
      "description": "Task timezone. Example: 'America/Los_Angeles'",
      "title": "Timezone",
      "type": "string"
    }
  },
  "required": [
    "id",
    "projectId",
    "title",
    "isAllDay",
    "priority",
    "sortOrder",
    "status",
    "timeZone"
  ],
  "title": "TaskRespV1",
  "type": "object"
}

Config:

  • extra: ignore

Fields:

Validators:

completed_time pydantic-field #

completed_time: str | None = None

Task completed time in yyyy-MM-dd'T'HH:mm:ssZ

content pydantic-field #

content: str | None = None

Task content

desc pydantic-field #

desc: str | None = None

Task description of checklist

due_date pydantic-field #

due_date: str | None = None

Task due date time in yyyy-MM-dd'T'HH:mm:ssZ

id pydantic-field #

id: str

Project identifier

is_all_day pydantic-field #

is_all_day: bool

All day

items pydantic-field #

items: list[ItemV1] | None = None

Subtasks of Task

priority pydantic-field #

priority: Literal[0, 1, 3, 5]

Task priority. None:0, Low:1, Medium:3, High:5

project_id pydantic-field #

project_id: str

Task project id

reminders pydantic-field #

reminders: list[str] | None = None

List of reminder triggers. Example: ['TRIGGER:P0DT9H0M0S', 'TRIGGER:PT0S']

repeat_flag pydantic-field #

repeat_flag: str | None = None

Recurring rules of task. Example: 'RRULE:FREQ=DAILY;INTERVAL=1'

sort_order pydantic-field #

sort_order: int

Task sort order

start_date pydantic-field #

start_date: str | None = None

Start date time in yyyy-MM-dd'T'HH:mm:ssZ

status pydantic-field #

status: bool

Task completion status. Normal: 0, Completed: 2

time_zone pydantic-field #

time_zone: str

Task timezone. Example: 'America/Los_Angeles'

title pydantic-field #

title: str

Task title