File size: 2,247 Bytes
550665c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
.. _attendees:

Attendees
=========

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

.. code-block:: python

    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

.. code-block:: python

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

You can pass multiple attendees at once in a list.


.. code-block:: python

    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:class:`~gcsa.google_calendar.SendUpdatesMode` for possible values.

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

.. code-block:: python

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

or

.. code-block:: python

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

to add a single attendee.

Use :py:meth:`~gcsa.event.Event.add_attendees` method to add multiple at once:

.. code-block:: python

    event.add_attendees(
        [
            Attendee('attendee@gmail.com',
                display_name='Friend',
                additional_guests=3
            ),
            'attendee_by_email1@gmail.com',
            'attendee_by_email2@gmail.com'
        ]
    )

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