Liking cljdoc? Tell your friends :D

goog.workspace.tasks

Clojure wrapper for the Google Tasks API (v1).

Provides idiomatic Clojure functions for managing task lists and tasks, including completion tracking, due-date filtering, and task reordering.

Auth: use csl/scoped-delegated-credentials or csl/user-credentials with the appropriate scope:

  • TasksScopes/TASKS (full read/write)
  • TasksScopes/TASKS_READONLY (read-only)

All list functions return {:data [...] :next-page-token "..."}. :next-page-token is absent when there are no further pages.

Update semantics: functions named update-* use PATCH (partial update); functions named replace-* use PUT (full replacement). Both return the updated resource.

All functions return {:data ...} on success or {:error ...} on failure.

Clojure wrapper for the Google Tasks API (v1).

Provides idiomatic Clojure functions for managing task lists and tasks,
including completion tracking, due-date filtering, and task reordering.

Auth: use csl/scoped-delegated-credentials or csl/user-credentials with
the appropriate scope:
- TasksScopes/TASKS          (full read/write)
- TasksScopes/TASKS_READONLY (read-only)

All list functions return {:data [...] :next-page-token "..."}.
:next-page-token is absent when there are no further pages.

Update semantics: functions named update-* use PATCH (partial update);
functions named replace-* use PUT (full replacement). Both return the
updated resource.

All functions return {:data ...} on success or {:error ...} on failure.
raw docstring

clear-completed-tasksclj

(clear-completed-tasks client tasklist-id & [opts])

Permanently delete all completed tasks from a task list. Affected tasks are removed from the default view (they remain accessible via list-tasks with :show-hidden true and :show-deleted true for a short window before purge).

opts:

  • :read-timeout-ms — int, override the HTTP client's default read timeout
Permanently delete all completed tasks from a task list. Affected tasks are
removed from the default view (they remain accessible via list-tasks with
:show-hidden true and :show-deleted true for a short window before purge).

opts:
- :read-timeout-ms — int, override the HTTP client's default read timeout
raw docstring

delete-taskclj

(delete-task client tasklist-id task-id & [opts])

Delete a task.

opts:

  • :read-timeout-ms — int, override the HTTP client's default read timeout
Delete a task.

opts:
- :read-timeout-ms — int, override the HTTP client's default read timeout
raw docstring

delete-task-listclj

(delete-task-list client tasklist-id & [opts])

Delete a task list. Cannot be used to delete the user's default list.

opts:

  • :read-timeout-ms — int, override the HTTP client's default read timeout
Delete a task list. Cannot be used to delete the user's default list.

opts:
- :read-timeout-ms — int, override the HTTP client's default read timeout
raw docstring

get-taskclj

(get-task client tasklist-id task-id & [opts])

Get a task by ID.

opts:

  • :fields — partial response field mask string
  • :read-timeout-ms — int, override the HTTP client's default read timeout
Get a task by ID.

opts:
- :fields          — partial response field mask string
- :read-timeout-ms — int, override the HTTP client's default read timeout
raw docstring

get-task-listclj

(get-task-list client tasklist-id & [opts])

Get a task list by ID.

tasklist-id — task list ID (e.g. "MDAxNzc...") or "@default" for the authenticated user's default list.

opts:

  • :fields — partial response field mask string
  • :read-timeout-ms — int, override the HTTP client's default read timeout
Get a task list by ID.

tasklist-id — task list ID (e.g. "MDAxNzc...") or "@default" for the
authenticated user's default list.

opts:
- :fields          — partial response field mask string
- :read-timeout-ms — int, override the HTTP client's default read timeout
raw docstring

insert-taskclj

(insert-task client tasklist-id task & [opts])

Create a new task in a task list.

task — map with kebab-case keys. Common fields: :title — required, the task title :notes — optional description :due — RFC 3339 due date (date portion only is significant) :status — "needsAction" (default) or "completed"

opts:

  • :parent — parent task ID; creates the new task as a subtask
  • :previous — task ID that the new task should follow (for position)
  • :fields — partial response field mask string
  • :read-timeout-ms — int, override the HTTP client's default read timeout
Create a new task in a task list.

task — map with kebab-case keys. Common fields:
  :title  — required, the task title
  :notes  — optional description
  :due    — RFC 3339 due date (date portion only is significant)
  :status — "needsAction" (default) or "completed"

opts:
- :parent          — parent task ID; creates the new task as a subtask
- :previous        — task ID that the new task should follow (for position)
- :fields          — partial response field mask string
- :read-timeout-ms — int, override the HTTP client's default read timeout
raw docstring

insert-task-listclj

(insert-task-list client task-list & [opts])

Create a new task list.

task-list — map with kebab-case keys. Required: :title — display title of the task list

opts:

  • :fields — partial response field mask string
  • :read-timeout-ms — int, override the HTTP client's default read timeout
Create a new task list.

task-list — map with kebab-case keys. Required:
  :title — display title of the task list

opts:
- :fields          — partial response field mask string
- :read-timeout-ms — int, override the HTTP client's default read timeout
raw docstring

list-task-listsclj

(list-task-lists client & [opts])

List the authenticated user's task lists.

opts:

  • :page-token — token from a previous response to fetch the next page
  • :page-size — max number of task lists per page (1–100; API default 20)
  • :fields — partial response field mask string (e.g. "items(id,title),nextPageToken")
  • :read-timeout-ms — int, override the HTTP client's default read timeout for this request
List the authenticated user's task lists.

opts:
- :page-token      — token from a previous response to fetch the next page
- :page-size       — max number of task lists per page (1–100; API default 20)
- :fields          — partial response field mask string (e.g.
                     "items(id,title),nextPageToken")
- :read-timeout-ms — int, override the HTTP client's default read timeout
                     for this request
raw docstring

list-tasksclj

(list-tasks client tasklist-id & [opts])

List tasks in a task list.

tasklist-id — task list ID or "@default".

opts:

  • :page-token — token from a previous response
  • :page-size — max tasks per page (1–100; API default 20)
  • :due-min — lower bound on due date, RFC 3339 string
  • :due-max — upper bound on due date, RFC 3339 string
  • :completed-min — lower bound on completion date, RFC 3339 string
  • :completed-max — upper bound on completion date, RFC 3339 string
  • :updated-min — lower bound on last-modification time, RFC 3339 string
  • :show-assigned — boolean; include tasks assigned to the user from Workspace surfaces (Docs, Chat). Default false.
  • :show-completed — boolean; include completed tasks. Default true.
  • :show-deleted — boolean; include deleted tasks. Default false.
  • :show-hidden — boolean; include hidden tasks. Default false.
  • :fields — partial response field mask string
  • :read-timeout-ms — int, override the HTTP client's default read timeout
List tasks in a task list.

tasklist-id — task list ID or "@default".

opts:
- :page-token      — token from a previous response
- :page-size       — max tasks per page (1–100; API default 20)
- :due-min         — lower bound on due date, RFC 3339 string
- :due-max         — upper bound on due date, RFC 3339 string
- :completed-min   — lower bound on completion date, RFC 3339 string
- :completed-max   — upper bound on completion date, RFC 3339 string
- :updated-min     — lower bound on last-modification time, RFC 3339 string
- :show-assigned   — boolean; include tasks assigned to the user from
                     Workspace surfaces (Docs, Chat). Default false.
- :show-completed  — boolean; include completed tasks. Default true.
- :show-deleted    — boolean; include deleted tasks. Default false.
- :show-hidden     — boolean; include hidden tasks. Default false.
- :fields          — partial response field mask string
- :read-timeout-ms — int, override the HTTP client's default read timeout
raw docstring

move-taskclj

(move-task client tasklist-id task-id & [opts])

Move a task within its task list, or to another task list.

Reorders by setting the new position relative to its parent and the task it should follow. Pass :destination-tasklist to move across lists.

opts:

  • :parent — new parent task ID (move under a different parent)
  • :previous — task ID that the moved task should follow
  • :destination-tasklist — task list ID to move the task to (cross-list move)
  • :fields — partial response field mask string
  • :read-timeout-ms — int, override the HTTP client's default read timeout
Move a task within its task list, or to another task list.

Reorders by setting the new position relative to its parent and the task it
should follow. Pass :destination-tasklist to move across lists.

opts:
- :parent               — new parent task ID (move under a different parent)
- :previous             — task ID that the moved task should follow
- :destination-tasklist — task list ID to move the task to (cross-list move)
- :fields               — partial response field mask string
- :read-timeout-ms      — int, override the HTTP client's default read timeout
raw docstring

replace-taskclj

(replace-task client tasklist-id task-id task & [opts])

Fully replace a task (PUT semantics). The entire task resource is replaced with the provided data; omitted fields are cleared.

opts:

  • :fields — partial response field mask string
  • :read-timeout-ms — int, override the HTTP client's default read timeout
Fully replace a task (PUT semantics). The entire task resource is replaced
with the provided data; omitted fields are cleared.

opts:
- :fields          — partial response field mask string
- :read-timeout-ms — int, override the HTTP client's default read timeout
raw docstring

replace-task-listclj

(replace-task-list client tasklist-id task-list & [opts])

Fully replace a task list (PUT semantics). The entire task-list resource is replaced with the provided data; omitted fields are cleared.

opts:

  • :fields — partial response field mask string
  • :read-timeout-ms — int, override the HTTP client's default read timeout
Fully replace a task list (PUT semantics). The entire task-list resource is
replaced with the provided data; omitted fields are cleared.

opts:
- :fields          — partial response field mask string
- :read-timeout-ms — int, override the HTTP client's default read timeout
raw docstring

tasks-clientclj

(tasks-client credentials)
(tasks-client credentials opts)

Build an authenticated Tasks v1 REST client.

credentials — a com.google.auth.oauth2.GoogleCredentials instance, typically from csl/scoped-delegated-credentials or csl/user-credentials.

opts (optional):

  • :read-timeout-ms per-client default read timeout (default 120000 / 120s)
  • :connect-timeout-ms per-client default connect timeout (default 30000 / 30s)

Per-request opts on individual call sites override the client-level defaults.

Build an authenticated Tasks v1 REST client.

credentials — a com.google.auth.oauth2.GoogleCredentials instance, typically
from csl/scoped-delegated-credentials or csl/user-credentials.

opts (optional):
- :read-timeout-ms     per-client default read timeout (default 120000 / 120s)
- :connect-timeout-ms  per-client default connect timeout (default 30000 / 30s)

Per-request opts on individual call sites override the client-level defaults.
raw docstring

update-taskclj

(update-task client tasklist-id task-id task & [opts])

Partially update a task (PATCH semantics). Only the fields present in the task map are modified; unspecified fields are left unchanged.

opts:

  • :fields — partial response field mask string
  • :read-timeout-ms — int, override the HTTP client's default read timeout
Partially update a task (PATCH semantics). Only the fields present in the
task map are modified; unspecified fields are left unchanged.

opts:
- :fields          — partial response field mask string
- :read-timeout-ms — int, override the HTTP client's default read timeout
raw docstring

update-task-listclj

(update-task-list client tasklist-id task-list & [opts])

Partially update a task list (PATCH semantics). Only the fields present in the task-list map are modified; unspecified fields are left unchanged.

opts:

  • :fields — partial response field mask string
  • :read-timeout-ms — int, override the HTTP client's default read timeout
Partially update a task list (PATCH semantics). Only the fields present in
the task-list map are modified; unspecified fields are left unchanged.

opts:
- :fields          — partial response field mask string
- :read-timeout-ms — int, override the HTTP client's default read timeout
raw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close