Resource: Task
JSON representation |
---|
{
"kind": string,
"id": string,
"etag": string,
"title": string,
"updated": string,
"selfLink": string,
"parent": string,
"position": string,
"notes": string,
"status": string,
"due": string,
"completed": string,
"deleted": boolean,
"hidden": boolean,
"links": [
{
"type": string,
"description": string,
"link": string
}
],
"webViewLink": string,
"assignmentInfo": {
object ( |
Fields | |
---|---|
kind |
Output only. Type of the resource. This is always "tasks#task". |
id |
Task identifier. |
etag |
ETag of the resource. |
title |
Title of the task. Maximum length allowed: 1024 characters. |
updated |
Output only. Last modification time of the task (as a RFC 3339 timestamp). |
selfLink |
Output only. URL pointing to this task. Used to retrieve, update, or delete this task. |
parent |
Output only. Parent task identifier. This field is omitted if it is a top-level task. Use the "move" method to move the task under a different parent or to the top level. A parent task can never be an assigned task (from Chat Spaces, Docs). This field is read-only. |
position |
Output only. String indicating the position of the task among its sibling tasks under the same parent task or at the top level. If this string is greater than another task's corresponding position string according to lexicographical ordering, the task is positioned after the other task under the same parent task (or at the top level). Use the "move" method to move the task to another position. |
notes |
Notes describing the task. Tasks assigned from Google Docs cannot have notes. Optional. Maximum length allowed: 8192 characters. |
status |
Status of the task. This is either "needsAction" or "completed". |
due |
Due date of the task (as a RFC 3339 timestamp). Optional. The due date only records date information; the time portion of the timestamp is discarded when setting the due date. It isn't possible to read or write the time that a task is due via the API. |
completed |
Completion date of the task (as a RFC 3339 timestamp). This field is omitted if the task has not been completed. |
deleted |
Flag indicating whether the task has been deleted. For assigned tasks this field is read-only. They can only be deleted by calling tasks.delete, in which case both the assigned task and the original task (in Docs or Chat Spaces) are deleted. To delete the assigned task only, navigate to the assignment surface and unassign the task from there. The default is False. |
links[] |
Output only. Collection of links. This collection is read-only. |
links[].type |
Type of the link, e.g. "email". |
links[].description |
The description. In HTML speak: Everything between <a> and </a>. |
links[].link |
The URL. |
webViewLink |
Output only. An absolute link to the task in the Google Tasks Web UI. |
assignmentInfo |
Output only. Context information for assigned tasks. A task can be assigned to a user, currently possible from surfaces like Docs and Chat Spaces. This field is populated for tasks assigned to the current user and identifies where the task was assigned from. This field is read-only. |
AssignmentInfo
Information about the source of the task assignment (Document, Chat Space).
JSON representation |
---|
{ "linkToTask": string, "surfaceType": enum ( |
Fields | |
---|---|
linkToTask |
Output only. An absolute link to the original task in the surface of assignment (Docs, Chat spaces, etc.). |
surfaceType |
Output only. The type of surface this assigned task originates from. Currently limited to DOCUMENT or SPACE. |
Union field surface_info . Information about the surface (Docs, Chat Spaces) where this task was assigned from. surface_info can be only one of the following: |
|
driveResourceInfo |
Output only. Information about the Drive file where this task originates from. Currently, the Drive file can only be a document. This field is read-only. |
spaceInfo |
Output only. Information about the Chat Space where this task originates from. This field is read-only. |
ContextType
The product associated with the task.
Enums | |
---|---|
CONTEXT_TYPE_UNSPECIFIED |
Unknown value for this task's context. |
GMAIL |
The task is created from Gmail. |
DOCUMENT |
The task is assigned from a document. |
SPACE |
The task is assigned from a Chat Space. |
DriveResourceInfo
Information about the Drive resource where a task was assigned from (the document, sheet, etc.).
JSON representation |
---|
{ "driveFileId": string, "resourceKey": string } |
Fields | |
---|---|
driveFileId |
Output only. Identifier of the file in the Drive API. |
resourceKey |
Output only. Resource key required to access files shared via a shared link. Not required for all files. See also developers.google.com/drive/api/guides/resource-keys. |
SpaceInfo
Information about the Chat Space where a task was assigned from.
JSON representation |
---|
{ "space": string } |
Fields | |
---|---|
space |
Output only. The Chat space where this task originates from. The format is "spaces/{space}". |
Methods |
|
---|---|
|
Clears all completed tasks from the specified task list. |
|
Deletes the specified task from the task list. |
|
Returns the specified task. |
|
Creates a new task on the specified task list. |
|
Returns all tasks in the specified task list. |
|
Moves the specified task to another position in the destination task list. |
|
Updates the specified task. |
|
Updates the specified task. |