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:
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.(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:
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
(delete-task client tasklist-id task-id & [opts])Delete a task.
opts:
Delete a task. opts: - :read-timeout-ms — int, override the HTTP client's default read timeout
(delete-task-list client tasklist-id & [opts])Delete a task list. Cannot be used to delete the user's default list.
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
(get-task client tasklist-id task-id & [opts])Get a task by 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-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:
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
(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:
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
(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:
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
(list-task-lists client & [opts])List the authenticated user's task lists.
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-tasks client tasklist-id & [opts])List tasks in a task list.
tasklist-id — task list ID or "@default".
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(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:
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
(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:
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
(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:
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
(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):
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.
(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:
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
(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:
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
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |