Skip to content

Commit dab756f

Browse files
committed
Added meeting invitees based on generator
1 parent a427827 commit dab756f

File tree

6 files changed

+826
-2
lines changed

6 files changed

+826
-2
lines changed
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
name: MeetingInvitee
2+
endpoint: meetingInvitees
3+
object_type: meetingInvitee
4+
methods:
5+
- list
6+
- get
7+
- create
8+
- delete
9+
- update
10+
query_parameters:
11+
- name: meetingId
12+
description: Unique id of the meeting for which invitees are requested.
13+
optional: False
14+
type: basestring
15+
- name: max
16+
description: Limit the number of meeting invitees
17+
optional: True
18+
type: int
19+
- name: hostEmail
20+
description: Email address for the meeting host (requires admin scope)
21+
optional: True
22+
type: basestring
23+
- name: panelist
24+
description: Filter invitees or attendees based on their panelist status
25+
optional: True
26+
type: bool
27+
create:
28+
required:
29+
- meetingId
30+
- email
31+
optional:
32+
- displayName
33+
- coHost
34+
- name: hostEmail
35+
description: Email address for the meeting host (requires admin scope)
36+
type: basestring
37+
- name: sendEmail
38+
description: If true, send an e-mail to the invitee
39+
type: bool
40+
- panelist
41+
update:
42+
required:
43+
- email
44+
optional:
45+
- displayName
46+
- coHost
47+
- name: hostEmail
48+
description: Email address for the meeting host (requires admin scope)
49+
type: basestring
50+
- name: sendEmail
51+
description: If true, send an e-mail to the invitee
52+
type: bool
53+
- panelist
54+
list:
55+
properties:
56+
- name: id
57+
description: Unique id for meeting invitee
58+
type: basestring
59+
- name: email
60+
description: Email address for the meeting invitee
61+
type: basestring
62+
- name: displayName
63+
description: Display name of the meeting invitee
64+
type: basestring
65+
- name: coHost
66+
description: CoHost status of the invitee
67+
type: bool
68+
- name: meetingId
69+
description: Unique id for the meeting that the invitee is part of
70+
type: basestring
71+
- name: panelist
72+
description: Flag to indicate if the invitee is panelist or not
73+
type: bool
74+
additional_code: >
75+
def bulk(self, meetingId, hostEmail=None, items=None, **request_parameters):
76+
""" Bulk insert meeting invitees
77+
78+
Args:
79+
meetingId(basestring): Id of the meeting the invitees should be added to.
80+
hostEmail(basestring): Email of the meeting host.
81+
items(list): List of invitees. Each invitee is a dict with email as the
82+
required key and displayName, coHost, sendEmail and panelist as optional
83+
properties.
84+
**request_parameters: Additional request parameters (provides
85+
support for parameters that may be added in the future).
86+
87+
Returns:
88+
GeneratorContainer: A GeneratorContainer which, when iterated,
89+
yields the meetingInvitees returned by the Webex query.
90+
91+
Raises:
92+
TypeError: If the parameter types are incorrect.
93+
ApiError: If the Webex Teams cloud returns an error.
94+
"""
95+
check_type(meetingId, basestring)
96+
check_type(hostEmail, basestring, optional=True)
97+
check_type(items, list, optional=True)
98+
99+
post_data = dict_from_items_with_values(
100+
request_parameters,
101+
meetingId=meetingId,
102+
items=items,
103+
hostEmail=hostEmail,
104+
)
105+
106+
# API request
107+
json_data = self._session.put(API_ENDPOINT + '/bulkInsert',
108+
json=post_data)
109+
110+
# Return an object created from the response JSON data
111+
for itm in json_data['items']:
112+
yield self._object_factory(OBJECT_TYPE, itm)
113+
114+
115+

0 commit comments

Comments
 (0)