Skip to content

Users Tasks

Ross Scroggs edited this page Jun 12, 2022 · 19 revisions

Users - Tasks

API documentation

Notes

To use these commands you must add the 'Tasks API' to your project and update your service account authorization.

gam update project
gam user [email protected] check serviceaccount

Definitions

<UserGoogleDoc> ::=
        <EmailAddress> <DriveFileIDEntity>|<DriveFileNameEntity>|(<SharedDriveEntity> <SharedDriveFileNameEntity>)

<TaskID> ::= <String>
<TaskListID> ::= <String>
<TasklistIDTaskID> ::= <TasklistID>/<TaskID>
<TasklistIDList> ::= "<TasklistID>(,<TasklistID>)*"
<TasklistIDTaskIDList> ::= "<TasklistIDTaskID>(,<TasklistIDTaskID>)*"
<TasklistIDEntity> ::=
        <TasklistIDList> | <FileSelector> | <CSVFileSelector>
<TasklistIDTaskIDEntity> ::=
        <TasklistIDTaskIDList> | <FileSelector> | <CSVFileSelector>

<TaskAttribute> ::=
        (title <String>)|
        (notes <String>)|
	(status needsaction|completed)

<TasklistAttribute> ::=
        (title <String>)

Create Tasks

gam <UserTypeEntity> create task <TasklistIDEntity>
        <TaskAttribute>* [parent <TaskID>] [previous <TaskID>]
        [compact|formatjson|returnidonly]

By default, Gam displays the created task as an indented list of keys and values; the task notes text is displayed as individual lines.

  • compact - Display the task notes text with escaped carriage returns as \r and newlines as \n
  • formatjson - Display the task in JSON format
  • returnidonly - Display the note name only

Update Tasks

gam <UserTypeEntity> update task <TasklistIDTaskIDEntity>
        <TaskAttribute>*
        [compact|formatjson]

By default, Gam displays the updated task as an indented list of keys and values; the task notes text is displayed as individual lines.

  • compact - Display the task notes text with escaped carriage returns as \r and newlines as \n
  • formatjson - Display the task in JSON format

Delete Tasks

gam <UserTypeEntity> delete task <TasklistIDTaskIDEntity>

Move Tasks

gam <UserTypeEntity> move task <TasklistIDTaskIDEntity>
        [parent <TaskID>] [previous <TaskID>]
        [compact|formatjson]

By default, Gam displays the moved task as an indented list of keys and values; the task notes text is displayed as individual lines.

  • compact - Display the task notes text with escaped carriage returns as \r and newlines as \n
  • formatjson - Display the task in JSON format

Display Tasks

Display selected tasks

gam <UserTypeEntity> info task <TasklistIDTaskIDEntity>
        [compact|formatjson]

By default, Gam displays the tasks as an indented list of keys and values; the task notes text is displayed as individual lines.

  • compact - Display the task notes text with escaped carriage returns as \r and newlines as \n
  • formatjson - Display the task in JSON format

Display all tasks

gam <UserTypeEntity> show tasks [tasklists <TasklistIDEntity>]
        [completedmin <Time>] [completedmax <Time>]
        [duemin <Time>] [duemax <Time>]
        [updatedmin <Time>]
        [showcompleted [<Boolean>]] [showdeleted [<Boolean>]] [showhidden [<Boolean>]] [showall]
        [compact|formatjson]

By default, Gam displays the tasks as an indented list of keys and values; the task notes text is displayed as individual lines.

  • compact - Display the task notes text with escaped carriage returns as \r and newlines as \n
  • formatjson - Display the task in JSON format

By default, only tasks with status needsAction are displayed.

  • showdeleted - Add deleted tasks to the display
  • showhidden - Add hidden tasls to the display
  • showcompleted - Add completed tasks to the display. showHidden must also be True to show tasks completed in first party clients, such as the web UI and Google's mobile apps.
  • showall - Equivalent to showdeleted showhidden showcompleted
gam <UserTypeEntity> print tasks [tasklists <TasklistIDEntity>] [todrive <ToDriveAttribute>*]
        [completedmin <Time>] [completedmax <Time>]
        [duemin <Time>] [duemax <Time>]
        [updatedmin <Time>]
        [showcompleted [<Boolean>]] [showdeleted [<Boolean>]] [showhidden [<Boolean>]] [showall]
        [formatjson]
        [formatjson [quotechar <Character>]]

By default, only tasks with status needsAction are displayed.

  • showdeleted - Add deleted tasks to the display
  • showhidden - Add hidden tasls to the display
  • showcompleted - Add completed tasks to the display. showHidden must also be True to show tasks completed in first party clients, such as the web UI and Google's mobile apps.
  • showall - Equivalent to showdeleted showhidden showcompleted
By default, when writing CSV files, Gam uses a quote character of double quote `"`. The quote character is used to enclose columns that contain
the quote character itself, the column delimiter (comma by default) and new-line characters. Any quote characters within the column are doubled.
When using the `formatjson` option, double quotes are used extensively in the data resulting in hard to read/process output.
The `quotechar <Character>` option allows you to choose an alternate quote character, single quote for instance, that makes for readable/processable output.
`quotechar` defaults to `gam.cfg/csv_output_quote_char`.

## Create Task Lists

gam create tasklist * [returnidonly] [formatjson]

By default, Gam displays the created task list as an indented list of keys and values.
* `formatjson` - Display the task list in JSON format
* `returnidonly` - Display the task list ID only

## Update Task Lists

gam update tasklist * [formatjson]

By default, Gam displays the updated task list as an indented list of keys and values.
* `formatjson` - Display the task list in JSON format

## Delete Task Lists

gam delete tasklist


## Clear Task Lists
Clears all completed tasks from the specified task lists.

gam clear tasklist


## Display Task Lists
### Display selected task lists

gam info tasklist [formatjson]

By default, Gam displays the task lists as an indented list of keys and values.
* `formatjson` - Display the task list in JSON format

### Display all Task Lists

gam show tasklists [formatjson]

By default, Gam displays the task lists as an indented list of keys and values.
* `formatjson` - Display the task lists in JSON format

gam print tasklists [todrive *] [formatjson [quotechar ]]

By default, when writing CSV files, Gam uses a quote character of double quote `"`. The quote character is used to enclose columns that contain
the quote character itself, the column delimiter (comma by default) and new-line characters. Any quote characters within the column are doubled.
When using the `formatjson` option, double quotes are used extensively in the data resulting in hard to read/process output.
The `quotechar <Character>` option allows you to choose an alternate quote character, single quote for instance, that makes for readable/processable output.
`quotechar` defaults to `gam.cfg/csv_output_quote_char`.

Update History

Installation

Configuration

Notes and Information

Definitions

Command Processing

Collections

Client Access

Special Service Account Access

Service Account Access

Clone this wiki locally