Event
- class gcsa.event.Event(summary, start, end=None, *, timezone='Etc/UTC', event_id=None, description=None, location=None, recurrence=None, color_id=None, visibility='default', attendees=None, attachments=None, conference_solution=None, reminders=None, default_reminders=False, minutes_before_popup_reminder=None, minutes_before_email_reminder=None, guests_can_invite_others=True, guests_can_modify=False, guests_can_see_other_guests=True, transparency=None, _creator=None, _organizer=None, _created=None, _updated=None, _recurring_event_id=None, **other)
- Parameters:
summary (str) – Title of the event.
start (date | datetime | BeautifulDate) – Starting date/datetime.
end (date | datetime | BeautifulDate) – Ending date/datetime. If ‘end’ is not specified, event is considered as a 1-day or 1-hour event if ‘start’ is date or datetime respectively.
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.
event_id (str) – Opaque identifier of the event. By default, it is generated by the server. You can specify id as a 5-1024 long string of characters used in base32hex ([a-vA-V0-9]). The ID must be unique per calendar.
description (str) – Description of the event. Can contain HTML.
location (str) – Geographic location of the event as free-form text.
recurrence (str | List[str]) – RRULE/RDATE/EXRULE/EXDATE string or list of such strings. See
recurrence
color_id (str) – Color id referring to an entry from colors endpoint. See
list_event_colors()
visibility (str) – Visibility of the event. Default is default visibility for events on the calendar. See
Visibility
attendees (Attendee | str | List[Attendee] | List[str]) – Attendee or list of attendees. See
Attendee
. Each attendee may be given as email string orAttendee
object.attachments (Attachment | List[Attachment]) – Attachment or list of attachments. See
Attachment
conference_solution (ConferenceSolution | ConferenceSolutionCreateRequest) –
ConferenceSolutionCreateRequest
object to create a new conference orConferenceSolution
object for existing conference.reminders (Reminder | List[Reminder]) – Reminder or list of reminder objects. See
reminders
default_reminders (bool) – Whether the default reminders of the calendar apply to the event.
minutes_before_popup_reminder (int) – Minutes before popup reminder or None if reminder is not needed.
minutes_before_email_reminder (int) – Minutes before email reminder or None if reminder is not needed.
guests_can_invite_others (bool) – Whether attendees other than the organizer can invite others to the event.
guests_can_modify (bool) – Whether attendees other than the organizer can modify the event.
guests_can_see_other_guests (bool) – Whether attendees other than the organizer can see who the event’s attendees are.
transparency (str) – Whether the event blocks time on the calendar. See
Transparency
_organizer (Person) – The organizer of the event. See
Person
. If the organizer is also an attendee, this is indicated with a separate entry in attendees with the organizer field set to True. To change the organizer, use the move operation seemove_event()
_created (datetime) – Creation time of the event. Read-only.
_updated (datetime) – Last modification time of the event. Read-only.
_recurring_event_id (str) – For an instance of a recurring event, this is the id of the recurring event to which this instance belongs. Read-only.
other – Other fields that should be included in request json. Will be included as they are. See more in https://developers.google.com/calendar/v3/reference/events
- property id
- add_attendee(attendee)
Adds attendee to an event. See
Attendee
. Attendee may be given as email string orAttendee
object.
- add_attachment(file_url, title=None, mime_type=None)
Adds attachment to an event. See
Attachment
- add_email_reminder(minutes_before_start=60)
Adds email reminder to an event. See
EmailReminder
- Parameters:
minutes_before_start (int) –
- add_popup_reminder(minutes_before_start=30)
Adds popup reminder to an event. See
PopupReminder
- Parameters:
minutes_before_start (int) –
- property is_recurring_instance
- class gcsa.event.Visibility
Possible values of the event visibility.
DEFAULT - Uses the default visibility for events on the calendar. This is the default value.
PUBLIC - The event is public and event details are visible to all readers of the calendar.
PRIVATE - The event is private and only event attendees may view event details.
- DEFAULT = 'default'
- PUBLIC = 'public'
- PRIVATE = 'private'
- class gcsa.event.Transparency
Possible values of the event transparency.
OPAQUE - Default value. The event does block time on the calendar. This is equivalent to setting ‘Show me as’ to ‘Busy’ in the Calendar UI.
TRANSPARENT - The event does not block time on the calendar. This is equivalent to setting ‘Show me as’ to ‘Available’ in the Calendar UI.
- OPAQUE = 'opaque'
- TRANSPARENT = 'transparent'