universal-mcp 0.1.8rc2__py3-none-any.whl → 0.1.8rc4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- universal_mcp/__init__.py +0 -2
- universal_mcp/analytics.py +75 -0
- universal_mcp/applications/ahrefs/README.md +76 -0
- universal_mcp/applications/ahrefs/__init__.py +0 -0
- universal_mcp/applications/ahrefs/app.py +2291 -0
- universal_mcp/applications/application.py +94 -5
- universal_mcp/applications/calendly/app.py +412 -171
- universal_mcp/applications/coda/README.md +133 -0
- universal_mcp/applications/coda/__init__.py +0 -0
- universal_mcp/applications/coda/app.py +3671 -0
- universal_mcp/applications/e2b/app.py +8 -35
- universal_mcp/applications/figma/README.md +74 -0
- universal_mcp/applications/figma/__init__.py +0 -0
- universal_mcp/applications/figma/app.py +1261 -0
- universal_mcp/applications/firecrawl/app.py +3 -33
- universal_mcp/applications/github/app.py +41 -42
- universal_mcp/applications/google_calendar/app.py +20 -31
- universal_mcp/applications/google_docs/app.py +21 -46
- universal_mcp/applications/google_drive/app.py +53 -76
- universal_mcp/applications/google_mail/app.py +40 -56
- universal_mcp/applications/google_sheet/app.py +43 -68
- universal_mcp/applications/markitdown/app.py +4 -4
- universal_mcp/applications/notion/app.py +93 -83
- universal_mcp/applications/perplexity/app.py +4 -38
- universal_mcp/applications/reddit/app.py +32 -32
- universal_mcp/applications/resend/app.py +4 -22
- universal_mcp/applications/serpapi/app.py +6 -32
- universal_mcp/applications/tavily/app.py +4 -24
- universal_mcp/applications/wrike/app.py +565 -237
- universal_mcp/applications/youtube/app.py +625 -183
- universal_mcp/applications/zenquotes/app.py +3 -3
- universal_mcp/exceptions.py +1 -0
- universal_mcp/integrations/__init__.py +11 -2
- universal_mcp/integrations/agentr.py +27 -4
- universal_mcp/integrations/integration.py +14 -6
- universal_mcp/logger.py +3 -56
- universal_mcp/servers/__init__.py +2 -1
- universal_mcp/servers/server.py +73 -77
- universal_mcp/stores/store.py +5 -3
- universal_mcp/tools/__init__.py +1 -1
- universal_mcp/tools/adapters.py +4 -1
- universal_mcp/tools/func_metadata.py +5 -6
- universal_mcp/tools/tools.py +108 -51
- universal_mcp/utils/docgen.py +121 -69
- universal_mcp/utils/docstring_parser.py +44 -21
- universal_mcp/utils/dump_app_tools.py +33 -23
- universal_mcp/utils/installation.py +199 -8
- universal_mcp/utils/openapi.py +121 -47
- {universal_mcp-0.1.8rc2.dist-info → universal_mcp-0.1.8rc4.dist-info}/METADATA +2 -2
- universal_mcp-0.1.8rc4.dist-info/RECORD +81 -0
- universal_mcp-0.1.8rc2.dist-info/RECORD +0 -71
- {universal_mcp-0.1.8rc2.dist-info → universal_mcp-0.1.8rc4.dist-info}/WHEEL +0 -0
- {universal_mcp-0.1.8rc2.dist-info → universal_mcp-0.1.8rc4.dist-info}/entry_points.txt +0 -0
@@ -8,33 +8,23 @@ class CalendlyApp(APIApplication):
|
|
8
8
|
def __init__(self, integration: Integration = None, **kwargs) -> None:
|
9
9
|
"""
|
10
10
|
Initializes a new instance of the Calendly API application with the specified integration and additional configuration options.
|
11
|
-
|
11
|
+
|
12
12
|
Args:
|
13
13
|
integration: An optional Integration object to associate with the Calendly API application. Defaults to None.
|
14
14
|
**kwargs: Arbitrary keyword arguments that are passed to the superclass initializer for additional configuration.
|
15
|
-
|
15
|
+
|
16
16
|
Returns:
|
17
17
|
None
|
18
18
|
"""
|
19
|
-
super().__init__(name=
|
19
|
+
super().__init__(name="calendly", integration=integration, **kwargs)
|
20
20
|
self.base_url = "https://api.calendly.com"
|
21
21
|
|
22
|
-
def
|
23
|
-
|
24
|
-
|
25
|
-
credentials = self.integration.get_credentials()
|
26
|
-
|
27
|
-
if "headers" in credentials:
|
28
|
-
return credentials["headers"]
|
29
|
-
return {
|
30
|
-
"Authorization": f"Bearer {credentials['access_token']}",
|
31
|
-
"Content-Type": "application/json",
|
32
|
-
}
|
33
|
-
|
34
|
-
def list_event_invitees(self, uuid, status=None, sort=None, email=None, page_token=None, count=None) -> dict[str, Any]:
|
22
|
+
def list_event_invitees(
|
23
|
+
self, uuid, status=None, sort=None, email=None, page_token=None, count=None
|
24
|
+
) -> dict[str, Any]:
|
35
25
|
"""
|
36
26
|
Retrieves a list of invitees for a specific scheduled event, optionally filtered and paginated by status, email, sorting order, and paging parameters.
|
37
|
-
|
27
|
+
|
38
28
|
Args:
|
39
29
|
uuid: str. The unique identifier of the scheduled event for which to list invitees.
|
40
30
|
status: Optional[str]. Filter invitees by their invitation status (e.g., accepted, declined, pending).
|
@@ -42,14 +32,24 @@ class CalendlyApp(APIApplication):
|
|
42
32
|
email: Optional[str]. Filter invitees by their email address.
|
43
33
|
page_token: Optional[str]. A token indicating the page of results to retrieve for pagination.
|
44
34
|
count: Optional[int]. The maximum number of invitees to return per page.
|
45
|
-
|
35
|
+
|
46
36
|
Returns:
|
47
37
|
dict[str, Any]: A dictionary containing the list of event invitees and pagination details, as returned by the API.
|
48
38
|
"""
|
49
39
|
if uuid is None:
|
50
40
|
raise ValueError("Missing required parameter 'uuid'")
|
51
41
|
url = f"{self.base_url}/scheduled_events/{uuid}/invitees"
|
52
|
-
query_params = {
|
42
|
+
query_params = {
|
43
|
+
k: v
|
44
|
+
for k, v in [
|
45
|
+
("status", status),
|
46
|
+
("sort", sort),
|
47
|
+
("email", email),
|
48
|
+
("page_token", page_token),
|
49
|
+
("count", count),
|
50
|
+
]
|
51
|
+
if v is not None
|
52
|
+
}
|
53
53
|
response = self._get(url, params=query_params)
|
54
54
|
response.raise_for_status()
|
55
55
|
return response.json()
|
@@ -57,10 +57,10 @@ class CalendlyApp(APIApplication):
|
|
57
57
|
def get_event(self, uuid) -> dict[str, Any]:
|
58
58
|
"""
|
59
59
|
Retrieves the details of a scheduled event given its UUID.
|
60
|
-
|
60
|
+
|
61
61
|
Args:
|
62
62
|
uuid: str. The unique identifier of the scheduled event to retrieve.
|
63
|
-
|
63
|
+
|
64
64
|
Returns:
|
65
65
|
dict[str, Any]: A dictionary containing the scheduled event details as returned by the API.
|
66
66
|
"""
|
@@ -75,11 +75,11 @@ class CalendlyApp(APIApplication):
|
|
75
75
|
def get_event_invitee(self, event_uuid, invitee_uuid) -> dict[str, Any]:
|
76
76
|
"""
|
77
77
|
Retrieves details about a specific invitee for a given scheduled event.
|
78
|
-
|
78
|
+
|
79
79
|
Args:
|
80
80
|
event_uuid: The unique identifier of the scheduled event.
|
81
81
|
invitee_uuid: The unique identifier of the invitee to retrieve.
|
82
|
-
|
82
|
+
|
83
83
|
Returns:
|
84
84
|
A dictionary containing invitee details as returned by the API.
|
85
85
|
"""
|
@@ -93,10 +93,22 @@ class CalendlyApp(APIApplication):
|
|
93
93
|
response.raise_for_status()
|
94
94
|
return response.json()
|
95
95
|
|
96
|
-
def list_events(
|
96
|
+
def list_events(
|
97
|
+
self,
|
98
|
+
user=None,
|
99
|
+
organization=None,
|
100
|
+
invitee_email=None,
|
101
|
+
status=None,
|
102
|
+
sort=None,
|
103
|
+
min_start_time=None,
|
104
|
+
max_start_time=None,
|
105
|
+
page_token=None,
|
106
|
+
count=None,
|
107
|
+
group=None,
|
108
|
+
) -> dict[str, Any]:
|
97
109
|
"""
|
98
110
|
Retrieves a list of scheduled events filtered by optional user, organization, invitee email, status, date range, sorting, and pagination criteria.
|
99
|
-
|
111
|
+
|
100
112
|
Args:
|
101
113
|
user: Optional[str]: The user identifier to filter events by a specific user.
|
102
114
|
organization: Optional[str]: The organization identifier to filter events by a specific organization.
|
@@ -108,12 +120,27 @@ class CalendlyApp(APIApplication):
|
|
108
120
|
page_token: Optional[str]: Token for fetching the next page of results.
|
109
121
|
count: Optional[int]: The maximum number of events to return.
|
110
122
|
group: Optional[str]: Group identifier to filter events by group.
|
111
|
-
|
123
|
+
|
112
124
|
Returns:
|
113
125
|
dict[str, Any]: A dictionary containing the list of scheduled events and associated metadata.
|
114
126
|
"""
|
115
127
|
url = f"{self.base_url}/scheduled_events"
|
116
|
-
query_params = {
|
128
|
+
query_params = {
|
129
|
+
k: v
|
130
|
+
for k, v in [
|
131
|
+
("user", user),
|
132
|
+
("organization", organization),
|
133
|
+
("invitee_email", invitee_email),
|
134
|
+
("status", status),
|
135
|
+
("sort", sort),
|
136
|
+
("min_start_time", min_start_time),
|
137
|
+
("max_start_time", max_start_time),
|
138
|
+
("page_token", page_token),
|
139
|
+
("count", count),
|
140
|
+
("group", group),
|
141
|
+
]
|
142
|
+
if v is not None
|
143
|
+
}
|
117
144
|
response = self._get(url, params=query_params)
|
118
145
|
response.raise_for_status()
|
119
146
|
return response.json()
|
@@ -121,10 +148,10 @@ class CalendlyApp(APIApplication):
|
|
121
148
|
def get_event_type(self, uuid) -> dict[str, Any]:
|
122
149
|
"""
|
123
150
|
Retrieves the event type details for the specified UUID from the API.
|
124
|
-
|
151
|
+
|
125
152
|
Args:
|
126
153
|
uuid: str. The unique identifier of the event type to retrieve.
|
127
|
-
|
154
|
+
|
128
155
|
Returns:
|
129
156
|
dict. A dictionary containing the event type details as returned by the API.
|
130
157
|
"""
|
@@ -136,10 +163,20 @@ class CalendlyApp(APIApplication):
|
|
136
163
|
response.raise_for_status()
|
137
164
|
return response.json()
|
138
165
|
|
139
|
-
def list_user_sevent_types(
|
166
|
+
def list_user_sevent_types(
|
167
|
+
self,
|
168
|
+
active=None,
|
169
|
+
organization=None,
|
170
|
+
user=None,
|
171
|
+
user_availability_schedule=None,
|
172
|
+
sort=None,
|
173
|
+
admin_managed=None,
|
174
|
+
page_token=None,
|
175
|
+
count=None,
|
176
|
+
) -> dict[str, Any]:
|
140
177
|
"""
|
141
178
|
Retrieves a list of user event types with optional filtering, sorting, and pagination parameters.
|
142
|
-
|
179
|
+
|
143
180
|
Args:
|
144
181
|
active: Optional; filter event types by active status (bool or compatible).
|
145
182
|
organization: Optional; filter event types by organization identifier.
|
@@ -149,12 +186,25 @@ class CalendlyApp(APIApplication):
|
|
149
186
|
admin_managed: Optional; filter event types managed by an admin (bool or compatible).
|
150
187
|
page_token: Optional; token for paginating through result pages.
|
151
188
|
count: Optional; maximum number of event types to return.
|
152
|
-
|
189
|
+
|
153
190
|
Returns:
|
154
191
|
A dictionary containing the list of user event types and associated pagination or metadata information.
|
155
192
|
"""
|
156
193
|
url = f"{self.base_url}/event_types"
|
157
|
-
query_params = {
|
194
|
+
query_params = {
|
195
|
+
k: v
|
196
|
+
for k, v in [
|
197
|
+
("active", active),
|
198
|
+
("organization", organization),
|
199
|
+
("user", user),
|
200
|
+
("user_availability_schedule", user_availability_schedule),
|
201
|
+
("sort", sort),
|
202
|
+
("admin_managed", admin_managed),
|
203
|
+
("page_token", page_token),
|
204
|
+
("count", count),
|
205
|
+
]
|
206
|
+
if v is not None
|
207
|
+
}
|
158
208
|
response = self._get(url, params=query_params)
|
159
209
|
response.raise_for_status()
|
160
210
|
return response.json()
|
@@ -162,10 +212,10 @@ class CalendlyApp(APIApplication):
|
|
162
212
|
def get_user(self, uuid) -> dict[str, Any]:
|
163
213
|
"""
|
164
214
|
Retrieves detailed user information for a given UUID from the remote API.
|
165
|
-
|
215
|
+
|
166
216
|
Args:
|
167
217
|
uuid: The unique identifier (UUID) of the user to retrieve.
|
168
|
-
|
218
|
+
|
169
219
|
Returns:
|
170
220
|
A dictionary containing the user's details as returned by the API.
|
171
221
|
"""
|
@@ -177,13 +227,15 @@ class CalendlyApp(APIApplication):
|
|
177
227
|
response.raise_for_status()
|
178
228
|
return response.json()
|
179
229
|
|
180
|
-
def get_current_user(
|
230
|
+
def get_current_user(
|
231
|
+
self,
|
232
|
+
) -> dict[str, Any]:
|
181
233
|
"""
|
182
234
|
Retrieves information about the currently authenticated user from the API.
|
183
|
-
|
235
|
+
|
184
236
|
Args:
|
185
237
|
self: Instance of the class containing API connection details and HTTP methods.
|
186
|
-
|
238
|
+
|
187
239
|
Returns:
|
188
240
|
A dictionary containing the current user's information as returned by the API.
|
189
241
|
"""
|
@@ -193,10 +245,12 @@ class CalendlyApp(APIApplication):
|
|
193
245
|
response.raise_for_status()
|
194
246
|
return response.json()
|
195
247
|
|
196
|
-
def list_organization_invitations(
|
248
|
+
def list_organization_invitations(
|
249
|
+
self, uuid, count=None, page_token=None, sort=None, email=None, status=None
|
250
|
+
) -> dict[str, Any]:
|
197
251
|
"""
|
198
252
|
Retrieves a paginated list of invitations for a specified organization, with optional filtering and sorting.
|
199
|
-
|
253
|
+
|
200
254
|
Args:
|
201
255
|
uuid: str. Unique identifier of the organization whose invitations are to be listed.
|
202
256
|
count: Optional[int]. Maximum number of invitations to return per page.
|
@@ -204,14 +258,24 @@ class CalendlyApp(APIApplication):
|
|
204
258
|
sort: Optional[str]. Sorting criteria for the invitations (e.g., by date or status).
|
205
259
|
email: Optional[str]. Filter invitations sent to a specific email address.
|
206
260
|
status: Optional[str]. Filter invitations by their status (e.g., pending, accepted, expired).
|
207
|
-
|
261
|
+
|
208
262
|
Returns:
|
209
263
|
dict[str, Any]: A dictionary containing the list of organization invitations and pagination information.
|
210
264
|
"""
|
211
265
|
if uuid is None:
|
212
266
|
raise ValueError("Missing required parameter 'uuid'")
|
213
267
|
url = f"{self.base_url}/organizations/{uuid}/invitations"
|
214
|
-
query_params = {
|
268
|
+
query_params = {
|
269
|
+
k: v
|
270
|
+
for k, v in [
|
271
|
+
("count", count),
|
272
|
+
("page_token", page_token),
|
273
|
+
("sort", sort),
|
274
|
+
("email", email),
|
275
|
+
("status", status),
|
276
|
+
]
|
277
|
+
if v is not None
|
278
|
+
}
|
215
279
|
response = self._get(url, params=query_params)
|
216
280
|
response.raise_for_status()
|
217
281
|
return response.json()
|
@@ -219,18 +283,18 @@ class CalendlyApp(APIApplication):
|
|
219
283
|
def invite_user_to_organization(self, uuid, email=None) -> dict[str, Any]:
|
220
284
|
"""
|
221
285
|
Sends an invitation to a specified email address to join an organization identified by its UUID.
|
222
|
-
|
286
|
+
|
223
287
|
Args:
|
224
288
|
uuid: str. The unique identifier of the organization to which the user is being invited.
|
225
289
|
email: Optional[str]. The email address of the user to invite. If None, the invite is created without an email.
|
226
|
-
|
290
|
+
|
227
291
|
Returns:
|
228
292
|
dict[str, Any]. A dictionary containing the JSON response from the API after sending the invitation.
|
229
293
|
"""
|
230
294
|
if uuid is None:
|
231
295
|
raise ValueError("Missing required parameter 'uuid'")
|
232
296
|
request_body = {
|
233
|
-
|
297
|
+
"email": email,
|
234
298
|
}
|
235
299
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
236
300
|
url = f"{self.base_url}/organizations/{uuid}/invitations"
|
@@ -242,11 +306,11 @@ class CalendlyApp(APIApplication):
|
|
242
306
|
def get_organization_invitation(self, org_uuid, uuid) -> dict[str, Any]:
|
243
307
|
"""
|
244
308
|
Retrieves a specific invitation for an organization using its unique identifiers.
|
245
|
-
|
309
|
+
|
246
310
|
Args:
|
247
311
|
org_uuid: str. The unique identifier of the organization whose invitation is to be retrieved.
|
248
312
|
uuid: str. The unique identifier of the invitation to fetch.
|
249
|
-
|
313
|
+
|
250
314
|
Returns:
|
251
315
|
dict. A dictionary containing the invitation details as returned by the API.
|
252
316
|
"""
|
@@ -263,11 +327,11 @@ class CalendlyApp(APIApplication):
|
|
263
327
|
def revoke_user_sorganization_invitation(self, org_uuid, uuid) -> Any:
|
264
328
|
"""
|
265
329
|
Revokes a user's invitation to an organization by deleting the specified invitation resource.
|
266
|
-
|
330
|
+
|
267
331
|
Args:
|
268
332
|
org_uuid: The unique identifier of the organization from which the user's invitation will be revoked.
|
269
333
|
uuid: The unique identifier of the invitation to be revoked.
|
270
|
-
|
334
|
+
|
271
335
|
Returns:
|
272
336
|
The JSON response from the API after successfully revoking the invitation.
|
273
337
|
"""
|
@@ -284,10 +348,10 @@ class CalendlyApp(APIApplication):
|
|
284
348
|
def get_organization_membership(self, uuid) -> dict[str, Any]:
|
285
349
|
"""
|
286
350
|
Retrieves the membership information for a specified organization membership UUID.
|
287
|
-
|
351
|
+
|
288
352
|
Args:
|
289
353
|
uuid: str. The unique identifier of the organization membership to retrieve.
|
290
|
-
|
354
|
+
|
291
355
|
Returns:
|
292
356
|
dict. A dictionary containing the organization membership details as returned by the API.
|
293
357
|
"""
|
@@ -302,10 +366,10 @@ class CalendlyApp(APIApplication):
|
|
302
366
|
def remove_user_from_organization(self, uuid) -> Any:
|
303
367
|
"""
|
304
368
|
Removes a user from the organization by deleting their membership using the specified UUID.
|
305
|
-
|
369
|
+
|
306
370
|
Args:
|
307
371
|
uuid: str. The unique identifier of the organization membership to remove.
|
308
|
-
|
372
|
+
|
309
373
|
Returns:
|
310
374
|
dict. The response data from the organization membership removal request.
|
311
375
|
"""
|
@@ -317,22 +381,34 @@ class CalendlyApp(APIApplication):
|
|
317
381
|
response.raise_for_status()
|
318
382
|
return response.json()
|
319
383
|
|
320
|
-
def list_organization_memberships(
|
384
|
+
def list_organization_memberships(
|
385
|
+
self, page_token=None, count=None, email=None, organization=None, user=None
|
386
|
+
) -> dict[str, Any]:
|
321
387
|
"""
|
322
388
|
Retrieves a list of organization memberships, optionally filtered by pagination, email, organization, or user parameters.
|
323
|
-
|
389
|
+
|
324
390
|
Args:
|
325
391
|
page_token: Optional; A string token to specify the page of results to retrieve for pagination.
|
326
392
|
count: Optional; An integer specifying the maximum number of memberships to return.
|
327
393
|
email: Optional; A string to filter memberships by user email address.
|
328
394
|
organization: Optional; A string to filter memberships by organization identifier.
|
329
395
|
user: Optional; A string to filter memberships by user identifier.
|
330
|
-
|
396
|
+
|
331
397
|
Returns:
|
332
398
|
A dictionary containing the organization membership data returned by the API.
|
333
399
|
"""
|
334
400
|
url = f"{self.base_url}/organization_memberships"
|
335
|
-
query_params = {
|
401
|
+
query_params = {
|
402
|
+
k: v
|
403
|
+
for k, v in [
|
404
|
+
("page_token", page_token),
|
405
|
+
("count", count),
|
406
|
+
("email", email),
|
407
|
+
("organization", organization),
|
408
|
+
("user", user),
|
409
|
+
]
|
410
|
+
if v is not None
|
411
|
+
}
|
336
412
|
response = self._get(url, params=query_params)
|
337
413
|
response.raise_for_status()
|
338
414
|
return response.json()
|
@@ -340,10 +416,10 @@ class CalendlyApp(APIApplication):
|
|
340
416
|
def get_webhook_subscription(self, webhook_uuid) -> dict[str, Any]:
|
341
417
|
"""
|
342
418
|
Retrieves the details of a webhook subscription identified by its UUID.
|
343
|
-
|
419
|
+
|
344
420
|
Args:
|
345
421
|
webhook_uuid: The unique identifier (UUID) of the webhook subscription to retrieve.
|
346
|
-
|
422
|
+
|
347
423
|
Returns:
|
348
424
|
A dictionary containing the webhook subscription details as returned by the API.
|
349
425
|
"""
|
@@ -358,10 +434,10 @@ class CalendlyApp(APIApplication):
|
|
358
434
|
def delete_webhook_subscription(self, webhook_uuid) -> Any:
|
359
435
|
"""
|
360
436
|
Deletes a webhook subscription identified by its UUID.
|
361
|
-
|
437
|
+
|
362
438
|
Args:
|
363
439
|
webhook_uuid: The unique identifier (UUID) of the webhook subscription to delete.
|
364
|
-
|
440
|
+
|
365
441
|
Returns:
|
366
442
|
The JSON-decoded response from the server after deleting the webhook subscription.
|
367
443
|
"""
|
@@ -373,10 +449,18 @@ class CalendlyApp(APIApplication):
|
|
373
449
|
response.raise_for_status()
|
374
450
|
return response.json()
|
375
451
|
|
376
|
-
def list_webhook_subscriptions(
|
452
|
+
def list_webhook_subscriptions(
|
453
|
+
self,
|
454
|
+
organization=None,
|
455
|
+
user=None,
|
456
|
+
page_token=None,
|
457
|
+
count=None,
|
458
|
+
sort=None,
|
459
|
+
scope=None,
|
460
|
+
) -> dict[str, Any]:
|
377
461
|
"""
|
378
462
|
Retrieves a list of webhook subscriptions, optionally filtered and paginated based on input criteria.
|
379
|
-
|
463
|
+
|
380
464
|
Args:
|
381
465
|
organization: Optional; str or None. Identifier of the organization to filter subscriptions by organization.
|
382
466
|
user: Optional; str or None. Identifier of the user to filter subscriptions created by a specific user.
|
@@ -384,20 +468,40 @@ class CalendlyApp(APIApplication):
|
|
384
468
|
count: Optional; int or None. Maximum number of subscriptions to return in the response.
|
385
469
|
sort: Optional; str or None. Sorting order for the returned subscriptions.
|
386
470
|
scope: Optional; str or None. Scope to filter webhook subscriptions.
|
387
|
-
|
471
|
+
|
388
472
|
Returns:
|
389
473
|
dict: A dictionary containing the list of webhook subscriptions matching the query parameters and any associated metadata (e.g., paging info).
|
390
474
|
"""
|
391
475
|
url = f"{self.base_url}/webhook_subscriptions"
|
392
|
-
query_params = {
|
476
|
+
query_params = {
|
477
|
+
k: v
|
478
|
+
for k, v in [
|
479
|
+
("organization", organization),
|
480
|
+
("user", user),
|
481
|
+
("page_token", page_token),
|
482
|
+
("count", count),
|
483
|
+
("sort", sort),
|
484
|
+
("scope", scope),
|
485
|
+
]
|
486
|
+
if v is not None
|
487
|
+
}
|
393
488
|
response = self._get(url, params=query_params)
|
394
489
|
response.raise_for_status()
|
395
490
|
return response.json()
|
396
491
|
|
397
|
-
def create_webhook_subscription(
|
492
|
+
def create_webhook_subscription(
|
493
|
+
self,
|
494
|
+
events=None,
|
495
|
+
group=None,
|
496
|
+
organization=None,
|
497
|
+
scope=None,
|
498
|
+
signing_key=None,
|
499
|
+
url=None,
|
500
|
+
user=None,
|
501
|
+
) -> dict[str, Any]:
|
398
502
|
"""
|
399
503
|
Creates a new webhook subscription with the specified parameters and returns the subscription details as a dictionary.
|
400
|
-
|
504
|
+
|
401
505
|
Args:
|
402
506
|
events: Optional[list[str]]; A list of event names that will trigger the webhook.
|
403
507
|
group: Optional[str]; The group identifier to which the webhook is scoped.
|
@@ -406,18 +510,18 @@ class CalendlyApp(APIApplication):
|
|
406
510
|
signing_key: Optional[str]; The key used to sign webhook payloads for verification.
|
407
511
|
url: Optional[str]; The URL endpoint to which the webhook events will be delivered.
|
408
512
|
user: Optional[str]; The user identifier associated with this webhook subscription.
|
409
|
-
|
513
|
+
|
410
514
|
Returns:
|
411
515
|
dict[str, Any]: A dictionary containing the details of the created webhook subscription as returned by the API.
|
412
516
|
"""
|
413
517
|
request_body = {
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
518
|
+
"events": events,
|
519
|
+
"group": group,
|
520
|
+
"organization": organization,
|
521
|
+
"scope": scope,
|
522
|
+
"signing_key": signing_key,
|
523
|
+
"url": url,
|
524
|
+
"user": user,
|
421
525
|
}
|
422
526
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
423
527
|
url = f"{self.base_url}/webhook_subscriptions"
|
@@ -426,22 +530,24 @@ class CalendlyApp(APIApplication):
|
|
426
530
|
response.raise_for_status()
|
427
531
|
return response.json()
|
428
532
|
|
429
|
-
def create_single_use_scheduling_link(
|
533
|
+
def create_single_use_scheduling_link(
|
534
|
+
self, max_event_count=None, owner=None, owner_type=None
|
535
|
+
) -> dict[str, Any]:
|
430
536
|
"""
|
431
537
|
Creates a single-use scheduling link by sending a POST request with optional restrictions.
|
432
|
-
|
538
|
+
|
433
539
|
Args:
|
434
540
|
max_event_count: Optional; int or None. The maximum number of events that can be scheduled using the link.
|
435
541
|
owner: Optional; str or None. The identifier for the owner of the scheduling link.
|
436
542
|
owner_type: Optional; str or None. The type of the owner (e.g., 'user', 'team').
|
437
|
-
|
543
|
+
|
438
544
|
Returns:
|
439
545
|
dict[str, Any]: The response data from the scheduling link creation API as a dictionary.
|
440
546
|
"""
|
441
547
|
request_body = {
|
442
|
-
|
443
|
-
|
444
|
-
|
548
|
+
"max_event_count": max_event_count,
|
549
|
+
"owner": owner,
|
550
|
+
"owner_type": owner_type,
|
445
551
|
}
|
446
552
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
447
553
|
url = f"{self.base_url}/scheduling_links"
|
@@ -453,15 +559,15 @@ class CalendlyApp(APIApplication):
|
|
453
559
|
def delete_invitee_data(self, emails=None) -> dict[str, Any]:
|
454
560
|
"""
|
455
561
|
Deletes invitee data for the specified email addresses by sending a POST request to the data compliance API.
|
456
|
-
|
562
|
+
|
457
563
|
Args:
|
458
564
|
emails: Optional list of email addresses (list[str] or None) to identify the invitees whose data should be deleted. If None, no emails are included in the request.
|
459
|
-
|
565
|
+
|
460
566
|
Returns:
|
461
567
|
A dictionary containing the JSON response from the API indicating the result of the deletion request.
|
462
568
|
"""
|
463
569
|
request_body = {
|
464
|
-
|
570
|
+
"emails": emails,
|
465
571
|
}
|
466
572
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
467
573
|
url = f"{self.base_url}/data_compliance/deletion/invitees"
|
@@ -470,20 +576,22 @@ class CalendlyApp(APIApplication):
|
|
470
576
|
response.raise_for_status()
|
471
577
|
return response.json()
|
472
578
|
|
473
|
-
def delete_scheduled_event_data(
|
579
|
+
def delete_scheduled_event_data(
|
580
|
+
self, end_time=None, start_time=None
|
581
|
+
) -> dict[str, Any]:
|
474
582
|
"""
|
475
583
|
Deletes scheduled event data within the specified time range by sending a deletion request to the data compliance service.
|
476
|
-
|
584
|
+
|
477
585
|
Args:
|
478
586
|
end_time: Optional; The end of the time interval for which scheduled event data should be deleted. If None, no upper bound is set.
|
479
587
|
start_time: Optional; The start of the time interval for which scheduled event data should be deleted. If None, no lower bound is set.
|
480
|
-
|
588
|
+
|
481
589
|
Returns:
|
482
590
|
A dictionary containing the response from the data compliance deletion endpoint.
|
483
591
|
"""
|
484
592
|
request_body = {
|
485
|
-
|
486
|
-
|
593
|
+
"end_time": end_time,
|
594
|
+
"start_time": start_time,
|
487
595
|
}
|
488
596
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
489
597
|
url = f"{self.base_url}/data_compliance/deletion/events"
|
@@ -495,10 +603,10 @@ class CalendlyApp(APIApplication):
|
|
495
603
|
def get_invitee_no_show(self, uuid) -> dict[str, Any]:
|
496
604
|
"""
|
497
605
|
Retrieves details about an invitee who did not show up for a scheduled event, identified by a unique UUID.
|
498
|
-
|
606
|
+
|
499
607
|
Args:
|
500
608
|
uuid: The unique identifier (UUID) of the invitee no-show to retrieve.
|
501
|
-
|
609
|
+
|
502
610
|
Returns:
|
503
611
|
A dictionary containing details of the invitee no-show record.
|
504
612
|
"""
|
@@ -513,10 +621,10 @@ class CalendlyApp(APIApplication):
|
|
513
621
|
def delete_invitee_no_show(self, uuid) -> Any:
|
514
622
|
"""
|
515
623
|
Deletes an invitee no-show record identified by the given UUID.
|
516
|
-
|
624
|
+
|
517
625
|
Args:
|
518
626
|
uuid: The unique identifier (UUID) of the invitee no-show to delete. Must not be None.
|
519
|
-
|
627
|
+
|
520
628
|
Returns:
|
521
629
|
The response data as a JSON object after successfully deleting the invitee no-show record.
|
522
630
|
"""
|
@@ -531,15 +639,15 @@ class CalendlyApp(APIApplication):
|
|
531
639
|
def create_invitee_no_show(self, invitee=None) -> dict[str, Any]:
|
532
640
|
"""
|
533
641
|
Creates an invitee no-show record by sending a POST request to the invitee_no_shows endpoint.
|
534
|
-
|
642
|
+
|
535
643
|
Args:
|
536
644
|
invitee: Optional; information about the invitee to be included in the request body. If None, the invitee field is omitted.
|
537
|
-
|
645
|
+
|
538
646
|
Returns:
|
539
647
|
A dictionary containing the server's JSON response to the creation request.
|
540
648
|
"""
|
541
649
|
request_body = {
|
542
|
-
|
650
|
+
"invitee": invitee,
|
543
651
|
}
|
544
652
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
545
653
|
url = f"{self.base_url}/invitee_no_shows"
|
@@ -551,10 +659,10 @@ class CalendlyApp(APIApplication):
|
|
551
659
|
def get_group(self, uuid) -> dict[str, Any]:
|
552
660
|
"""
|
553
661
|
Retrieves information for a group identified by its UUID from the server.
|
554
|
-
|
662
|
+
|
555
663
|
Args:
|
556
664
|
uuid: The unique identifier (UUID) of the group to retrieve.
|
557
|
-
|
665
|
+
|
558
666
|
Returns:
|
559
667
|
A dictionary containing the group's details as returned by the server.
|
560
668
|
"""
|
@@ -566,20 +674,30 @@ class CalendlyApp(APIApplication):
|
|
566
674
|
response.raise_for_status()
|
567
675
|
return response.json()
|
568
676
|
|
569
|
-
def list_groups(
|
677
|
+
def list_groups(
|
678
|
+
self, organization=None, page_token=None, count=None
|
679
|
+
) -> dict[str, Any]:
|
570
680
|
"""
|
571
681
|
Retrieves a list of groups from the API, optionally filtered by organization and paginated using a page token and count.
|
572
|
-
|
682
|
+
|
573
683
|
Args:
|
574
684
|
organization: Optional; a string specifying the organization to filter the groups by.
|
575
685
|
page_token: Optional; a string token indicating the page of results to retrieve for pagination.
|
576
686
|
count: Optional; an integer specifying the maximum number of groups to return.
|
577
|
-
|
687
|
+
|
578
688
|
Returns:
|
579
689
|
A dictionary containing the JSON response from the API with the list of groups and any relevant pagination details.
|
580
690
|
"""
|
581
691
|
url = f"{self.base_url}/groups"
|
582
|
-
query_params = {
|
692
|
+
query_params = {
|
693
|
+
k: v
|
694
|
+
for k, v in [
|
695
|
+
("organization", organization),
|
696
|
+
("page_token", page_token),
|
697
|
+
("count", count),
|
698
|
+
]
|
699
|
+
if v is not None
|
700
|
+
}
|
583
701
|
response = self._get(url, params=query_params)
|
584
702
|
response.raise_for_status()
|
585
703
|
return response.json()
|
@@ -587,10 +705,10 @@ class CalendlyApp(APIApplication):
|
|
587
705
|
def get_group_relationship(self, uuid) -> dict[str, Any]:
|
588
706
|
"""
|
589
707
|
Retrieves the relationship information for a group specified by UUID from the API.
|
590
|
-
|
708
|
+
|
591
709
|
Args:
|
592
710
|
uuid: The unique identifier (UUID) of the group whose relationship data is to be retrieved.
|
593
|
-
|
711
|
+
|
594
712
|
Returns:
|
595
713
|
A dictionary containing the group relationship information as returned by the API.
|
596
714
|
"""
|
@@ -602,22 +720,34 @@ class CalendlyApp(APIApplication):
|
|
602
720
|
response.raise_for_status()
|
603
721
|
return response.json()
|
604
722
|
|
605
|
-
def list_group_relationships(
|
723
|
+
def list_group_relationships(
|
724
|
+
self, count=None, page_token=None, organization=None, owner=None, group=None
|
725
|
+
) -> dict[str, Any]:
|
606
726
|
"""
|
607
727
|
Retrieves a list of group relationships from the server, optionally filtered by pagination and various group ownership parameters.
|
608
|
-
|
728
|
+
|
609
729
|
Args:
|
610
730
|
count: Optional; Maximum number of records to retrieve. Used for pagination.
|
611
731
|
page_token: Optional; Token indicating the page of results to retrieve. Used for pagination.
|
612
732
|
organization: Optional; Filter relationships to a specific organization.
|
613
733
|
owner: Optional; Filter relationships by the owner's identifier.
|
614
734
|
group: Optional; Filter relationships by the group's identifier.
|
615
|
-
|
735
|
+
|
616
736
|
Returns:
|
617
737
|
A dictionary containing the JSON response from the server, typically including metadata and a list of group relationships.
|
618
738
|
"""
|
619
739
|
url = f"{self.base_url}/group_relationships"
|
620
|
-
query_params = {
|
740
|
+
query_params = {
|
741
|
+
k: v
|
742
|
+
for k, v in [
|
743
|
+
("count", count),
|
744
|
+
("page_token", page_token),
|
745
|
+
("organization", organization),
|
746
|
+
("owner", owner),
|
747
|
+
("group", group),
|
748
|
+
]
|
749
|
+
if v is not None
|
750
|
+
}
|
621
751
|
response = self._get(url, params=query_params)
|
622
752
|
response.raise_for_status()
|
623
753
|
return response.json()
|
@@ -625,10 +755,10 @@ class CalendlyApp(APIApplication):
|
|
625
755
|
def get_routing_form(self, uuid) -> dict[str, Any]:
|
626
756
|
"""
|
627
757
|
Retrieves a routing form by its unique identifier from the server.
|
628
|
-
|
758
|
+
|
629
759
|
Args:
|
630
760
|
uuid: The unique identifier of the routing form to retrieve.
|
631
|
-
|
761
|
+
|
632
762
|
Returns:
|
633
763
|
A dictionary representing the routing form data retrieved from the server.
|
634
764
|
"""
|
@@ -640,21 +770,32 @@ class CalendlyApp(APIApplication):
|
|
640
770
|
response.raise_for_status()
|
641
771
|
return response.json()
|
642
772
|
|
643
|
-
def list_routing_forms(
|
773
|
+
def list_routing_forms(
|
774
|
+
self, organization=None, count=None, page_token=None, sort=None
|
775
|
+
) -> dict[str, Any]:
|
644
776
|
"""
|
645
777
|
Retrieves a paginated list of routing forms from the API, optionally filtered and sorted by organization, count, page token, or sort order.
|
646
|
-
|
778
|
+
|
647
779
|
Args:
|
648
780
|
organization: Optional[str]. The organization identifier to filter the routing forms by. If None, no filtering by organization is applied.
|
649
781
|
count: Optional[int]. The maximum number of routing forms to return. If None, the default API pagination size is used.
|
650
782
|
page_token: Optional[str]. A token indicating the page of results to retrieve for pagination. If None, retrieves the first page.
|
651
783
|
sort: Optional[str]. The sorting order to apply to the results. If None, uses the API's default sorting.
|
652
|
-
|
784
|
+
|
653
785
|
Returns:
|
654
786
|
dict[str, Any]: A dictionary containing the list of routing forms and associated metadata as provided by the API response.
|
655
787
|
"""
|
656
788
|
url = f"{self.base_url}/routing_forms"
|
657
|
-
query_params = {
|
789
|
+
query_params = {
|
790
|
+
k: v
|
791
|
+
for k, v in [
|
792
|
+
("organization", organization),
|
793
|
+
("count", count),
|
794
|
+
("page_token", page_token),
|
795
|
+
("sort", sort),
|
796
|
+
]
|
797
|
+
if v is not None
|
798
|
+
}
|
658
799
|
response = self._get(url, params=query_params)
|
659
800
|
response.raise_for_status()
|
660
801
|
return response.json()
|
@@ -662,10 +803,10 @@ class CalendlyApp(APIApplication):
|
|
662
803
|
def get_routing_form_submission(self, uuid) -> dict[str, Any]:
|
663
804
|
"""
|
664
805
|
Retrieves a routing form submission by its unique identifier (UUID) from the configured API endpoint.
|
665
|
-
|
806
|
+
|
666
807
|
Args:
|
667
808
|
uuid: The unique identifier of the routing form submission to retrieve. Must not be None.
|
668
|
-
|
809
|
+
|
669
810
|
Returns:
|
670
811
|
A dictionary containing the routing form submission data retrieved from the API.
|
671
812
|
"""
|
@@ -677,47 +818,80 @@ class CalendlyApp(APIApplication):
|
|
677
818
|
response.raise_for_status()
|
678
819
|
return response.json()
|
679
820
|
|
680
|
-
def list_routing_form_submissions(
|
821
|
+
def list_routing_form_submissions(
|
822
|
+
self, form=None, count=None, page_token=None, sort=None
|
823
|
+
) -> dict[str, Any]:
|
681
824
|
"""
|
682
825
|
Retrieves a list of routing form submissions, optionally filtered and paginated based on provided parameters.
|
683
|
-
|
826
|
+
|
684
827
|
Args:
|
685
828
|
form: Optional; the identifier of the form to filter submissions by (default is None).
|
686
829
|
count: Optional; the maximum number of submissions to return (default is None).
|
687
830
|
page_token: Optional; token for pagination to retrieve the next set of results (default is None).
|
688
831
|
sort: Optional; sorting preference for the submissions (default is None).
|
689
|
-
|
832
|
+
|
690
833
|
Returns:
|
691
834
|
A dictionary containing the retrieved routing form submissions and related metadata.
|
692
835
|
"""
|
693
836
|
url = f"{self.base_url}/routing_form_submissions"
|
694
|
-
query_params = {
|
837
|
+
query_params = {
|
838
|
+
k: v
|
839
|
+
for k, v in [
|
840
|
+
("form", form),
|
841
|
+
("count", count),
|
842
|
+
("page_token", page_token),
|
843
|
+
("sort", sort),
|
844
|
+
]
|
845
|
+
if v is not None
|
846
|
+
}
|
695
847
|
response = self._get(url, params=query_params)
|
696
848
|
response.raise_for_status()
|
697
849
|
return response.json()
|
698
850
|
|
699
|
-
def list_event_type_available_times(
|
851
|
+
def list_event_type_available_times(
|
852
|
+
self, event_type=None, start_time=None, end_time=None
|
853
|
+
) -> dict[str, Any]:
|
700
854
|
"""
|
701
855
|
Retrieves available times for a specified event type within an optional date and time range.
|
702
|
-
|
856
|
+
|
703
857
|
Args:
|
704
858
|
event_type: Optional; the type of event to filter available times for. If None, retrieves times for all event types.
|
705
859
|
start_time: Optional; the earliest datetime to include in the results, in an accepted string or datetime format. If None, no lower bound is applied.
|
706
860
|
end_time: Optional; the latest datetime to include in the results, in an accepted string or datetime format. If None, no upper bound is applied.
|
707
|
-
|
861
|
+
|
708
862
|
Returns:
|
709
863
|
A dictionary containing the available times for the specified event type within the given range, as returned by the API.
|
710
864
|
"""
|
711
865
|
url = f"{self.base_url}/event_type_available_times"
|
712
|
-
query_params = {
|
866
|
+
query_params = {
|
867
|
+
k: v
|
868
|
+
for k, v in [
|
869
|
+
("event_type", event_type),
|
870
|
+
("start_time", start_time),
|
871
|
+
("end_time", end_time),
|
872
|
+
]
|
873
|
+
if v is not None
|
874
|
+
}
|
713
875
|
response = self._get(url, params=query_params)
|
714
876
|
response.raise_for_status()
|
715
877
|
return response.json()
|
716
878
|
|
717
|
-
def list_activity_log_entries(
|
879
|
+
def list_activity_log_entries(
|
880
|
+
self,
|
881
|
+
organization=None,
|
882
|
+
search_term=None,
|
883
|
+
actor=None,
|
884
|
+
sort=None,
|
885
|
+
min_occurred_at=None,
|
886
|
+
max_occurred_at=None,
|
887
|
+
page_token=None,
|
888
|
+
count=None,
|
889
|
+
namespace=None,
|
890
|
+
action=None,
|
891
|
+
) -> dict[str, Any]:
|
718
892
|
"""
|
719
893
|
Retrieves a list of activity log entries with optional filtering, sorting, and pagination.
|
720
|
-
|
894
|
+
|
721
895
|
Args:
|
722
896
|
organization: Optional; organization identifier to filter log entries by a specific organization.
|
723
897
|
search_term: Optional; term to search for in the activity log entries.
|
@@ -729,20 +903,47 @@ class CalendlyApp(APIApplication):
|
|
729
903
|
count: Optional; maximum number of entries to return.
|
730
904
|
namespace: Optional; filter results by a specific namespace.
|
731
905
|
action: Optional; filter results by a specific action performed.
|
732
|
-
|
906
|
+
|
733
907
|
Returns:
|
734
908
|
A dictionary containing a list of activity log entries and any associated pagination metadata.
|
735
909
|
"""
|
736
910
|
url = f"{self.base_url}/activity_log_entries"
|
737
|
-
query_params = {
|
911
|
+
query_params = {
|
912
|
+
k: v
|
913
|
+
for k, v in [
|
914
|
+
("organization", organization),
|
915
|
+
("search_term", search_term),
|
916
|
+
("actor", actor),
|
917
|
+
("sort", sort),
|
918
|
+
("min_occurred_at", min_occurred_at),
|
919
|
+
("max_occurred_at", max_occurred_at),
|
920
|
+
("page_token", page_token),
|
921
|
+
("count", count),
|
922
|
+
("namespace", namespace),
|
923
|
+
("action", action),
|
924
|
+
]
|
925
|
+
if v is not None
|
926
|
+
}
|
738
927
|
response = self._get(url, params=query_params)
|
739
928
|
response.raise_for_status()
|
740
929
|
return response.json()
|
741
930
|
|
742
|
-
def create_share(
|
931
|
+
def create_share(
|
932
|
+
self,
|
933
|
+
availability_rule=None,
|
934
|
+
duration=None,
|
935
|
+
end_date=None,
|
936
|
+
event_type=None,
|
937
|
+
hide_location=None,
|
938
|
+
location_configurations=None,
|
939
|
+
max_booking_time=None,
|
940
|
+
name=None,
|
941
|
+
period_type=None,
|
942
|
+
start_date=None,
|
943
|
+
) -> dict[str, Any]:
|
743
944
|
"""
|
744
945
|
Creates a new share with the specified configuration parameters by making a POST request to the shares API endpoint.
|
745
|
-
|
946
|
+
|
746
947
|
Args:
|
747
948
|
availability_rule: Optional; rule defining the availability for the share.
|
748
949
|
duration: Optional; duration of the event or booking in minutes.
|
@@ -754,21 +955,21 @@ class CalendlyApp(APIApplication):
|
|
754
955
|
name: Optional; name of the share.
|
755
956
|
period_type: Optional; type of period (e.g., recurring, single).
|
756
957
|
start_date: Optional; start date for the share's availability.
|
757
|
-
|
958
|
+
|
758
959
|
Returns:
|
759
960
|
A dictionary containing the JSON response from the API with details of the created share.
|
760
961
|
"""
|
761
962
|
request_body = {
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
|
768
|
-
|
769
|
-
|
770
|
-
|
771
|
-
|
963
|
+
"availability_rule": availability_rule,
|
964
|
+
"duration": duration,
|
965
|
+
"end_date": end_date,
|
966
|
+
"event_type": event_type,
|
967
|
+
"hide_location": hide_location,
|
968
|
+
"location_configurations": location_configurations,
|
969
|
+
"max_booking_time": max_booking_time,
|
970
|
+
"name": name,
|
971
|
+
"period_type": period_type,
|
972
|
+
"start_date": start_date,
|
772
973
|
}
|
773
974
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
774
975
|
url = f"{self.base_url}/shares"
|
@@ -777,20 +978,30 @@ class CalendlyApp(APIApplication):
|
|
777
978
|
response.raise_for_status()
|
778
979
|
return response.json()
|
779
980
|
|
780
|
-
def list_user_busy_times(
|
981
|
+
def list_user_busy_times(
|
982
|
+
self, user=None, start_time=None, end_time=None
|
983
|
+
) -> dict[str, Any]:
|
781
984
|
"""
|
782
985
|
Retrieves a list of busy time intervals for a specified user within an optional date range.
|
783
|
-
|
986
|
+
|
784
987
|
Args:
|
785
988
|
user: Optional; The identifier of the user whose busy times are to be listed. If None, retrieves busy times for all users.
|
786
989
|
start_time: Optional; The start of the time range (ISO 8601 format). Only busy times starting at or after this time are included. If None, no lower bound is applied.
|
787
990
|
end_time: Optional; The end of the time range (ISO 8601 format). Only busy times ending before or at this time are included. If None, no upper bound is applied.
|
788
|
-
|
991
|
+
|
789
992
|
Returns:
|
790
993
|
A dictionary containing the user's busy time intervals and related metadata as returned by the API.
|
791
994
|
"""
|
792
995
|
url = f"{self.base_url}/user_busy_times"
|
793
|
-
query_params = {
|
996
|
+
query_params = {
|
997
|
+
k: v
|
998
|
+
for k, v in [
|
999
|
+
("user", user),
|
1000
|
+
("start_time", start_time),
|
1001
|
+
("end_time", end_time),
|
1002
|
+
]
|
1003
|
+
if v is not None
|
1004
|
+
}
|
794
1005
|
response = self._get(url, params=query_params)
|
795
1006
|
response.raise_for_status()
|
796
1007
|
return response.json()
|
@@ -798,10 +1009,10 @@ class CalendlyApp(APIApplication):
|
|
798
1009
|
def get_user_availability_schedule(self, uuid) -> dict[str, Any]:
|
799
1010
|
"""
|
800
1011
|
Retrieves the availability schedule for a user identified by the given UUID.
|
801
|
-
|
1012
|
+
|
802
1013
|
Args:
|
803
1014
|
uuid: str. The UUID of the user whose availability schedule is to be retrieved.
|
804
|
-
|
1015
|
+
|
805
1016
|
Returns:
|
806
1017
|
dict[str, Any]: A dictionary containing the user's availability schedule as returned by the API.
|
807
1018
|
"""
|
@@ -816,41 +1027,60 @@ class CalendlyApp(APIApplication):
|
|
816
1027
|
def list_user_availability_schedules(self, user=None) -> dict[str, Any]:
|
817
1028
|
"""
|
818
1029
|
Retrieves a list of user availability schedules from the API, optionally filtering by a specific user.
|
819
|
-
|
1030
|
+
|
820
1031
|
Args:
|
821
1032
|
user: Optional; a string representing the user identifier to filter the availability schedules. If None, schedules for all users are retrieved.
|
822
|
-
|
1033
|
+
|
823
1034
|
Returns:
|
824
1035
|
A dictionary containing the availability schedules returned by the API.
|
825
1036
|
"""
|
826
1037
|
url = f"{self.base_url}/user_availability_schedules"
|
827
|
-
query_params = {k: v for k, v in [(
|
1038
|
+
query_params = {k: v for k, v in [("user", user)] if v is not None}
|
828
1039
|
response = self._get(url, params=query_params)
|
829
1040
|
response.raise_for_status()
|
830
1041
|
return response.json()
|
831
1042
|
|
832
|
-
def list_event_type_hosts(
|
1043
|
+
def list_event_type_hosts(
|
1044
|
+
self, event_type=None, count=None, page_token=None
|
1045
|
+
) -> dict[str, Any]:
|
833
1046
|
"""
|
834
1047
|
Retrieves a list of event type hosts based on provided filter, count, and pagination parameters.
|
835
|
-
|
1048
|
+
|
836
1049
|
Args:
|
837
1050
|
event_type: Optional; a string specifying the event type to filter hosts by.
|
838
1051
|
count: Optional; an integer indicating the maximum number of hosts to return.
|
839
1052
|
page_token: Optional; a string token to retrieve the next page of results for pagination.
|
840
|
-
|
1053
|
+
|
841
1054
|
Returns:
|
842
1055
|
A dictionary containing the JSON response with event type hosts data, which may include host details and pagination information.
|
843
1056
|
"""
|
844
1057
|
url = f"{self.base_url}/event_type_memberships"
|
845
|
-
query_params = {
|
1058
|
+
query_params = {
|
1059
|
+
k: v
|
1060
|
+
for k, v in [
|
1061
|
+
("event_type", event_type),
|
1062
|
+
("count", count),
|
1063
|
+
("page_token", page_token),
|
1064
|
+
]
|
1065
|
+
if v is not None
|
1066
|
+
}
|
846
1067
|
response = self._get(url, params=query_params)
|
847
1068
|
response.raise_for_status()
|
848
1069
|
return response.json()
|
849
1070
|
|
850
|
-
def create_one_off_event_type(
|
1071
|
+
def create_one_off_event_type(
|
1072
|
+
self,
|
1073
|
+
co_hosts=None,
|
1074
|
+
date_setting=None,
|
1075
|
+
duration=None,
|
1076
|
+
host=None,
|
1077
|
+
location=None,
|
1078
|
+
name=None,
|
1079
|
+
timezone=None,
|
1080
|
+
) -> dict[str, Any]:
|
851
1081
|
"""
|
852
1082
|
Creates a one-off event type with specified parameters and returns the created event type details.
|
853
|
-
|
1083
|
+
|
854
1084
|
Args:
|
855
1085
|
co_hosts: Optional; a list or identifier(s) representing additional hosts for the event.
|
856
1086
|
date_setting: Optional; the date configuration for the event (e.g., specific date, date range, or recurrence settings).
|
@@ -859,18 +1089,18 @@ class CalendlyApp(APIApplication):
|
|
859
1089
|
location: Optional; the location information for the event (e.g., physical address or online meeting link).
|
860
1090
|
name: Optional; the name or title of the event.
|
861
1091
|
timezone: Optional; the timezone in which the event will take place.
|
862
|
-
|
1092
|
+
|
863
1093
|
Returns:
|
864
1094
|
A dictionary containing the details of the created one-off event type as returned by the API.
|
865
1095
|
"""
|
866
1096
|
request_body = {
|
867
|
-
|
868
|
-
|
869
|
-
|
870
|
-
|
871
|
-
|
872
|
-
|
873
|
-
|
1097
|
+
"co_hosts": co_hosts,
|
1098
|
+
"date_setting": date_setting,
|
1099
|
+
"duration": duration,
|
1100
|
+
"host": host,
|
1101
|
+
"location": location,
|
1102
|
+
"name": name,
|
1103
|
+
"timezone": timezone,
|
874
1104
|
}
|
875
1105
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
876
1106
|
url = f"{self.base_url}/one_off_event_types"
|
@@ -879,21 +1109,32 @@ class CalendlyApp(APIApplication):
|
|
879
1109
|
response.raise_for_status()
|
880
1110
|
return response.json()
|
881
1111
|
|
882
|
-
def get_sample_webhook_data(
|
1112
|
+
def get_sample_webhook_data(
|
1113
|
+
self, event=None, organization=None, user=None, scope=None
|
1114
|
+
) -> dict[str, Any]:
|
883
1115
|
"""
|
884
1116
|
Retrieves sample webhook data from the API using optional filtering parameters.
|
885
|
-
|
1117
|
+
|
886
1118
|
Args:
|
887
1119
|
event: Optional; a string specifying the event type to filter the webhook data.
|
888
1120
|
organization: Optional; a string representing the organization identifier to filter the data.
|
889
1121
|
user: Optional; a string identifying the user to filter the webhook data.
|
890
1122
|
scope: Optional; a string indicating the scope to filter the webhook data.
|
891
|
-
|
1123
|
+
|
892
1124
|
Returns:
|
893
1125
|
A dictionary containing the JSON response with sample webhook data from the API.
|
894
1126
|
"""
|
895
1127
|
url = f"{self.base_url}/sample_webhook_data"
|
896
|
-
query_params = {
|
1128
|
+
query_params = {
|
1129
|
+
k: v
|
1130
|
+
for k, v in [
|
1131
|
+
("event", event),
|
1132
|
+
("organization", organization),
|
1133
|
+
("user", user),
|
1134
|
+
("scope", scope),
|
1135
|
+
]
|
1136
|
+
if v is not None
|
1137
|
+
}
|
897
1138
|
response = self._get(url, params=query_params)
|
898
1139
|
response.raise_for_status()
|
899
1140
|
return response.json()
|
@@ -901,10 +1142,10 @@ class CalendlyApp(APIApplication):
|
|
901
1142
|
def list_tools(self):
|
902
1143
|
"""
|
903
1144
|
Returns a list of method references for various event, user, group, organization, and webhook operations supported by this instance.
|
904
|
-
|
1145
|
+
|
905
1146
|
Args:
|
906
1147
|
None: This method does not accept any parameters.
|
907
|
-
|
1148
|
+
|
908
1149
|
Returns:
|
909
1150
|
List of callable method references available on this instance for performing event, user, group, organization, and webhook operations.
|
910
1151
|
"""
|
@@ -950,5 +1191,5 @@ class CalendlyApp(APIApplication):
|
|
950
1191
|
self.list_user_availability_schedules,
|
951
1192
|
self.list_event_type_hosts,
|
952
1193
|
self.create_one_off_event_type,
|
953
|
-
self.get_sample_webhook_data
|
1194
|
+
self.get_sample_webhook_data,
|
954
1195
|
]
|