universal-mcp-applications 0.1.30rc1__py3-none-any.whl → 0.1.36rc1__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.
Potentially problematic release.
This version of universal-mcp-applications might be problematic. Click here for more details.
- universal_mcp/applications/ahrefs/app.py +52 -198
- universal_mcp/applications/airtable/app.py +23 -122
- universal_mcp/applications/apollo/app.py +111 -464
- universal_mcp/applications/asana/app.py +417 -1567
- universal_mcp/applications/aws_s3/app.py +33 -100
- universal_mcp/applications/bill/app.py +546 -1957
- universal_mcp/applications/box/app.py +1068 -3981
- universal_mcp/applications/braze/app.py +364 -1430
- universal_mcp/applications/browser_use/app.py +2 -8
- universal_mcp/applications/cal_com_v2/app.py +207 -625
- universal_mcp/applications/calendly/app.py +61 -200
- universal_mcp/applications/canva/app.py +45 -110
- universal_mcp/applications/clickup/app.py +207 -674
- universal_mcp/applications/coda/app.py +146 -426
- universal_mcp/applications/confluence/app.py +310 -1098
- universal_mcp/applications/contentful/app.py +36 -151
- universal_mcp/applications/crustdata/app.py +28 -107
- universal_mcp/applications/dialpad/app.py +283 -756
- universal_mcp/applications/digitalocean/app.py +1766 -5777
- universal_mcp/applications/domain_checker/app.py +3 -54
- universal_mcp/applications/e2b/app.py +14 -64
- universal_mcp/applications/elevenlabs/app.py +9 -47
- universal_mcp/applications/exa/app.py +6 -17
- universal_mcp/applications/falai/app.py +23 -100
- universal_mcp/applications/figma/app.py +53 -137
- universal_mcp/applications/file_system/app.py +2 -13
- universal_mcp/applications/firecrawl/app.py +51 -152
- universal_mcp/applications/fireflies/app.py +59 -281
- universal_mcp/applications/fpl/app.py +91 -528
- universal_mcp/applications/fpl/utils/fixtures.py +15 -49
- universal_mcp/applications/fpl/utils/helper.py +25 -89
- universal_mcp/applications/fpl/utils/league_utils.py +20 -64
- universal_mcp/applications/ghost_content/app.py +52 -161
- universal_mcp/applications/github/app.py +19 -56
- universal_mcp/applications/gong/app.py +88 -248
- universal_mcp/applications/google_calendar/app.py +16 -68
- universal_mcp/applications/google_docs/app.py +88 -188
- universal_mcp/applications/google_drive/app.py +140 -462
- universal_mcp/applications/google_gemini/app.py +12 -64
- universal_mcp/applications/google_mail/app.py +28 -157
- universal_mcp/applications/google_searchconsole/app.py +15 -48
- universal_mcp/applications/google_sheet/app.py +101 -578
- universal_mcp/applications/google_sheet/helper.py +10 -37
- universal_mcp/applications/hashnode/app.py +57 -269
- universal_mcp/applications/heygen/app.py +44 -122
- universal_mcp/applications/http_tools/app.py +10 -32
- universal_mcp/applications/hubspot/api_segments/crm_api.py +460 -1573
- universal_mcp/applications/hubspot/api_segments/marketing_api.py +74 -262
- universal_mcp/applications/hubspot/app.py +23 -87
- universal_mcp/applications/jira/app.py +2071 -7986
- universal_mcp/applications/klaviyo/app.py +494 -1376
- universal_mcp/applications/linkedin/README.md +23 -4
- universal_mcp/applications/linkedin/app.py +392 -212
- universal_mcp/applications/mailchimp/app.py +450 -1605
- universal_mcp/applications/markitdown/app.py +8 -20
- universal_mcp/applications/miro/app.py +217 -699
- universal_mcp/applications/ms_teams/app.py +64 -186
- universal_mcp/applications/neon/app.py +86 -192
- universal_mcp/applications/notion/app.py +21 -36
- universal_mcp/applications/onedrive/app.py +14 -36
- universal_mcp/applications/openai/app.py +42 -165
- universal_mcp/applications/outlook/app.py +16 -76
- universal_mcp/applications/perplexity/app.py +4 -19
- universal_mcp/applications/pipedrive/app.py +832 -3142
- universal_mcp/applications/posthog/app.py +163 -432
- universal_mcp/applications/reddit/app.py +40 -139
- universal_mcp/applications/resend/app.py +41 -107
- universal_mcp/applications/retell/app.py +14 -41
- universal_mcp/applications/rocketlane/app.py +221 -934
- universal_mcp/applications/scraper/README.md +7 -4
- universal_mcp/applications/scraper/app.py +280 -93
- universal_mcp/applications/semanticscholar/app.py +22 -64
- universal_mcp/applications/semrush/app.py +43 -77
- universal_mcp/applications/sendgrid/app.py +512 -1262
- universal_mcp/applications/sentry/app.py +271 -906
- universal_mcp/applications/serpapi/app.py +40 -143
- universal_mcp/applications/sharepoint/app.py +15 -37
- universal_mcp/applications/shopify/app.py +1551 -4287
- universal_mcp/applications/shortcut/app.py +155 -417
- universal_mcp/applications/slack/app.py +50 -101
- universal_mcp/applications/spotify/app.py +126 -325
- universal_mcp/applications/supabase/app.py +104 -213
- universal_mcp/applications/tavily/app.py +1 -1
- universal_mcp/applications/trello/app.py +693 -2656
- universal_mcp/applications/twilio/app.py +14 -50
- universal_mcp/applications/twitter/api_segments/compliance_api.py +4 -14
- universal_mcp/applications/twitter/api_segments/dm_conversations_api.py +6 -18
- universal_mcp/applications/twitter/api_segments/likes_api.py +1 -3
- universal_mcp/applications/twitter/api_segments/lists_api.py +5 -15
- universal_mcp/applications/twitter/api_segments/trends_api.py +1 -3
- universal_mcp/applications/twitter/api_segments/tweets_api.py +9 -31
- universal_mcp/applications/twitter/api_segments/usage_api.py +1 -5
- universal_mcp/applications/twitter/api_segments/users_api.py +14 -42
- universal_mcp/applications/whatsapp/app.py +35 -186
- universal_mcp/applications/whatsapp/audio.py +2 -6
- universal_mcp/applications/whatsapp/whatsapp.py +17 -51
- universal_mcp/applications/whatsapp_business/app.py +70 -283
- universal_mcp/applications/wrike/app.py +45 -118
- universal_mcp/applications/yahoo_finance/app.py +19 -65
- universal_mcp/applications/youtube/app.py +75 -261
- universal_mcp/applications/zenquotes/app.py +2 -2
- {universal_mcp_applications-0.1.30rc1.dist-info → universal_mcp_applications-0.1.36rc1.dist-info}/METADATA +2 -2
- {universal_mcp_applications-0.1.30rc1.dist-info → universal_mcp_applications-0.1.36rc1.dist-info}/RECORD +105 -106
- universal_mcp/applications/scraper/scraper_testers.py +0 -17
- {universal_mcp_applications-0.1.30rc1.dist-info → universal_mcp_applications-0.1.36rc1.dist-info}/WHEEL +0 -0
- {universal_mcp_applications-0.1.30rc1.dist-info → universal_mcp_applications-0.1.36rc1.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
from typing import Any
|
|
2
|
-
|
|
3
2
|
from universal_mcp.applications.application import APIApplication
|
|
4
3
|
from universal_mcp.integrations import Integration
|
|
5
4
|
|
|
@@ -9,7 +8,7 @@ class CanvaApp(APIApplication):
|
|
|
9
8
|
super().__init__(name="canva", integration=integration, **kwargs)
|
|
10
9
|
self.base_url = "https://api.canva.com/rest"
|
|
11
10
|
|
|
12
|
-
def get_app_jwks(self, appId) -> dict[str, Any]:
|
|
11
|
+
async def get_app_jwks(self, appId) -> dict[str, Any]:
|
|
13
12
|
"""
|
|
14
13
|
Retrieves the JSON Web Key Set (JWKS) for a given application ID. The JWKS contains public keys essential for verifying the authenticity of JSON Web Tokens (JWTs) issued by the application, ensuring secure communication.
|
|
15
14
|
|
|
@@ -30,7 +29,7 @@ class CanvaApp(APIApplication):
|
|
|
30
29
|
response.raise_for_status()
|
|
31
30
|
return response.json()
|
|
32
31
|
|
|
33
|
-
def get_asset(self, assetId) -> dict[str, Any]:
|
|
32
|
+
async def get_asset(self, assetId) -> dict[str, Any]:
|
|
34
33
|
"""
|
|
35
34
|
Fetches the details of a specific asset using its unique identifier. This function performs a GET request to retrieve asset data, distinguishing it from other functions that update (`v1_assets_assetid2`, `v1_assets_assetid3`) or delete (`v1_assets_assetid`) assets at the same endpoint.
|
|
36
35
|
|
|
@@ -51,7 +50,7 @@ class CanvaApp(APIApplication):
|
|
|
51
50
|
response.raise_for_status()
|
|
52
51
|
return response.json()
|
|
53
52
|
|
|
54
|
-
def post_update_asset(self, assetId, name=None, tags=None) -> dict[str, Any]:
|
|
53
|
+
async def post_update_asset(self, assetId, name=None, tags=None) -> dict[str, Any]:
|
|
55
54
|
"""
|
|
56
55
|
Updates an asset's name and tags by its ID using an HTTP POST request. This method is distinct from the PATCH-based update function (`v1_assets_assetid2`), which performs a similar action on the same `/v1/assets/{assetId}` endpoint.
|
|
57
56
|
|
|
@@ -78,10 +77,7 @@ class CanvaApp(APIApplication):
|
|
|
78
77
|
"""
|
|
79
78
|
if assetId is None:
|
|
80
79
|
raise ValueError("Missing required parameter 'assetId'")
|
|
81
|
-
request_body = {
|
|
82
|
-
"name": name,
|
|
83
|
-
"tags": tags,
|
|
84
|
-
}
|
|
80
|
+
request_body = {"name": name, "tags": tags}
|
|
85
81
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
86
82
|
url = f"{self.base_url}/v1/assets/{assetId}"
|
|
87
83
|
query_params = {}
|
|
@@ -89,7 +85,7 @@ class CanvaApp(APIApplication):
|
|
|
89
85
|
response.raise_for_status()
|
|
90
86
|
return response.json()
|
|
91
87
|
|
|
92
|
-
def delete_asset(self, assetId) -> Any:
|
|
88
|
+
async def delete_asset(self, assetId) -> Any:
|
|
93
89
|
"""
|
|
94
90
|
Deletes a specific Canva asset identified by its unique ID. This function sends an HTTP DELETE request to the `/v1/assets/{assetId}` endpoint to permanently remove the resource, returning the API's confirmation response upon successful completion.
|
|
95
91
|
|
|
@@ -110,7 +106,7 @@ class CanvaApp(APIApplication):
|
|
|
110
106
|
response.raise_for_status()
|
|
111
107
|
return response.json()
|
|
112
108
|
|
|
113
|
-
def patch_asset(self, assetId, name=None, tags=None) -> dict[str, Any]:
|
|
109
|
+
async def patch_asset(self, assetId, name=None, tags=None) -> dict[str, Any]:
|
|
114
110
|
"""
|
|
115
111
|
Partially updates an asset by its ID using an HTTP PATCH request to modify specific fields like name or tags. Unlike `v1_assets_assetid3` which uses POST, this method applies incremental changes, returning the updated asset data upon completion.
|
|
116
112
|
|
|
@@ -137,10 +133,7 @@ class CanvaApp(APIApplication):
|
|
|
137
133
|
"""
|
|
138
134
|
if assetId is None:
|
|
139
135
|
raise ValueError("Missing required parameter 'assetId'")
|
|
140
|
-
request_body = {
|
|
141
|
-
"name": name,
|
|
142
|
-
"tags": tags,
|
|
143
|
-
}
|
|
136
|
+
request_body = {"name": name, "tags": tags}
|
|
144
137
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
145
138
|
url = f"{self.base_url}/v1/assets/{assetId}"
|
|
146
139
|
query_params = {}
|
|
@@ -148,7 +141,7 @@ class CanvaApp(APIApplication):
|
|
|
148
141
|
response.raise_for_status()
|
|
149
142
|
return response.json()
|
|
150
143
|
|
|
151
|
-
def upload_asset(self, request_body=None) -> dict[str, Any]:
|
|
144
|
+
async def upload_asset(self, request_body=None) -> dict[str, Any]:
|
|
152
145
|
"""
|
|
153
146
|
Uploads an asset by sending its data to the `/v1/assets/upload` endpoint. This function performs a direct, synchronous upload, returning a confirmation. It differs from `v1_asset_uploads`, which initiates an asynchronous upload job tracked by an ID.
|
|
154
147
|
|
|
@@ -167,7 +160,7 @@ class CanvaApp(APIApplication):
|
|
|
167
160
|
response.raise_for_status()
|
|
168
161
|
return response.json()
|
|
169
162
|
|
|
170
|
-
def create_asset_upload_job(self, request_body=None) -> dict[str, Any]:
|
|
163
|
+
async def create_asset_upload_job(self, request_body=None) -> dict[str, Any]:
|
|
171
164
|
"""
|
|
172
165
|
Initiates an asynchronous asset upload by creating an upload job. This method returns details, like a job ID, for subsequent steps. It differs from `v1_assets_upload`, which targets a direct, synchronous upload endpoint.
|
|
173
166
|
|
|
@@ -186,7 +179,7 @@ class CanvaApp(APIApplication):
|
|
|
186
179
|
response.raise_for_status()
|
|
187
180
|
return response.json()
|
|
188
181
|
|
|
189
|
-
def get_asset_upload_job_status(self, jobId) -> dict[str, Any]:
|
|
182
|
+
async def get_asset_upload_job_status(self, jobId) -> dict[str, Any]:
|
|
190
183
|
"""
|
|
191
184
|
Retrieves the status and results of an asynchronous asset upload job using its unique job ID. This allows for checking the outcome of an upload initiated by `v1_asset_uploads`, returning details on its completion and any resulting asset information.
|
|
192
185
|
|
|
@@ -207,9 +200,7 @@ class CanvaApp(APIApplication):
|
|
|
207
200
|
response.raise_for_status()
|
|
208
201
|
return response.json()
|
|
209
202
|
|
|
210
|
-
def create_autofill_job(
|
|
211
|
-
self, brand_template_id=None, data=None, preview=None, title=None
|
|
212
|
-
) -> dict[str, Any]:
|
|
203
|
+
async def create_autofill_job(self, brand_template_id=None, data=None, preview=None, title=None) -> dict[str, Any]:
|
|
213
204
|
"""
|
|
214
205
|
Initiates an autofill job to create a new design by populating a brand template with provided data. It sends a POST request with the template ID, data, and title, returning the details of the newly created job.
|
|
215
206
|
|
|
@@ -243,12 +234,7 @@ class CanvaApp(APIApplication):
|
|
|
243
234
|
Tags:
|
|
244
235
|
autofill
|
|
245
236
|
"""
|
|
246
|
-
request_body = {
|
|
247
|
-
"brand_template_id": brand_template_id,
|
|
248
|
-
"data": data,
|
|
249
|
-
"preview": preview,
|
|
250
|
-
"title": title,
|
|
251
|
-
}
|
|
237
|
+
request_body = {"brand_template_id": brand_template_id, "data": data, "preview": preview, "title": title}
|
|
252
238
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
253
239
|
url = f"{self.base_url}/v1/autofills"
|
|
254
240
|
query_params = {}
|
|
@@ -256,7 +242,7 @@ class CanvaApp(APIApplication):
|
|
|
256
242
|
response.raise_for_status()
|
|
257
243
|
return response.json()
|
|
258
244
|
|
|
259
|
-
def get_autofill_job_status(self, jobId) -> dict[str, Any]:
|
|
245
|
+
async def get_autofill_job_status(self, jobId) -> dict[str, Any]:
|
|
260
246
|
"""
|
|
261
247
|
Retrieves the status and results of an asynchronous autofill job by its unique `jobId`. This function is used to check the outcome of a template population operation initiated by the `v1_autofills` method.
|
|
262
248
|
|
|
@@ -277,9 +263,7 @@ class CanvaApp(APIApplication):
|
|
|
277
263
|
response.raise_for_status()
|
|
278
264
|
return response.json()
|
|
279
265
|
|
|
280
|
-
def list_brand_templates(
|
|
281
|
-
self, query=None, continuation=None, ownership=None, sort_by=None
|
|
282
|
-
) -> dict[str, Any]:
|
|
266
|
+
async def list_brand_templates(self, query=None, continuation=None, ownership=None, sort_by=None) -> dict[str, Any]:
|
|
283
267
|
"""
|
|
284
268
|
Searches for and retrieves a paginated list of brand templates. Results can be filtered by ownership and sorted by relevance, modification date, or title. A continuation token can be used to fetch subsequent pages of templates.
|
|
285
269
|
|
|
@@ -311,19 +295,14 @@ class CanvaApp(APIApplication):
|
|
|
311
295
|
url = f"{self.base_url}/v1/brand-templates"
|
|
312
296
|
query_params = {
|
|
313
297
|
k: v
|
|
314
|
-
for k, v in [
|
|
315
|
-
("query", query),
|
|
316
|
-
("continuation", continuation),
|
|
317
|
-
("ownership", ownership),
|
|
318
|
-
("sort_by", sort_by),
|
|
319
|
-
]
|
|
298
|
+
for k, v in [("query", query), ("continuation", continuation), ("ownership", ownership), ("sort_by", sort_by)]
|
|
320
299
|
if v is not None
|
|
321
300
|
}
|
|
322
301
|
response = self._get(url, params=query_params)
|
|
323
302
|
response.raise_for_status()
|
|
324
303
|
return response.json()
|
|
325
304
|
|
|
326
|
-
def get_brand_template_by_id(self, brandTemplateId) -> dict[str, Any]:
|
|
305
|
+
async def get_brand_template_by_id(self, brandTemplateId) -> dict[str, Any]:
|
|
327
306
|
"""
|
|
328
307
|
Retrieves the complete metadata for a specific brand template using its unique identifier. This is distinct from `v1_brand_templates`, which lists multiple templates, and `v1_brand_templates_brandtemplateid_dataset`, which gets only a template's dataset.
|
|
329
308
|
|
|
@@ -344,7 +323,7 @@ class CanvaApp(APIApplication):
|
|
|
344
323
|
response.raise_for_status()
|
|
345
324
|
return response.json()
|
|
346
325
|
|
|
347
|
-
def get_brand_template_dataset(self, brandTemplateId) -> dict[str, Any]:
|
|
326
|
+
async def get_brand_template_dataset(self, brandTemplateId) -> dict[str, Any]:
|
|
348
327
|
"""
|
|
349
328
|
Retrieves the dataset for a specific brand template by its ID. The dataset defines the names and types of autofillable fields, which is essential for programmatically populating the template with data.
|
|
350
329
|
|
|
@@ -365,9 +344,7 @@ class CanvaApp(APIApplication):
|
|
|
365
344
|
response.raise_for_status()
|
|
366
345
|
return response.json()
|
|
367
346
|
|
|
368
|
-
def create_comment(
|
|
369
|
-
self, assignee_id=None, attached_to=None, message=None
|
|
370
|
-
) -> dict[str, Any]:
|
|
347
|
+
async def create_comment(self, assignee_id=None, attached_to=None, message=None) -> dict[str, Any]:
|
|
371
348
|
"""
|
|
372
349
|
Creates a new top-level comment attached to a specific resource, such as a design. It allows for an optional assignee and a message body, sending a POST request to the `/v1/comments` endpoint and returning the details of the newly created comment.
|
|
373
350
|
|
|
@@ -393,11 +370,7 @@ class CanvaApp(APIApplication):
|
|
|
393
370
|
Tags:
|
|
394
371
|
comment
|
|
395
372
|
"""
|
|
396
|
-
request_body = {
|
|
397
|
-
"assignee_id": assignee_id,
|
|
398
|
-
"attached_to": attached_to,
|
|
399
|
-
"message": message,
|
|
400
|
-
}
|
|
373
|
+
request_body = {"assignee_id": assignee_id, "attached_to": attached_to, "message": message}
|
|
401
374
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
402
375
|
url = f"{self.base_url}/v1/comments"
|
|
403
376
|
query_params = {}
|
|
@@ -405,9 +378,7 @@ class CanvaApp(APIApplication):
|
|
|
405
378
|
response.raise_for_status()
|
|
406
379
|
return response.json()
|
|
407
380
|
|
|
408
|
-
def create_comment_reply(
|
|
409
|
-
self, commentId, attached_to=None, message=None
|
|
410
|
-
) -> dict[str, Any]:
|
|
381
|
+
async def create_comment_reply(self, commentId, attached_to=None, message=None) -> dict[str, Any]:
|
|
411
382
|
"""
|
|
412
383
|
Creates a reply to a specific comment, identified by `commentId`. It sends a POST request with the reply's message and attachment details to the `/v1/comments/{commentId}/replies` endpoint, adding a threaded response to an existing comment.
|
|
413
384
|
|
|
@@ -434,10 +405,7 @@ class CanvaApp(APIApplication):
|
|
|
434
405
|
"""
|
|
435
406
|
if commentId is None:
|
|
436
407
|
raise ValueError("Missing required parameter 'commentId'")
|
|
437
|
-
request_body = {
|
|
438
|
-
"attached_to": attached_to,
|
|
439
|
-
"message": message,
|
|
440
|
-
}
|
|
408
|
+
request_body = {"attached_to": attached_to, "message": message}
|
|
441
409
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
442
410
|
url = f"{self.base_url}/v1/comments/{commentId}/replies"
|
|
443
411
|
query_params = {}
|
|
@@ -445,7 +413,7 @@ class CanvaApp(APIApplication):
|
|
|
445
413
|
response.raise_for_status()
|
|
446
414
|
return response.json()
|
|
447
415
|
|
|
448
|
-
def get_design_comment(self, designId, commentId) -> dict[str, Any]:
|
|
416
|
+
async def get_design_comment(self, designId, commentId) -> dict[str, Any]:
|
|
449
417
|
"""
|
|
450
418
|
Fetches a specific comment from a design using both the design and comment IDs. Unlike other functions that create comments or replies, this method exclusively retrieves the data for a single, existing comment by making a GET request to the API.
|
|
451
419
|
|
|
@@ -469,7 +437,7 @@ class CanvaApp(APIApplication):
|
|
|
469
437
|
response.raise_for_status()
|
|
470
438
|
return response.json()
|
|
471
439
|
|
|
472
|
-
def get_connection_keys(self) -> dict[str, Any]:
|
|
440
|
+
async def get_connection_keys(self) -> dict[str, Any]:
|
|
473
441
|
"""
|
|
474
442
|
Fetches a list of connection keys for the authenticated user or application from the `/v1/connect/keys` endpoint. These keys are used for establishing secure connections or integrations with the Canva API.
|
|
475
443
|
|
|
@@ -485,9 +453,7 @@ class CanvaApp(APIApplication):
|
|
|
485
453
|
response.raise_for_status()
|
|
486
454
|
return response.json()
|
|
487
455
|
|
|
488
|
-
def list_designs(
|
|
489
|
-
self, query=None, continuation=None, ownership=None, sort_by=None
|
|
490
|
-
) -> dict[str, Any]:
|
|
456
|
+
async def list_designs(self, query=None, continuation=None, ownership=None, sort_by=None) -> dict[str, Any]:
|
|
491
457
|
"""
|
|
492
458
|
Retrieves a list of designs available to the user. Results can be filtered by a search query, ownership status, and sort order. It supports pagination for large datasets using a continuation token to fetch multiple designs.
|
|
493
459
|
|
|
@@ -517,21 +483,14 @@ class CanvaApp(APIApplication):
|
|
|
517
483
|
url = f"{self.base_url}/v1/designs"
|
|
518
484
|
query_params = {
|
|
519
485
|
k: v
|
|
520
|
-
for k, v in [
|
|
521
|
-
("query", query),
|
|
522
|
-
("continuation", continuation),
|
|
523
|
-
("ownership", ownership),
|
|
524
|
-
("sort_by", sort_by),
|
|
525
|
-
]
|
|
486
|
+
for k, v in [("query", query), ("continuation", continuation), ("ownership", ownership), ("sort_by", sort_by)]
|
|
526
487
|
if v is not None
|
|
527
488
|
}
|
|
528
489
|
response = self._get(url, params=query_params)
|
|
529
490
|
response.raise_for_status()
|
|
530
491
|
return response.json()
|
|
531
492
|
|
|
532
|
-
def create_design(
|
|
533
|
-
self, asset_id=None, design_type=None, title=None
|
|
534
|
-
) -> dict[str, Any]:
|
|
493
|
+
async def create_design(self, asset_id=None, design_type=None, title=None) -> dict[str, Any]:
|
|
535
494
|
"""
|
|
536
495
|
Creates a new design from an asset. This function sends a POST request to the `/v1/designs` endpoint with the asset ID, design type, and title, returning the data for the newly created design resource.
|
|
537
496
|
|
|
@@ -557,11 +516,7 @@ class CanvaApp(APIApplication):
|
|
|
557
516
|
Tags:
|
|
558
517
|
design
|
|
559
518
|
"""
|
|
560
|
-
request_body = {
|
|
561
|
-
"asset_id": asset_id,
|
|
562
|
-
"design_type": design_type,
|
|
563
|
-
"title": title,
|
|
564
|
-
}
|
|
519
|
+
request_body = {"asset_id": asset_id, "design_type": design_type, "title": title}
|
|
565
520
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
566
521
|
url = f"{self.base_url}/v1/designs"
|
|
567
522
|
query_params = {}
|
|
@@ -569,7 +524,7 @@ class CanvaApp(APIApplication):
|
|
|
569
524
|
response.raise_for_status()
|
|
570
525
|
return response.json()
|
|
571
526
|
|
|
572
|
-
def get_design(self, designId) -> dict[str, Any]:
|
|
527
|
+
async def get_design(self, designId) -> dict[str, Any]:
|
|
573
528
|
"""
|
|
574
529
|
Fetches the details for a single, specific design using its unique identifier. This function retrieves one design, distinguishing it from `v1_designs` which lists multiple designs and `v1_designs1` which creates a new design.
|
|
575
530
|
|
|
@@ -590,7 +545,7 @@ class CanvaApp(APIApplication):
|
|
|
590
545
|
response.raise_for_status()
|
|
591
546
|
return response.json()
|
|
592
547
|
|
|
593
|
-
def create_design_import_job(self, request_body=None) -> dict[str, Any]:
|
|
548
|
+
async def create_design_import_job(self, request_body=None) -> dict[str, Any]:
|
|
594
549
|
"""
|
|
595
550
|
Initiates a job to import a file (e.g., PDF, PPTX) for creating a new Canva design. This function sends a POST request to the `/v1/imports` endpoint and returns details of the created import job, including a job ID for status tracking.
|
|
596
551
|
|
|
@@ -609,7 +564,7 @@ class CanvaApp(APIApplication):
|
|
|
609
564
|
response.raise_for_status()
|
|
610
565
|
return response.json()
|
|
611
566
|
|
|
612
|
-
def get_design_import_status(self, jobId) -> dict[str, Any]:
|
|
567
|
+
async def get_design_import_status(self, jobId) -> dict[str, Any]:
|
|
613
568
|
"""
|
|
614
569
|
Retrieves the status and results of a specific design import job using its unique `jobId`. This function checks the outcome of an import process initiated by the `v1_imports` method, returning details about the job's progress and final state.
|
|
615
570
|
|
|
@@ -630,7 +585,7 @@ class CanvaApp(APIApplication):
|
|
|
630
585
|
response.raise_for_status()
|
|
631
586
|
return response.json()
|
|
632
587
|
|
|
633
|
-
def create_design_export(self, design_id=None, format=None) -> dict[str, Any]:
|
|
588
|
+
async def create_design_export(self, design_id=None, format=None) -> dict[str, Any]:
|
|
634
589
|
"""
|
|
635
590
|
Initiates an export job for a specified design based on its ID and format details (e.g., file type, quality). It returns the export job's details, including an ID used to track its status with `v1_exports_exportid`.
|
|
636
591
|
|
|
@@ -659,10 +614,7 @@ class CanvaApp(APIApplication):
|
|
|
659
614
|
Tags:
|
|
660
615
|
export
|
|
661
616
|
"""
|
|
662
|
-
request_body = {
|
|
663
|
-
"design_id": design_id,
|
|
664
|
-
"format": format,
|
|
665
|
-
}
|
|
617
|
+
request_body = {"design_id": design_id, "format": format}
|
|
666
618
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
667
619
|
url = f"{self.base_url}/v1/exports"
|
|
668
620
|
query_params = {}
|
|
@@ -670,7 +622,7 @@ class CanvaApp(APIApplication):
|
|
|
670
622
|
response.raise_for_status()
|
|
671
623
|
return response.json()
|
|
672
624
|
|
|
673
|
-
def get_export_job_status(self, exportId) -> dict[str, Any]:
|
|
625
|
+
async def get_export_job_status(self, exportId) -> dict[str, Any]:
|
|
674
626
|
"""
|
|
675
627
|
Retrieves the status and results of a specific design export job using its unique ID. This is used to check on an export initiated by the `v1_exports` function and to obtain download links for the completed file.
|
|
676
628
|
|
|
@@ -691,7 +643,7 @@ class CanvaApp(APIApplication):
|
|
|
691
643
|
response.raise_for_status()
|
|
692
644
|
return response.json()
|
|
693
645
|
|
|
694
|
-
def get_folder_by_id(self, folderId) -> dict[str, Any]:
|
|
646
|
+
async def get_folder_by_id(self, folderId) -> dict[str, Any]:
|
|
695
647
|
"""
|
|
696
648
|
Retrieves detailed information for a specific folder using its unique ID. This GET operation fetches folder metadata, distinguishing it from functions that delete (`v1_folders_folderid`) or update (`v1_folders_folderid2`) the same folder resource.
|
|
697
649
|
|
|
@@ -712,7 +664,7 @@ class CanvaApp(APIApplication):
|
|
|
712
664
|
response.raise_for_status()
|
|
713
665
|
return response.json()
|
|
714
666
|
|
|
715
|
-
def delete_folder(self, folderId) -> Any:
|
|
667
|
+
async def delete_folder(self, folderId) -> Any:
|
|
716
668
|
"""
|
|
717
669
|
Deletes a folder and all its contents using the folder's unique identifier. This function sends an HTTP DELETE request to the `/v1/folders/{folderId}` endpoint and returns a confirmation status upon successful deletion.
|
|
718
670
|
|
|
@@ -733,7 +685,7 @@ class CanvaApp(APIApplication):
|
|
|
733
685
|
response.raise_for_status()
|
|
734
686
|
return response.json()
|
|
735
687
|
|
|
736
|
-
def update_folder(self, folderId, name=None) -> dict[str, Any]:
|
|
688
|
+
async def update_folder(self, folderId, name=None) -> dict[str, Any]:
|
|
737
689
|
"""
|
|
738
690
|
Updates a specific folder's properties, such as its name, using its unique ID. This function sends a PATCH request to the `/v1/folders/{folderId}` endpoint to apply partial modifications and returns the updated folder information upon success.
|
|
739
691
|
|
|
@@ -755,9 +707,7 @@ class CanvaApp(APIApplication):
|
|
|
755
707
|
"""
|
|
756
708
|
if folderId is None:
|
|
757
709
|
raise ValueError("Missing required parameter 'folderId'")
|
|
758
|
-
request_body = {
|
|
759
|
-
"name": name,
|
|
760
|
-
}
|
|
710
|
+
request_body = {"name": name}
|
|
761
711
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
762
712
|
url = f"{self.base_url}/v1/folders/{folderId}"
|
|
763
713
|
query_params = {}
|
|
@@ -765,9 +715,7 @@ class CanvaApp(APIApplication):
|
|
|
765
715
|
response.raise_for_status()
|
|
766
716
|
return response.json()
|
|
767
717
|
|
|
768
|
-
def list_folder_items(
|
|
769
|
-
self, folderId, continuation=None, item_types=None
|
|
770
|
-
) -> dict[str, Any]:
|
|
718
|
+
async def list_folder_items(self, folderId, continuation=None, item_types=None) -> dict[str, Any]:
|
|
771
719
|
"""
|
|
772
720
|
Lists items within a specific folder. Supports optional filtering by item type (asset, design, folder, template) and pagination using a continuation token to navigate through large result sets.
|
|
773
721
|
|
|
@@ -790,18 +738,12 @@ class CanvaApp(APIApplication):
|
|
|
790
738
|
if folderId is None:
|
|
791
739
|
raise ValueError("Missing required parameter 'folderId'")
|
|
792
740
|
url = f"{self.base_url}/v1/folders/{folderId}/items"
|
|
793
|
-
query_params = {
|
|
794
|
-
k: v
|
|
795
|
-
for k, v in [("continuation", continuation), ("item_types", item_types)]
|
|
796
|
-
if v is not None
|
|
797
|
-
}
|
|
741
|
+
query_params = {k: v for k, v in [("continuation", continuation), ("item_types", item_types)] if v is not None}
|
|
798
742
|
response = self._get(url, params=query_params)
|
|
799
743
|
response.raise_for_status()
|
|
800
744
|
return response.json()
|
|
801
745
|
|
|
802
|
-
def move_folder_item(
|
|
803
|
-
self, from_folder_id=None, item_id=None, to_folder_id=None
|
|
804
|
-
) -> Any:
|
|
746
|
+
async def move_folder_item(self, from_folder_id=None, item_id=None, to_folder_id=None) -> Any:
|
|
805
747
|
"""
|
|
806
748
|
Moves an item, such as a design or another folder, from a source folder to a destination folder. It requires the unique IDs for the item, the source folder, and the target folder to perform the relocation, returning a status confirmation upon completion.
|
|
807
749
|
|
|
@@ -824,11 +766,7 @@ class CanvaApp(APIApplication):
|
|
|
824
766
|
Tags:
|
|
825
767
|
folder
|
|
826
768
|
"""
|
|
827
|
-
request_body = {
|
|
828
|
-
"from_folder_id": from_folder_id,
|
|
829
|
-
"item_id": item_id,
|
|
830
|
-
"to_folder_id": to_folder_id,
|
|
831
|
-
}
|
|
769
|
+
request_body = {"from_folder_id": from_folder_id, "item_id": item_id, "to_folder_id": to_folder_id}
|
|
832
770
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
833
771
|
url = f"{self.base_url}/v1/folders/move"
|
|
834
772
|
query_params = {}
|
|
@@ -836,7 +774,7 @@ class CanvaApp(APIApplication):
|
|
|
836
774
|
response.raise_for_status()
|
|
837
775
|
return response.json()
|
|
838
776
|
|
|
839
|
-
def create_folder(self, name=None, parent_folder_id=None) -> dict[str, Any]:
|
|
777
|
+
async def create_folder(self, name=None, parent_folder_id=None) -> dict[str, Any]:
|
|
840
778
|
"""
|
|
841
779
|
Creates a new folder, optionally assigning it a name and placing it within a specified parent folder. This function is distinct from others as it uses a POST request to the base `/v1/folders` endpoint, specifically for creation.
|
|
842
780
|
|
|
@@ -857,10 +795,7 @@ class CanvaApp(APIApplication):
|
|
|
857
795
|
Tags:
|
|
858
796
|
folder
|
|
859
797
|
"""
|
|
860
|
-
request_body = {
|
|
861
|
-
"name": name,
|
|
862
|
-
"parent_folder_id": parent_folder_id,
|
|
863
|
-
}
|
|
798
|
+
request_body = {"name": name, "parent_folder_id": parent_folder_id}
|
|
864
799
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
865
800
|
url = f"{self.base_url}/v1/folders"
|
|
866
801
|
query_params = {}
|
|
@@ -868,7 +803,7 @@ class CanvaApp(APIApplication):
|
|
|
868
803
|
response.raise_for_status()
|
|
869
804
|
return response.json()
|
|
870
805
|
|
|
871
|
-
def get_current_user(self) -> dict[str, Any]:
|
|
806
|
+
async def get_current_user(self) -> dict[str, Any]:
|
|
872
807
|
"""
|
|
873
808
|
Retrieves core information for the currently authenticated user, such as ID and team details. This function is distinct from `v1_users_me_profile`, which fetches more specific profile data like the user's display name and profile picture.
|
|
874
809
|
|
|
@@ -884,7 +819,7 @@ class CanvaApp(APIApplication):
|
|
|
884
819
|
response.raise_for_status()
|
|
885
820
|
return response.json()
|
|
886
821
|
|
|
887
|
-
def get_current_user_profile(self) -> dict[str, Any]:
|
|
822
|
+
async def get_current_user_profile(self) -> dict[str, Any]:
|
|
888
823
|
"""
|
|
889
824
|
Fetches detailed profile information for the currently authenticated user. This method is distinct from `v1_users_me`, which retrieves general user account information rather than specific profile details like display name or avatar.
|
|
890
825
|
|