Skip to content

Latest commit

 

History

History
65 lines (43 loc) · 1.72 KB

attendees.rst

File metadata and controls

65 lines (43 loc) · 1.72 KB

Attendees

If you want to add attendee(s) to your event, just create :py~gcsa.attendee.Attendee (s) and pass as an attendees parameter (you can also pass just an email of the attendee and the :py~gcsa.attendee.Attendee will be created for you):

from gcsa.attendee import Attendee

attendee = Attendee(
    'attendee@gmail.com',
    display_name='Friend',
    additional_guests=3
)

event = Event('Meeting',
              start=(17/Jul/2020)[12:00],
              attendees=attendee)

or

event = Event('Meeting',
              start=(17/Jul/2020)[12:00],
              attendees='attendee@gmail.com')

You can pass multiple attendees at once in a list.

event = Event('Meeting',
              start=(17/Jul/2020)[12:00],
              attendees=[
                  'attendee@gmail.com',
                  Attendee('attendee2@gmail.com', display_name='Friend')
              ])

To notify attendees about created/updated/deleted event use send_updates parameter in add_event, update_event, and delete_event methods. See :py~gcsa.google_calendar.SendUpdatesMode for possible values.

To add attendees to an existing event use its :py~gcsa.event.Event.add_attendee method:

event.add_attendee(
        Attendee('attendee@gmail.com',
            display_name='Friend',
            additional_guests=3
        )
)

or

event.add_attendee('attendee@gmail.com')

Update event using :py~gcsa.google_calendar.GoogleCalendar.update_event method to save the changes.