Class: Task

Models~Task(properties)

new Task(properties)

Task model
Parameters:
Name Type Description
properties Object Properties of the Task
Properties
Name Type Attributes Default Description
id string <optional>
ObjectID() Object ID of the tasks, only defined when this is an instantiation of a pre-existing tasks. On new taskss this must be empty in order to generate a new ObjectID
title string Title of the task
content string <optional>
Description of the task
startDate= Date | string <optional>
When the task is set to start. If it is a string it must have the format YYYY-MM-DDTHH:mm:ss.sss+0000 or YYYY-MM-DDTHH:mm:ss.sssZ
dueDate= Date | string <optional>
When the task is set to end. If it is a string it must have the format YYYY-MM-DDTHH:mm:ss.sss+0000 or YYYY-MM-DDTHH:mm:ss.sssZ
timeZone string <optional>
Timezone used for the triggering of the task reminders and assigned date. If empty it will be set to the account's default.
isAllDay boolean <optional>
False Whether the task is set to take the entire day
priority Task.Priority <optional>
Task.Priority.NONE Priority of the task
status Task.Status <optional>
Task.Status.TODO Status of the task
items Array.<Object> <optional>
[] Items of the task
reminder Reminder <optional>
Closest reminder
reminders Array.<Reminder> <optional>
[] Reminders of the task
progress Number <optional>
Progress of items, from 0 to 100
kind Task.Kind <optional>
Task.Kind.TEXT Task kind
creator string <optional>
User id of the task creator
listId string <optional>
List in which the task belongs
repeatFlag string <optional>
A set of flags that make a task repeatable
Source:

Members

(static) Kind :string

Task kind
Type:
  • string
Properties:
Name Type Description
TEXT string
CHECKLIST string
Source:

(static) Priority :Number

Priority of the task
Type:
  • Number
Properties:
Name Type Description
NONE Number
LOW Number
MEDIUM Number
HIGH Number
Source:

(static) Status :Number

Current status of the task
Type:
  • Number
Properties:
Name Type Description
TODO Number
UNKNOWN Number
COMPLETED Number
Source:

Methods

(private) save()

Saves task in TickTick by sending a request to TickTick's API
Source:
Returns:
Request response

(private) update()

Update a task in TickTick by sending a request to TickTick's API using the task ID
Source:
Returns:
Request response