"GoogleCalendar" (Service Connection)
"GoogleCalendar" (Service Connection)
Obsolete
Connecting & Authenticating
ServiceConnect["GoogleCalendar"] creates a connection to the Google Calendar API. If a previously saved connection can be found, it will be used; otherwise, a new authentication request will be launched.
Requests
ServiceExecute["GoogleCalendar","request",params] sends a request to the Google Calendar API, using parameters params. The following gives possible requests.
List Calendars
"CalendarList" — a List of calendars of authenticated user
"CalendarDataset" — a Dataset of calendars of authenticated user
| MaxItems | 100 | number of elements to return | |
| "ShowHidden" | False | whether to show hidden entries | |
| "ShowDeleted" | False | whether to include deleted calendar list entries in the result | |
| "Query" | None | query string |
Detailed Calendar Information
"CalendarInformation" — detailed information about a specific calendar
| "CalendarID" | "primary" | calendar ID (default is user's primary calendar) |
List Events
"EventList" — a List of events in a given calendar
"EventDataset" — a Dataset of events in a given calendar
| "CalendarID" | "primary" | calendar ID (default is user's primary calendar) | |
| "MaxAttendees" | None | maximum number of attendees to return | |
| MaxItems | 250 | number of elements to return | |
| "StartIndex" | 1 | index number of first result to return | |
| "ShowHiddenInvitations" | False | whether to include hidden invitations | |
| "ShowDeleted" | False | whether to include deleted events | |
| "SortBy" | None | sort order for results: "StartTime" (only when "SingleEvents" is set to True) or "Updated" | |
| "Query" | None | query string | |
| "ExpandRecurringEvents" | False | whether to return only event instances, but not recurring events themselves | |
| "Date" | None | date or date range to filter events by | |
| "UpdatedMin" | None | lower bound for the last modification time of events |
Detailed Event Information
"EventInformation" — detailed information about a specific event
| "CalendarID" | "primary" | calendar ID (default is user's primary calendar) | |
| "EventID" | (required) | event ID | |
| "MaxAttendees" | None | maximum number of attendees to return |
Examples
Basic Examples (1)
Create a new connection by launching an authentication dialog:
googlecalendar = ServiceConnect["GoogleCalendar"]calendarList = googlecalendar["CalendarList"];calendarList[[{1, 3}, {"ID", "Summary"}]]Get detailed information about a calendar:
googlecalendar["CalendarInformation", "CalendarID" -> "ID" /. calendarList[[3]]]googlecalendar["EventDataset"][ ;; 4]events = googlecalendar["EventList", "SortBy" -> "StartTime", "ExpandRecurringEvents" -> True];events[[18, {"Start", "Summary", "Location"}]]Search events using a query term:
googlecalendar["EventList", "Query" -> "class"][[-3 ;; , {"Start", "Summary"}]]events = googlecalendar["EventDataset", "Date" -> {DateObject[{2017, 2, 26}], DateObject[{2017, 2, 28}]}, "MaxAttendees" -> 1]Get detailed information about an event:
googlecalendar["EventInformation", "EventID" -> events[2, "ID"]]