Liking cljdoc? Tell your friends :D

goog.workspace.calendar

Clojure wrapper for the Google Calendar API (v3).

Provides idiomatic Clojure functions for managing events, calendars, calendar list entries, access control, free/busy queries, colors, and settings in Google Calendar.

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

  • CalendarScopes/CALENDAR (full read/write)
  • CalendarScopes/CALENDAR_READONLY (read-only)
  • CalendarScopes/CALENDAR_EVENTS (events read/write)
  • CalendarScopes/CALENDAR_EVENTS_READONLY (events read-only)
  • CalendarScopes/CALENDAR_SETTINGS_READONLY (settings 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 Calendar API (v3).

Provides idiomatic Clojure functions for managing events, calendars,
calendar list entries, access control, free/busy queries, colors,
and settings in Google Calendar.

Auth: use csl/scoped-delegated-credentials or csl/user-credentials with
the appropriate scope:
- CalendarScopes/CALENDAR              (full read/write)
- CalendarScopes/CALENDAR_READONLY     (read-only)
- CalendarScopes/CALENDAR_EVENTS       (events read/write)
- CalendarScopes/CALENDAR_EVENTS_READONLY (events read-only)
- CalendarScopes/CALENDAR_SETTINGS_READONLY (settings 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

calendar-clientclj

(calendar-client credentials)
(calendar-client credentials opts)

Build an authenticated Calendar v3 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 Calendar v3 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

clear-calendarclj

(clear-calendar client calendar-id)

Clear all events from a primary calendar. The calendar itself is not deleted.

Clear all events from a primary calendar. The calendar itself is not deleted.
raw docstring

create-acl-ruleclj

(create-acl-rule client calendar-id rule & [opts])

Create an ACL rule on a calendar (grant access).

rule —map with kebab-case keys: :role —"reader", "writer", "owner", or "freeBusyReader" :scope —{:type "user" :value "email@example.com"}

opts:

  • :send-notifications —boolean (whether to notify the grantee)
  • :fields —partial response field mask string
Create an ACL rule on a calendar (grant access).

rule —map with kebab-case keys:
  :role  —"reader", "writer", "owner", or "freeBusyReader"
  :scope —{:type "user" :value "email@example.com"}

opts:
- :send-notifications —boolean (whether to notify the grantee)
- :fields             —partial response field mask string
raw docstring

create-calendarclj

(create-calendar client calendar-data & [opts])

Create a new secondary calendar.

calendar-data —map with kebab-case keys: :summary —calendar name :description —calendar description :time-zone —IANA time zone (e.g. "America/New_York")

opts:

  • :fields —partial response field mask string
Create a new secondary calendar.

calendar-data —map with kebab-case keys:
  :summary     —calendar name
  :description —calendar description
  :time-zone   —IANA time zone (e.g. "America/New_York")

opts:
- :fields —partial response field mask string
raw docstring

create-eventclj

(create-event client calendar-id event & [opts])

Create a new event on a calendar.

event —map with kebab-case keys describing the event: :summary —event title :start —{:date-time "..." :time-zone "..."} or {:date "YYYY-MM-DD"} :end —same format as :start :attendees —[{:email "..."}] :description —event description :location —event location

opts:

  • :send-updates —:all, :external-only, or :none (keyword or string)
  • :fields —partial response field mask string
Create a new event on a calendar.

event —map with kebab-case keys describing the event:
  :summary     —event title
  :start       —{:date-time "..." :time-zone "..."} or {:date "YYYY-MM-DD"}
  :end         —same format as :start
  :attendees   —[{:email "..."}]
  :description —event description
  :location    —event location

opts:
- :send-updates —:all, :external-only, or :none (keyword or string)
- :fields       —partial response field mask string
raw docstring

delete-acl-ruleclj

(delete-acl-rule client calendar-id rule-id & [opts])

Delete an ACL rule from a calendar (revoke access).

Delete an ACL rule from a calendar (revoke access).
raw docstring

delete-calendarclj

(delete-calendar client calendar-id & [opts])

Permanently delete a secondary calendar. Primary calendars cannot be deleted; use clear-calendar to remove all events from a primary calendar.

Permanently delete a secondary calendar. Primary calendars cannot be deleted;
use clear-calendar to remove all events from a primary calendar.
raw docstring

delete-calendar-entryclj

(delete-calendar-entry client calendar-id & [opts])

Remove a calendar from the user's calendar list. This unsubscribes the user; it does not delete the calendar itself.

Remove a calendar from the user's calendar list. This unsubscribes the user;
it does not delete the calendar itself.
raw docstring

delete-eventclj

(delete-event client calendar-id event-id & [opts])

Delete an event.

opts:

  • :send-updates —:all, :external-only, or :none
Delete an event.

opts:
- :send-updates —:all, :external-only, or :none
raw docstring

get-acl-ruleclj

(get-acl-rule client calendar-id rule-id & [opts])

Get an ACL rule by ID.

opts:

  • :fields —partial response field mask string
Get an ACL rule by ID.

opts:
- :fields —partial response field mask string
raw docstring

get-calendarclj

(get-calendar client calendar-id & [opts])

Get a calendar's metadata by ID.

opts:

  • :fields —partial response field mask string
Get a calendar's metadata by ID.

opts:
- :fields —partial response field mask string
raw docstring

get-calendar-entryclj

(get-calendar-entry client calendar-id & [opts])

Get a calendar list entry by calendar ID. Returns user-specific metadata (color, visibility, notification settings) for a calendar in the user's list.

opts:

  • :fields —partial response field mask string
Get a calendar list entry by calendar ID. Returns user-specific metadata
(color, visibility, notification settings) for a calendar in the user's list.

opts:
- :fields —partial response field mask string
raw docstring

get-colorsclj

(get-colors client & [opts])

Get the color definitions for calendars and events.

Get the color definitions for calendars and events.
raw docstring

get-eventclj

(get-event client calendar-id event-id & [opts])

Get an event by ID.

opts:

  • :fields —partial response field mask string
  • :time-zone —time zone for expanding recurring events
Get an event by ID.

opts:
- :fields   —partial response field mask string
- :time-zone —time zone for expanding recurring events
raw docstring

get-settingclj

(get-setting client setting-id & [opts])

Get a single user setting by ID (e.g. "timezone", "locale", "format24HourTime").

Get a single user setting by ID (e.g. "timezone", "locale", "format24HourTime").
raw docstring

import-eventclj

(import-event client calendar-id event & [opts])

Import an event (e.g. from iCalendar data). The event's iCalUID must be set. Unlike create-event, imported events do not send invitations.

Import an event (e.g. from iCalendar data). The event's iCalUID must be set.
Unlike create-event, imported events do not send invitations.
raw docstring

insert-calendar-entryclj

(insert-calendar-entry client entry & [opts])

Add an existing calendar to the user's calendar list. This subscribes the user to the calendar; it does not create a new calendar.

entry —map with kebab-case keys. Required: :id —the calendar ID to add

opts:

  • :fields —partial response field mask string
Add an existing calendar to the user's calendar list.
This subscribes the user to the calendar; it does not create a new calendar.

entry —map with kebab-case keys. Required:
  :id —the calendar ID to add

opts:
- :fields —partial response field mask string
raw docstring

list-acl-rulesclj

(list-acl-rules client calendar-id & [opts])

List ACL rules for a calendar.

opts:

  • :page-token —token from a previous response
  • :page-size —max rules per page
  • :show-deleted —boolean
  • :fields —partial response field mask string
List ACL rules for a calendar.

opts:
- :page-token   —token from a previous response
- :page-size    —max rules per page
- :show-deleted —boolean
- :fields       —partial response field mask string
raw docstring

list-calendar-entriesclj

(list-calendar-entries client & [opts])

List all calendars in the authenticated user's calendar list.

opts:

  • :min-access-role —minimum access role: :free-busy-reader, :reader, :writer, :owner
  • :show-deleted —boolean
  • :show-hidden —boolean
  • :page-token —token from a previous response
  • :page-size —max entries per page
  • :fields —partial response field mask string
List all calendars in the authenticated user's calendar list.

opts:
- :min-access-role —minimum access role: :free-busy-reader, :reader, :writer, :owner
- :show-deleted    —boolean
- :show-hidden     —boolean
- :page-token      —token from a previous response
- :page-size       —max entries per page
- :fields          —partial response field mask string
raw docstring

list-event-instancesclj

(list-event-instances client calendar-id event-id & [opts])

List individual occurrences of a recurring event.

opts:

  • :time-min —lower bound for instance start time, RFC 3339 string
  • :time-max —upper bound for instance start time, RFC 3339 string
  • :page-token —token from a previous response
  • :page-size —max instances per page
  • :fields —partial response field mask string
List individual occurrences of a recurring event.

opts:
- :time-min    —lower bound for instance start time, RFC 3339 string
- :time-max    —upper bound for instance start time, RFC 3339 string
- :page-token  —token from a previous response
- :page-size   —max instances per page
- :fields      —partial response field mask string
raw docstring

list-eventsclj

(list-events client calendar-id & [opts])

List events on a calendar.

opts:

  • :time-min —lower bound (exclusive) for event end time, RFC 3339 string
  • :time-max —upper bound (exclusive) for event start time, RFC 3339 string
  • :q —free text search terms
  • :order-by —:start-time or :updated (keyword or string)
  • :single-events —boolean; when true, expands recurring events into instances
  • :page-token —token from a previous response
  • :page-size —max events per page
  • :show-deleted —boolean
  • :updated-min —lower bound on last-modification time, RFC 3339 string
  • :fields —partial response field mask string
List events on a calendar.

opts:
- :time-min       —lower bound (exclusive) for event end time, RFC 3339 string
- :time-max       —upper bound (exclusive) for event start time, RFC 3339 string
- :q              —free text search terms
- :order-by       —:start-time or :updated (keyword or string)
- :single-events  —boolean; when true, expands recurring events into instances
- :page-token     —token from a previous response
- :page-size      —max events per page
- :show-deleted   —boolean
- :updated-min    —lower bound on last-modification time, RFC 3339 string
- :fields         —partial response field mask string
raw docstring

list-settingsclj

(list-settings client & [opts])

List all user settings.

opts:

  • :page-token —token from a previous response
  • :fields —partial response field mask string
List all user settings.

opts:
- :page-token —token from a previous response
- :fields     —partial response field mask string
raw docstring

move-eventclj

(move-event client calendar-id event-id destination-calendar-id & [opts])

Move an event to another calendar.

opts:

  • :send-updates —:all, :external-only, or :none
Move an event to another calendar.

opts:
- :send-updates —:all, :external-only, or :none
raw docstring

query-freebusyclj

(query-freebusy client query-data & [opts])

Query free/busy information for a set of calendars.

query-data —map with kebab-case keys: :time-min —start of the interval, RFC 3339 string :time-max —end of the interval, RFC 3339 string :time-zone —IANA time zone (optional) :items —[{:id "calendar-id@example.com"}]

Query free/busy information for a set of calendars.

query-data —map with kebab-case keys:
  :time-min  —start of the interval, RFC 3339 string
  :time-max  —end of the interval, RFC 3339 string
  :time-zone —IANA time zone (optional)
  :items     —[{:id "calendar-id@example.com"}]
raw docstring

quick-add-eventclj

(quick-add-event client calendar-id text & [opts])

Create an event from a text string (e.g. "Lunch with Dave tomorrow at noon").

opts:

  • :send-updates —:all, :external-only, or :none
Create an event from a text string (e.g. "Lunch with Dave tomorrow at noon").

opts:
- :send-updates —:all, :external-only, or :none
raw docstring

replace-acl-ruleclj

(replace-acl-rule client calendar-id rule-id rule & [opts])

Fully replace an ACL rule (PUT semantics).

opts:

  • :send-notifications —boolean
  • :fields —partial response field mask string
Fully replace an ACL rule (PUT semantics).

opts:
- :send-notifications —boolean
- :fields             —partial response field mask string
raw docstring

replace-calendarclj

(replace-calendar client calendar-id calendar-data & [opts])

Fully replace a calendar's metadata (PUT semantics).

opts:

  • :fields —partial response field mask string
Fully replace a calendar's metadata (PUT semantics).

opts:
- :fields —partial response field mask string
raw docstring

replace-calendar-entryclj

(replace-calendar-entry client calendar-id entry & [opts])

Fully replace a calendar list entry (PUT semantics).

opts:

  • :fields —partial response field mask string
Fully replace a calendar list entry (PUT semantics).

opts:
- :fields —partial response field mask string
raw docstring

replace-eventclj

(replace-event client calendar-id event-id event & [opts])

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

opts:

  • :send-updates —:all, :external-only, or :none
  • :fields —partial response field mask string
Fully replace an event (PUT semantics). The entire event resource is replaced
with the provided data; omitted fields are cleared.

opts:
- :send-updates —:all, :external-only, or :none
- :fields       —partial response field mask string
raw docstring

update-acl-ruleclj

(update-acl-rule client calendar-id rule-id rule & [opts])

Partially update an ACL rule (PATCH semantics).

opts:

  • :send-notifications —boolean
  • :fields —partial response field mask string
Partially update an ACL rule (PATCH semantics).

opts:
- :send-notifications —boolean
- :fields             —partial response field mask string
raw docstring

update-calendarclj

(update-calendar client calendar-id calendar-data & [opts])

Partially update a calendar's metadata (PATCH semantics).

opts:

  • :fields —partial response field mask string
Partially update a calendar's metadata (PATCH semantics).

opts:
- :fields —partial response field mask string
raw docstring

update-calendar-entryclj

(update-calendar-entry client calendar-id entry & [opts])

Partially update a calendar list entry (PATCH semantics).

entry —map with kebab-case keys for fields to update (e.g. {:color-id "11" :hidden false})

opts:

  • :fields —partial response field mask string
Partially update a calendar list entry (PATCH semantics).

entry —map with kebab-case keys for fields to update
(e.g. {:color-id "11" :hidden false})

opts:
- :fields —partial response field mask string
raw docstring

update-eventclj

(update-event client calendar-id event-id event & [opts])

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

opts:

  • :send-updates —:all, :external-only, or :none
  • :fields —partial response field mask string
Partially update an event (PATCH semantics). Only the fields present in the
event map are modified; unspecified fields are left unchanged.

opts:
- :send-updates —:all, :external-only, or :none
- :fields       —partial response field mask string
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