Calendar

class gcsa.calendar.Calendar(summary, *, calendar_id=None, description=None, location=None, timezone='Etc/UTC', allowed_conference_solution_types=None)
Parameters:
  • summary (str) – Title of the calendar.

  • calendar_id (str) – Identifier of the calendar. To retrieve calendar IDs call the get_calendar_list().

  • description (str) – Description of the calendar.

  • location (str) – Geographic location of the calendar as free-form text.

  • timezone (str) – Timezone formatted as an IANA Time Zone Database name, e.g. “Europe/Zurich”. By default, the computers local timezone is used if it is configured. UTC is used otherwise.

  • allowed_conference_solution_types (List[str]) – The types of conference solutions that are supported for this calendar. See SolutionType

property id
to_calendar_list_entry(summary_override=None, color_id=None, background_color=None, foreground_color=None, hidden=False, selected=False, default_reminders=None, notification_types=None)

Converts Calendar to CalendarListEntry that can be added to the calendar list.

Calendar has to have calendar_id set to be converted to CalendarListEntry

Parameters:
  • summary_override (str) – The summary that the authenticated user has set for this calendar.

  • color_id (str) – The color of the calendar. This is an ID referring to an entry in the calendar section of the colors’ definition (See list_calendar_colors()). This property is superseded by the background_color and foreground_color properties and can be ignored when using these properties.

  • background_color (str) – The main color of the calendar in the hexadecimal format “#0088aa”. This property supersedes the index-based color_id property.

  • foreground_color (str) – The foreground color of the calendar in the hexadecimal format “#ffffff”. This property supersedes the index-based color_id property.

  • hidden (bool) – Whether the calendar has been hidden from the list.

  • selected (bool) – Whether the calendar content shows up in the calendar UI. The default is False.

  • default_reminders (List[Reminder]) – The default reminders that the authenticated user has for this calendar. reminders

  • notification_types (List[str]) – The list of notification types set for this calendar. gcsa:calendar:NotificationType

Returns:

CalendarListEntry object that can be added to the calendar list.

Return type:

CalendarListEntry

class gcsa.calendar.CalendarListEntry(calendar_id, *, summary_override=None, color_id=None, background_color=None, foreground_color=None, hidden=False, selected=False, default_reminders=None, notification_types=None, _summary=None, _description=None, _location=None, _timezone=None, _allowed_conference_solution_types=None, _access_role=None, _primary=False, _deleted=False)
Parameters:
  • calendar_id (str) – Identifier of the calendar.

  • summary_override (str) – The summary that the authenticated user has set for this calendar.

  • color_id (str) – The color of the calendar. This is an ID referring to an entry in the calendar section of the colors’ definition (See list_calendar_colors()). This property is superseded by the background_color and foreground_color properties and can be ignored when using these properties.

  • background_color (str) – The main color of the calendar in the hexadecimal format “#0088aa”. This property supersedes the index-based color_id property.

  • foreground_color (str) – The foreground color of the calendar in the hexadecimal format “#ffffff”. This property supersedes the index-based color_id property.

  • hidden (bool) – Whether the calendar has been hidden from the list.

  • selected (bool) – Whether the calendar content shows up in the calendar UI. The default is False.

  • default_reminders (List[Reminder]) – The default reminders that the authenticated user has for this calendar. reminders

  • notification_types (List[str]) – The list of notification types set for this calendar. gcsa:calendar:NotificationType

  • _summary (str) – Title of the calendar. Read-only.

  • _description (str) – Description of the calendar. Read-only.

  • _location (str) – Geographic location of the calendar as free-form text. Read-only.

  • _timezone (str) – Timezone formatted as an IANA Time Zone Database name, e.g. “Europe/Zurich”. Read-only.

  • _allowed_conference_solution_types (List[str]) – The types of conference solutions that are supported for this calendar. Read-only. See SolutionType

  • _access_role (str) – The effective access role that the authenticated user has on the calendar. Read-only. See AccessRoles

  • _primary (bool) – Whether the calendar is the primary calendar of the authenticated user. Read-only.

  • _deleted (bool) – Whether this calendar list entry has been deleted from the calendar list. Read-only.

property color_id
class gcsa.calendar.NotificationType
  • EVENT_CREATION - Notification sent when a new event is put on the calendar.

  • EVENT_CHANGE - Notification sent when an event is changed.

  • EVENT_CANCELLATION - Notification sent when an event is cancelled.

  • EVENT_RESPONSE - Notification sent when an attendee responds to the event invitation.

  • AGENDA - An agenda with the events of the day (sent out in the morning).

EVENT_CREATION = 'eventCreation'
EVENT_CHANGE = 'eventChange'
EVENT_CANCELLATION = 'eventCancellation'
EVENT_RESPONSE = 'eventResponse'
AGENDA = 'agenda'
class gcsa.calendar.AccessRoles
  • FREE_BUSY_READER - Provides read access to free/busy information.

  • READER - Provides read access to the calendar. Private events will appear to users with reader access, but event details will be hidden.

  • WRITER - Provides read and write access to the calendar. Private events will appear to users with writer access, and event details will be visible.

  • OWNER - Provides ownership of the calendar. This role has all of the permissions of the writer role with the additional ability to see and manipulate ACLs.

FREE_BUSY_READER = 'freeBusyReader'
READER = 'reader'
WRITER = 'writer'
OWNER = 'owner'