universal-mcp-applications 0.1.30__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.

Files changed (105) hide show
  1. universal_mcp/applications/ahrefs/app.py +52 -198
  2. universal_mcp/applications/airtable/app.py +23 -122
  3. universal_mcp/applications/apollo/app.py +111 -464
  4. universal_mcp/applications/asana/app.py +417 -1567
  5. universal_mcp/applications/aws_s3/app.py +33 -100
  6. universal_mcp/applications/bill/app.py +546 -1957
  7. universal_mcp/applications/box/app.py +1068 -3981
  8. universal_mcp/applications/braze/app.py +364 -1430
  9. universal_mcp/applications/browser_use/app.py +2 -8
  10. universal_mcp/applications/cal_com_v2/app.py +207 -625
  11. universal_mcp/applications/calendly/app.py +61 -200
  12. universal_mcp/applications/canva/app.py +45 -110
  13. universal_mcp/applications/clickup/app.py +207 -674
  14. universal_mcp/applications/coda/app.py +146 -426
  15. universal_mcp/applications/confluence/app.py +310 -1098
  16. universal_mcp/applications/contentful/app.py +36 -151
  17. universal_mcp/applications/crustdata/app.py +28 -107
  18. universal_mcp/applications/dialpad/app.py +283 -756
  19. universal_mcp/applications/digitalocean/app.py +1766 -5777
  20. universal_mcp/applications/domain_checker/app.py +3 -54
  21. universal_mcp/applications/e2b/app.py +14 -64
  22. universal_mcp/applications/elevenlabs/app.py +9 -47
  23. universal_mcp/applications/exa/app.py +6 -17
  24. universal_mcp/applications/falai/app.py +23 -100
  25. universal_mcp/applications/figma/app.py +53 -137
  26. universal_mcp/applications/file_system/app.py +2 -13
  27. universal_mcp/applications/firecrawl/app.py +51 -152
  28. universal_mcp/applications/fireflies/app.py +59 -281
  29. universal_mcp/applications/fpl/app.py +91 -528
  30. universal_mcp/applications/fpl/utils/fixtures.py +15 -49
  31. universal_mcp/applications/fpl/utils/helper.py +25 -89
  32. universal_mcp/applications/fpl/utils/league_utils.py +20 -64
  33. universal_mcp/applications/ghost_content/app.py +52 -161
  34. universal_mcp/applications/github/app.py +19 -56
  35. universal_mcp/applications/gong/app.py +88 -248
  36. universal_mcp/applications/google_calendar/app.py +16 -68
  37. universal_mcp/applications/google_docs/app.py +88 -188
  38. universal_mcp/applications/google_drive/app.py +140 -462
  39. universal_mcp/applications/google_gemini/app.py +12 -64
  40. universal_mcp/applications/google_mail/app.py +28 -157
  41. universal_mcp/applications/google_searchconsole/app.py +15 -48
  42. universal_mcp/applications/google_sheet/app.py +101 -578
  43. universal_mcp/applications/google_sheet/helper.py +10 -37
  44. universal_mcp/applications/hashnode/app.py +57 -269
  45. universal_mcp/applications/heygen/app.py +44 -122
  46. universal_mcp/applications/http_tools/app.py +10 -32
  47. universal_mcp/applications/hubspot/api_segments/crm_api.py +460 -1573
  48. universal_mcp/applications/hubspot/api_segments/marketing_api.py +74 -262
  49. universal_mcp/applications/hubspot/app.py +23 -87
  50. universal_mcp/applications/jira/app.py +2071 -7986
  51. universal_mcp/applications/klaviyo/app.py +494 -1376
  52. universal_mcp/applications/linkedin/README.md +9 -2
  53. universal_mcp/applications/linkedin/app.py +392 -212
  54. universal_mcp/applications/mailchimp/app.py +450 -1605
  55. universal_mcp/applications/markitdown/app.py +8 -20
  56. universal_mcp/applications/miro/app.py +217 -699
  57. universal_mcp/applications/ms_teams/app.py +64 -186
  58. universal_mcp/applications/neon/app.py +86 -192
  59. universal_mcp/applications/notion/app.py +21 -36
  60. universal_mcp/applications/onedrive/app.py +14 -36
  61. universal_mcp/applications/openai/app.py +42 -165
  62. universal_mcp/applications/outlook/app.py +16 -76
  63. universal_mcp/applications/perplexity/app.py +4 -19
  64. universal_mcp/applications/pipedrive/app.py +832 -3142
  65. universal_mcp/applications/posthog/app.py +163 -432
  66. universal_mcp/applications/reddit/app.py +40 -139
  67. universal_mcp/applications/resend/app.py +41 -107
  68. universal_mcp/applications/retell/app.py +14 -41
  69. universal_mcp/applications/rocketlane/app.py +221 -934
  70. universal_mcp/applications/scraper/README.md +7 -4
  71. universal_mcp/applications/scraper/app.py +216 -102
  72. universal_mcp/applications/semanticscholar/app.py +22 -64
  73. universal_mcp/applications/semrush/app.py +43 -77
  74. universal_mcp/applications/sendgrid/app.py +512 -1262
  75. universal_mcp/applications/sentry/app.py +271 -906
  76. universal_mcp/applications/serpapi/app.py +40 -143
  77. universal_mcp/applications/sharepoint/app.py +15 -37
  78. universal_mcp/applications/shopify/app.py +1551 -4287
  79. universal_mcp/applications/shortcut/app.py +155 -417
  80. universal_mcp/applications/slack/app.py +50 -101
  81. universal_mcp/applications/spotify/app.py +126 -325
  82. universal_mcp/applications/supabase/app.py +104 -213
  83. universal_mcp/applications/tavily/app.py +1 -1
  84. universal_mcp/applications/trello/app.py +693 -2656
  85. universal_mcp/applications/twilio/app.py +14 -50
  86. universal_mcp/applications/twitter/api_segments/compliance_api.py +4 -14
  87. universal_mcp/applications/twitter/api_segments/dm_conversations_api.py +6 -18
  88. universal_mcp/applications/twitter/api_segments/likes_api.py +1 -3
  89. universal_mcp/applications/twitter/api_segments/lists_api.py +5 -15
  90. universal_mcp/applications/twitter/api_segments/trends_api.py +1 -3
  91. universal_mcp/applications/twitter/api_segments/tweets_api.py +9 -31
  92. universal_mcp/applications/twitter/api_segments/usage_api.py +1 -5
  93. universal_mcp/applications/twitter/api_segments/users_api.py +14 -42
  94. universal_mcp/applications/whatsapp/app.py +35 -186
  95. universal_mcp/applications/whatsapp/audio.py +2 -6
  96. universal_mcp/applications/whatsapp/whatsapp.py +17 -51
  97. universal_mcp/applications/whatsapp_business/app.py +70 -283
  98. universal_mcp/applications/wrike/app.py +45 -118
  99. universal_mcp/applications/yahoo_finance/app.py +19 -65
  100. universal_mcp/applications/youtube/app.py +75 -261
  101. universal_mcp/applications/zenquotes/app.py +2 -2
  102. {universal_mcp_applications-0.1.30.dist-info → universal_mcp_applications-0.1.36rc1.dist-info}/METADATA +2 -2
  103. {universal_mcp_applications-0.1.30.dist-info → universal_mcp_applications-0.1.36rc1.dist-info}/RECORD +105 -105
  104. {universal_mcp_applications-0.1.30.dist-info → universal_mcp_applications-0.1.36rc1.dist-info}/WHEEL +0 -0
  105. {universal_mcp_applications-0.1.30.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,9 +8,7 @@ class AsanaApp(APIApplication):
9
8
  super().__init__(name="asana", integration=integration, **kwargs)
10
9
  self.base_url = "https://app.asana.com/api/1.0"
11
10
 
12
- def get_an_allocation(
13
- self, allocation_gid, opt_fields=None, opt_pretty=None
14
- ) -> dict[str, Any]:
11
+ async def get_an_allocation(self, allocation_gid, opt_fields=None, opt_pretty=None) -> dict[str, Any]:
15
12
  """
16
13
  Retrieves details about an allocation by its GUID using the API endpoint "/allocations/{allocation_gid}" with optional fields and formatting controlled by query parameters "opt_fields" and "opt_pretty".
17
14
 
@@ -30,18 +27,12 @@ class AsanaApp(APIApplication):
30
27
  if allocation_gid is None:
31
28
  raise ValueError("Missing required parameter 'allocation_gid'")
32
29
  url = f"{self.base_url}/allocations/{allocation_gid}"
33
- query_params = {
34
- k: v
35
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
36
- if v is not None
37
- }
30
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
38
31
  response = self._get(url, params=query_params)
39
32
  response.raise_for_status()
40
33
  return response.json()
41
34
 
42
- def update_an_allocation(
43
- self, allocation_gid, opt_fields=None, opt_pretty=None, data=None
44
- ) -> dict[str, Any]:
35
+ async def update_an_allocation(self, allocation_gid, opt_fields=None, opt_pretty=None, data=None) -> dict[str, Any]:
45
36
  """
46
37
  Updates or creates a resource identified by the allocation GID at the "/allocations/{allocation_gid}" path using the PUT method.
47
38
 
@@ -77,21 +68,15 @@ class AsanaApp(APIApplication):
77
68
  """
78
69
  if allocation_gid is None:
79
70
  raise ValueError("Missing required parameter 'allocation_gid'")
80
- request_body = {
81
- "data": data,
82
- }
71
+ request_body = {"data": data}
83
72
  request_body = {k: v for k, v in request_body.items() if v is not None}
84
73
  url = f"{self.base_url}/allocations/{allocation_gid}"
85
- query_params = {
86
- k: v
87
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
88
- if v is not None
89
- }
74
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
90
75
  response = self._put(url, data=request_body, params=query_params)
91
76
  response.raise_for_status()
92
77
  return response.json()
93
78
 
94
- def delete_an_allocation(self, allocation_gid, opt_pretty=None) -> dict[str, Any]:
79
+ async def delete_an_allocation(self, allocation_gid, opt_pretty=None) -> dict[str, Any]:
95
80
  """
96
81
  Deletes the specified allocation by its global identifier and returns a status code indicating success or failure.
97
82
 
@@ -114,15 +99,8 @@ class AsanaApp(APIApplication):
114
99
  response.raise_for_status()
115
100
  return response.json()
116
101
 
117
- def get_multiple_allocations(
118
- self,
119
- parent=None,
120
- assignee=None,
121
- workspace=None,
122
- limit=None,
123
- offset=None,
124
- opt_fields=None,
125
- opt_pretty=None,
102
+ async def get_multiple_allocations(
103
+ self, parent=None, assignee=None, workspace=None, limit=None, offset=None, opt_fields=None, opt_pretty=None
126
104
  ) -> dict[str, Any]:
127
105
  """
128
106
  Retrieves a list of resource allocations filtered by parent, assignee, workspace, and pagination parameters.
@@ -164,9 +142,7 @@ class AsanaApp(APIApplication):
164
142
  response.raise_for_status()
165
143
  return response.json()
166
144
 
167
- def create_an_allocation(
168
- self, opt_fields=None, opt_pretty=None, data=None
169
- ) -> dict[str, Any]:
145
+ async def create_an_allocation(self, opt_fields=None, opt_pretty=None, data=None) -> dict[str, Any]:
170
146
  """
171
147
  Creates a new allocation using the API and returns a successful response upon completion, with optional fields and pretty printing available through query parameters.
172
148
 
@@ -199,23 +175,15 @@ class AsanaApp(APIApplication):
199
175
  Tags:
200
176
  Allocations
201
177
  """
202
- request_body = {
203
- "data": data,
204
- }
178
+ request_body = {"data": data}
205
179
  request_body = {k: v for k, v in request_body.items() if v is not None}
206
180
  url = f"{self.base_url}/allocations"
207
- query_params = {
208
- k: v
209
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
210
- if v is not None
211
- }
181
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
212
182
  response = self._post(url, data=request_body, params=query_params)
213
183
  response.raise_for_status()
214
184
  return response.json()
215
185
 
216
- def get_an_attachment(
217
- self, attachment_gid, opt_fields=None, opt_pretty=None
218
- ) -> dict[str, Any]:
186
+ async def get_an_attachment(self, attachment_gid, opt_fields=None, opt_pretty=None) -> dict[str, Any]:
219
187
  """
220
188
  Retrieves details for a specific attachment using its identifier, with optional fields and pretty-printed responses.
221
189
 
@@ -234,16 +202,12 @@ class AsanaApp(APIApplication):
234
202
  if attachment_gid is None:
235
203
  raise ValueError("Missing required parameter 'attachment_gid'")
236
204
  url = f"{self.base_url}/attachments/{attachment_gid}"
237
- query_params = {
238
- k: v
239
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
240
- if v is not None
241
- }
205
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
242
206
  response = self._get(url, params=query_params)
243
207
  response.raise_for_status()
244
208
  return response.json()
245
209
 
246
- def delete_an_attachment(self, attachment_gid, opt_pretty=None) -> dict[str, Any]:
210
+ async def delete_an_attachment(self, attachment_gid, opt_pretty=None) -> dict[str, Any]:
247
211
  """
248
212
  Deletes an attachment identified by the attachment GID using the DELETE method.
249
213
 
@@ -266,7 +230,7 @@ class AsanaApp(APIApplication):
266
230
  response.raise_for_status()
267
231
  return response.json()
268
232
 
269
- def get_attachments_from_an_object(
233
+ async def get_attachments_from_an_object(
270
234
  self, limit=None, offset=None, parent=None, opt_fields=None, opt_pretty=None
271
235
  ) -> dict[str, Any]:
272
236
  """
@@ -292,20 +256,14 @@ class AsanaApp(APIApplication):
292
256
  url = f"{self.base_url}/attachments"
293
257
  query_params = {
294
258
  k: v
295
- for k, v in [
296
- ("limit", limit),
297
- ("offset", offset),
298
- ("parent", parent),
299
- ("opt_fields", opt_fields),
300
- ("opt_pretty", opt_pretty),
301
- ]
259
+ for k, v in [("limit", limit), ("offset", offset), ("parent", parent), ("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
302
260
  if v is not None
303
261
  }
304
262
  response = self._get(url, params=query_params)
305
263
  response.raise_for_status()
306
264
  return response.json()
307
265
 
308
- def get_audit_log_events(
266
+ async def get_audit_log_events(
309
267
  self,
310
268
  workspace_gid,
311
269
  start_at=None,
@@ -363,9 +321,7 @@ class AsanaApp(APIApplication):
363
321
  response.raise_for_status()
364
322
  return response.json()
365
323
 
366
- def submit_parallel_requests(
367
- self, opt_fields=None, opt_pretty=None, data=None
368
- ) -> dict[str, Any]:
324
+ async def submit_parallel_requests(self, opt_fields=None, opt_pretty=None, data=None) -> dict[str, Any]:
369
325
  """
370
326
  Processes a batch of API requests in a single call, allowing for efficient execution of multiple operations defined at the "/batch" path using the "POST" method.
371
327
 
@@ -422,23 +378,15 @@ class AsanaApp(APIApplication):
422
378
  Tags:
423
379
  Batch API
424
380
  """
425
- request_body = {
426
- "data": data,
427
- }
381
+ request_body = {"data": data}
428
382
  request_body = {k: v for k, v in request_body.items() if v is not None}
429
383
  url = f"{self.base_url}/batch"
430
- query_params = {
431
- k: v
432
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
433
- if v is not None
434
- }
384
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
435
385
  response = self._post(url, data=request_body, params=query_params)
436
386
  response.raise_for_status()
437
387
  return response.json()
438
388
 
439
- def create_acustom_field(
440
- self, opt_fields=None, opt_pretty=None, data=None
441
- ) -> dict[str, Any]:
389
+ async def create_acustom_field(self, opt_fields=None, opt_pretty=None, data=None) -> dict[str, Any]:
442
390
  """
443
391
  Creates a new custom field at the "/custom_fields" endpoint using the "POST" method, allowing for optional parameters to specify additional fields or formatting options.
444
392
 
@@ -530,23 +478,15 @@ class AsanaApp(APIApplication):
530
478
  Tags:
531
479
  Custom fields
532
480
  """
533
- request_body = {
534
- "data": data,
535
- }
481
+ request_body = {"data": data}
536
482
  request_body = {k: v for k, v in request_body.items() if v is not None}
537
483
  url = f"{self.base_url}/custom_fields"
538
- query_params = {
539
- k: v
540
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
541
- if v is not None
542
- }
484
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
543
485
  response = self._post(url, data=request_body, params=query_params)
544
486
  response.raise_for_status()
545
487
  return response.json()
546
488
 
547
- def get_acustom_field(
548
- self, custom_field_gid, opt_fields=None, opt_pretty=None
549
- ) -> dict[str, Any]:
489
+ async def get_acustom_field(self, custom_field_gid, opt_fields=None, opt_pretty=None) -> dict[str, Any]:
550
490
  """
551
491
  Retrieves the details of a specific custom field using its unique identifier and supports optional query parameters for additional field data and formatted output.
552
492
 
@@ -565,18 +505,12 @@ class AsanaApp(APIApplication):
565
505
  if custom_field_gid is None:
566
506
  raise ValueError("Missing required parameter 'custom_field_gid'")
567
507
  url = f"{self.base_url}/custom_fields/{custom_field_gid}"
568
- query_params = {
569
- k: v
570
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
571
- if v is not None
572
- }
508
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
573
509
  response = self._get(url, params=query_params)
574
510
  response.raise_for_status()
575
511
  return response.json()
576
512
 
577
- def update_acustom_field(
578
- self, custom_field_gid, opt_fields=None, opt_pretty=None, data=None
579
- ) -> dict[str, Any]:
513
+ async def update_acustom_field(self, custom_field_gid, opt_fields=None, opt_pretty=None, data=None) -> dict[str, Any]:
580
514
  """
581
515
  Updates the specified custom field's configuration for the given object (e.g., project) and returns the modified resource.
582
516
 
@@ -671,21 +605,15 @@ class AsanaApp(APIApplication):
671
605
  """
672
606
  if custom_field_gid is None:
673
607
  raise ValueError("Missing required parameter 'custom_field_gid'")
674
- request_body = {
675
- "data": data,
676
- }
608
+ request_body = {"data": data}
677
609
  request_body = {k: v for k, v in request_body.items() if v is not None}
678
610
  url = f"{self.base_url}/custom_fields/{custom_field_gid}"
679
- query_params = {
680
- k: v
681
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
682
- if v is not None
683
- }
611
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
684
612
  response = self._put(url, data=request_body, params=query_params)
685
613
  response.raise_for_status()
686
614
  return response.json()
687
615
 
688
- def delete_acustom_field(self, custom_field_gid, opt_pretty=None) -> dict[str, Any]:
616
+ async def delete_acustom_field(self, custom_field_gid, opt_pretty=None) -> dict[str, Any]:
689
617
  """
690
618
  Deletes a specific custom field by its globally unique identifier (GID) and returns an empty response upon success.
691
619
 
@@ -708,7 +636,7 @@ class AsanaApp(APIApplication):
708
636
  response.raise_for_status()
709
637
  return response.json()
710
638
 
711
- def get_aworkspace_scustom_fields(
639
+ async def get_aworkspace_scustom_fields(
712
640
  self, workspace_gid, opt_fields=None, opt_pretty=None, limit=None, offset=None
713
641
  ) -> dict[str, Any]:
714
642
  """
@@ -735,22 +663,13 @@ class AsanaApp(APIApplication):
735
663
  raise ValueError("Missing required parameter 'workspace_gid'")
736
664
  url = f"{self.base_url}/workspaces/{workspace_gid}/custom_fields"
737
665
  query_params = {
738
- k: v
739
- for k, v in [
740
- ("opt_fields", opt_fields),
741
- ("opt_pretty", opt_pretty),
742
- ("limit", limit),
743
- ("offset", offset),
744
- ]
745
- if v is not None
666
+ k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty), ("limit", limit), ("offset", offset)] if v is not None
746
667
  }
747
668
  response = self._get(url, params=query_params)
748
669
  response.raise_for_status()
749
670
  return response.json()
750
671
 
751
- def create_an_enum_option(
752
- self, custom_field_gid, opt_fields=None, opt_pretty=None, data=None
753
- ) -> dict[str, Any]:
672
+ async def create_an_enum_option(self, custom_field_gid, opt_fields=None, opt_pretty=None, data=None) -> dict[str, Any]:
754
673
  """
755
674
  Creates a new enum option for a custom field and allows specifying its position relative to existing options.
756
675
 
@@ -783,23 +702,15 @@ class AsanaApp(APIApplication):
783
702
  """
784
703
  if custom_field_gid is None:
785
704
  raise ValueError("Missing required parameter 'custom_field_gid'")
786
- request_body = {
787
- "data": data,
788
- }
705
+ request_body = {"data": data}
789
706
  request_body = {k: v for k, v in request_body.items() if v is not None}
790
707
  url = f"{self.base_url}/custom_fields/{custom_field_gid}/enum_options"
791
- query_params = {
792
- k: v
793
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
794
- if v is not None
795
- }
708
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
796
709
  response = self._post(url, data=request_body, params=query_params)
797
710
  response.raise_for_status()
798
711
  return response.json()
799
712
 
800
- def reorder_acustom_field_senum(
801
- self, custom_field_gid, opt_fields=None, opt_pretty=None, data=None
802
- ) -> dict[str, Any]:
713
+ async def reorder_acustom_field_senum(self, custom_field_gid, opt_fields=None, opt_pretty=None, data=None) -> dict[str, Any]:
803
714
  """
804
715
  Reorders the enum options for a custom field using the Asana API by inserting an enum option at a specified position, allowing customization of the options' order.
805
716
 
@@ -828,23 +739,15 @@ class AsanaApp(APIApplication):
828
739
  """
829
740
  if custom_field_gid is None:
830
741
  raise ValueError("Missing required parameter 'custom_field_gid'")
831
- request_body = {
832
- "data": data,
833
- }
742
+ request_body = {"data": data}
834
743
  request_body = {k: v for k, v in request_body.items() if v is not None}
835
744
  url = f"{self.base_url}/custom_fields/{custom_field_gid}/enum_options/insert"
836
- query_params = {
837
- k: v
838
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
839
- if v is not None
840
- }
745
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
841
746
  response = self._post(url, data=request_body, params=query_params)
842
747
  response.raise_for_status()
843
748
  return response.json()
844
749
 
845
- def update_an_enum_option(
846
- self, enum_option_gid, opt_fields=None, opt_pretty=None, data=None
847
- ) -> dict[str, Any]:
750
+ async def update_an_enum_option(self, enum_option_gid, opt_fields=None, opt_pretty=None, data=None) -> dict[str, Any]:
848
751
  """
849
752
  Updates an existing enum option's details in the custom field and returns the modified enum option.
850
753
 
@@ -875,23 +778,15 @@ class AsanaApp(APIApplication):
875
778
  """
876
779
  if enum_option_gid is None:
877
780
  raise ValueError("Missing required parameter 'enum_option_gid'")
878
- request_body = {
879
- "data": data,
880
- }
781
+ request_body = {"data": data}
881
782
  request_body = {k: v for k, v in request_body.items() if v is not None}
882
783
  url = f"{self.base_url}/enum_options/{enum_option_gid}"
883
- query_params = {
884
- k: v
885
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
886
- if v is not None
887
- }
784
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
888
785
  response = self._put(url, data=request_body, params=query_params)
889
786
  response.raise_for_status()
890
787
  return response.json()
891
788
 
892
- def get_aproject_scustom_fields(
893
- self, project_gid, opt_fields=None, opt_pretty=None, limit=None, offset=None
894
- ) -> dict[str, Any]:
789
+ async def get_aproject_scustom_fields(self, project_gid, opt_fields=None, opt_pretty=None, limit=None, offset=None) -> dict[str, Any]:
895
790
  """
896
791
  Retrieves custom field settings for a project using a specified project GID, allowing for optional filtering by fields, formatting, and pagination.
897
792
 
@@ -916,20 +811,13 @@ class AsanaApp(APIApplication):
916
811
  raise ValueError("Missing required parameter 'project_gid'")
917
812
  url = f"{self.base_url}/projects/{project_gid}/custom_field_settings"
918
813
  query_params = {
919
- k: v
920
- for k, v in [
921
- ("opt_fields", opt_fields),
922
- ("opt_pretty", opt_pretty),
923
- ("limit", limit),
924
- ("offset", offset),
925
- ]
926
- if v is not None
814
+ k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty), ("limit", limit), ("offset", offset)] if v is not None
927
815
  }
928
816
  response = self._get(url, params=query_params)
929
817
  response.raise_for_status()
930
818
  return response.json()
931
819
 
932
- def get_aportfolio_scustom_fields(
820
+ async def get_aportfolio_scustom_fields(
933
821
  self, portfolio_gid, opt_fields=None, opt_pretty=None, limit=None, offset=None
934
822
  ) -> dict[str, Any]:
935
823
  """
@@ -956,22 +844,13 @@ class AsanaApp(APIApplication):
956
844
  raise ValueError("Missing required parameter 'portfolio_gid'")
957
845
  url = f"{self.base_url}/portfolios/{portfolio_gid}/custom_field_settings"
958
846
  query_params = {
959
- k: v
960
- for k, v in [
961
- ("opt_fields", opt_fields),
962
- ("opt_pretty", opt_pretty),
963
- ("limit", limit),
964
- ("offset", offset),
965
- ]
966
- if v is not None
847
+ k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty), ("limit", limit), ("offset", offset)] if v is not None
967
848
  }
968
849
  response = self._get(url, params=query_params)
969
850
  response.raise_for_status()
970
851
  return response.json()
971
852
 
972
- def get_events_on_aresource(
973
- self, opt_fields=None, resource=None, sync=None, opt_pretty=None
974
- ) -> dict[str, Any]:
853
+ async def get_events_on_aresource(self, opt_fields=None, resource=None, sync=None, opt_pretty=None) -> dict[str, Any]:
975
854
  """
976
855
  Retrieves a list of events using the "GET" method at the "/events" endpoint, allowing optional filtering by fields, resource, synchronization status, and output format.
977
856
 
@@ -992,19 +871,14 @@ class AsanaApp(APIApplication):
992
871
  url = f"{self.base_url}/events"
993
872
  query_params = {
994
873
  k: v
995
- for k, v in [
996
- ("opt_fields", opt_fields),
997
- ("resource", resource),
998
- ("sync", sync),
999
- ("opt_pretty", opt_pretty),
1000
- ]
874
+ for k, v in [("opt_fields", opt_fields), ("resource", resource), ("sync", sync), ("opt_pretty", opt_pretty)]
1001
875
  if v is not None
1002
876
  }
1003
877
  response = self._get(url, params=query_params)
1004
878
  response.raise_for_status()
1005
879
  return response.json()
1006
880
 
1007
- def get_agoal(self, goal_gid, opt_fields=None, opt_pretty=None) -> dict[str, Any]:
881
+ async def get_agoal(self, goal_gid, opt_fields=None, opt_pretty=None) -> dict[str, Any]:
1008
882
  """
1009
883
  Retrieves information about a specific goal using the `GET` method at the path `/goals/{goal_gid}`, allowing optional parameters for customizing output fields and formatting.
1010
884
 
@@ -1023,18 +897,12 @@ class AsanaApp(APIApplication):
1023
897
  if goal_gid is None:
1024
898
  raise ValueError("Missing required parameter 'goal_gid'")
1025
899
  url = f"{self.base_url}/goals/{goal_gid}"
1026
- query_params = {
1027
- k: v
1028
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
1029
- if v is not None
1030
- }
900
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
1031
901
  response = self._get(url, params=query_params)
1032
902
  response.raise_for_status()
1033
903
  return response.json()
1034
904
 
1035
- def update_agoal(
1036
- self, goal_gid, opt_fields=None, opt_pretty=None, data=None
1037
- ) -> dict[str, Any]:
905
+ async def update_agoal(self, goal_gid, opt_fields=None, opt_pretty=None, data=None) -> dict[str, Any]:
1038
906
  """
1039
907
  Updates a specific goal identified by its GID using the PUT method at the path "/goals/{goal_gid}", optionally including query parameters for custom fields and formatting.
1040
908
 
@@ -1074,21 +942,15 @@ class AsanaApp(APIApplication):
1074
942
  """
1075
943
  if goal_gid is None:
1076
944
  raise ValueError("Missing required parameter 'goal_gid'")
1077
- request_body = {
1078
- "data": data,
1079
- }
945
+ request_body = {"data": data}
1080
946
  request_body = {k: v for k, v in request_body.items() if v is not None}
1081
947
  url = f"{self.base_url}/goals/{goal_gid}"
1082
- query_params = {
1083
- k: v
1084
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
1085
- if v is not None
1086
- }
948
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
1087
949
  response = self._put(url, data=request_body, params=query_params)
1088
950
  response.raise_for_status()
1089
951
  return response.json()
1090
952
 
1091
- def delete_agoal(self, goal_gid, opt_pretty=None) -> dict[str, Any]:
953
+ async def delete_agoal(self, goal_gid, opt_pretty=None) -> dict[str, Any]:
1092
954
  """
1093
955
  Deletes a specific goal resource identified by the `goal_gid` at the path "/goals/{goal_gid}" using the HTTP DELETE method.
1094
956
 
@@ -1111,7 +973,7 @@ class AsanaApp(APIApplication):
1111
973
  response.raise_for_status()
1112
974
  return response.json()
1113
975
 
1114
- def get_goals(
976
+ async def get_goals(
1115
977
  self,
1116
978
  portfolio=None,
1117
979
  project=None,
@@ -1173,9 +1035,7 @@ class AsanaApp(APIApplication):
1173
1035
  response.raise_for_status()
1174
1036
  return response.json()
1175
1037
 
1176
- def create_agoal(
1177
- self, opt_fields=None, opt_pretty=None, data=None
1178
- ) -> dict[str, Any]:
1038
+ async def create_agoal(self, opt_fields=None, opt_pretty=None, data=None) -> dict[str, Any]:
1179
1039
  """
1180
1040
  Creates a new goal in the system and returns the created resource.
1181
1041
 
@@ -1214,23 +1074,15 @@ class AsanaApp(APIApplication):
1214
1074
  Tags:
1215
1075
  Goals
1216
1076
  """
1217
- request_body = {
1218
- "data": data,
1219
- }
1077
+ request_body = {"data": data}
1220
1078
  request_body = {k: v for k, v in request_body.items() if v is not None}
1221
1079
  url = f"{self.base_url}/goals"
1222
- query_params = {
1223
- k: v
1224
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
1225
- if v is not None
1226
- }
1080
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
1227
1081
  response = self._post(url, data=request_body, params=query_params)
1228
1082
  response.raise_for_status()
1229
1083
  return response.json()
1230
1084
 
1231
- def create_agoal_metric(
1232
- self, goal_gid, opt_fields=None, opt_pretty=None, data=None
1233
- ) -> dict[str, Any]:
1085
+ async def create_agoal_metric(self, goal_gid, opt_fields=None, opt_pretty=None, data=None) -> dict[str, Any]:
1234
1086
  """
1235
1087
  Sets a metric for a specific goal identified by `{goal_gid}` and returns the updated goal data.
1236
1088
 
@@ -1268,23 +1120,15 @@ class AsanaApp(APIApplication):
1268
1120
  """
1269
1121
  if goal_gid is None:
1270
1122
  raise ValueError("Missing required parameter 'goal_gid'")
1271
- request_body = {
1272
- "data": data,
1273
- }
1123
+ request_body = {"data": data}
1274
1124
  request_body = {k: v for k, v in request_body.items() if v is not None}
1275
1125
  url = f"{self.base_url}/goals/{goal_gid}/setMetric"
1276
- query_params = {
1277
- k: v
1278
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
1279
- if v is not None
1280
- }
1126
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
1281
1127
  response = self._post(url, data=request_body, params=query_params)
1282
1128
  response.raise_for_status()
1283
1129
  return response.json()
1284
1130
 
1285
- def update_agoal_metric(
1286
- self, goal_gid, opt_fields=None, opt_pretty=None, data=None
1287
- ) -> dict[str, Any]:
1131
+ async def update_agoal_metric(self, goal_gid, opt_fields=None, opt_pretty=None, data=None) -> dict[str, Any]:
1288
1132
  """
1289
1133
  Sets the current metric value for a specified goal using the "POST" method at the "/goals/{goal_gid}/setMetricCurrentValue" endpoint.
1290
1134
 
@@ -1313,23 +1157,15 @@ class AsanaApp(APIApplication):
1313
1157
  """
1314
1158
  if goal_gid is None:
1315
1159
  raise ValueError("Missing required parameter 'goal_gid'")
1316
- request_body = {
1317
- "data": data,
1318
- }
1160
+ request_body = {"data": data}
1319
1161
  request_body = {k: v for k, v in request_body.items() if v is not None}
1320
1162
  url = f"{self.base_url}/goals/{goal_gid}/setMetricCurrentValue"
1321
- query_params = {
1322
- k: v
1323
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
1324
- if v is not None
1325
- }
1163
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
1326
1164
  response = self._post(url, data=request_body, params=query_params)
1327
1165
  response.raise_for_status()
1328
1166
  return response.json()
1329
1167
 
1330
- def add_acollaborator_to_agoal(
1331
- self, goal_gid, opt_fields=None, opt_pretty=None, data=None
1332
- ) -> dict[str, Any]:
1168
+ async def add_acollaborator_to_agoal(self, goal_gid, opt_fields=None, opt_pretty=None, data=None) -> dict[str, Any]:
1333
1169
  """
1334
1170
  Adds followers to a specific goal using the "POST" method at the "/goals/{goal_gid}/addFollowers" endpoint and returns a status message based on the operation's success or failure.
1335
1171
 
@@ -1359,23 +1195,15 @@ class AsanaApp(APIApplication):
1359
1195
  """
1360
1196
  if goal_gid is None:
1361
1197
  raise ValueError("Missing required parameter 'goal_gid'")
1362
- request_body = {
1363
- "data": data,
1364
- }
1198
+ request_body = {"data": data}
1365
1199
  request_body = {k: v for k, v in request_body.items() if v is not None}
1366
1200
  url = f"{self.base_url}/goals/{goal_gid}/addFollowers"
1367
- query_params = {
1368
- k: v
1369
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
1370
- if v is not None
1371
- }
1201
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
1372
1202
  response = self._post(url, data=request_body, params=query_params)
1373
1203
  response.raise_for_status()
1374
1204
  return response.json()
1375
1205
 
1376
- def remove_acollaborator_from_agoal(
1377
- self, goal_gid, opt_fields=None, opt_pretty=None, data=None
1378
- ) -> dict[str, Any]:
1206
+ async def remove_acollaborator_from_agoal(self, goal_gid, opt_fields=None, opt_pretty=None, data=None) -> dict[str, Any]:
1379
1207
  """
1380
1208
  Removes followers from a specified goal using the POST method at the "/goals/{goal_gid}/removeFollowers" path.
1381
1209
 
@@ -1405,23 +1233,15 @@ class AsanaApp(APIApplication):
1405
1233
  """
1406
1234
  if goal_gid is None:
1407
1235
  raise ValueError("Missing required parameter 'goal_gid'")
1408
- request_body = {
1409
- "data": data,
1410
- }
1236
+ request_body = {"data": data}
1411
1237
  request_body = {k: v for k, v in request_body.items() if v is not None}
1412
1238
  url = f"{self.base_url}/goals/{goal_gid}/removeFollowers"
1413
- query_params = {
1414
- k: v
1415
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
1416
- if v is not None
1417
- }
1239
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
1418
1240
  response = self._post(url, data=request_body, params=query_params)
1419
1241
  response.raise_for_status()
1420
1242
  return response.json()
1421
1243
 
1422
- def get_parent_goals_from_agoal(
1423
- self, goal_gid, opt_fields=None, opt_pretty=None
1424
- ) -> dict[str, Any]:
1244
+ async def get_parent_goals_from_agoal(self, goal_gid, opt_fields=None, opt_pretty=None) -> dict[str, Any]:
1425
1245
  """
1426
1246
  Retrieves parent goals associated with a specific goal identified by its goal_gid.
1427
1247
 
@@ -1440,18 +1260,12 @@ class AsanaApp(APIApplication):
1440
1260
  if goal_gid is None:
1441
1261
  raise ValueError("Missing required parameter 'goal_gid'")
1442
1262
  url = f"{self.base_url}/goals/{goal_gid}/parentGoals"
1443
- query_params = {
1444
- k: v
1445
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
1446
- if v is not None
1447
- }
1263
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
1448
1264
  response = self._get(url, params=query_params)
1449
1265
  response.raise_for_status()
1450
1266
  return response.json()
1451
1267
 
1452
- def get_agoal_relationship(
1453
- self, goal_relationship_gid, opt_fields=None, opt_pretty=None
1454
- ) -> dict[str, Any]:
1268
+ async def get_agoal_relationship(self, goal_relationship_gid, opt_fields=None, opt_pretty=None) -> dict[str, Any]:
1455
1269
  """
1456
1270
  Retrieves a goal relationship object by its GID, optionally including additional fields in the response, using the Asana API.
1457
1271
 
@@ -1470,18 +1284,12 @@ class AsanaApp(APIApplication):
1470
1284
  if goal_relationship_gid is None:
1471
1285
  raise ValueError("Missing required parameter 'goal_relationship_gid'")
1472
1286
  url = f"{self.base_url}/goal_relationships/{goal_relationship_gid}"
1473
- query_params = {
1474
- k: v
1475
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
1476
- if v is not None
1477
- }
1287
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
1478
1288
  response = self._get(url, params=query_params)
1479
1289
  response.raise_for_status()
1480
1290
  return response.json()
1481
1291
 
1482
- def update_agoal_relationship(
1483
- self, goal_relationship_gid, opt_fields=None, opt_pretty=None, data=None
1484
- ) -> dict[str, Any]:
1292
+ async def update_agoal_relationship(self, goal_relationship_gid, opt_fields=None, opt_pretty=None, data=None) -> dict[str, Any]:
1485
1293
  """
1486
1294
  Updates a goal relationship using the Asana API and returns a response indicating the outcome of the operation.
1487
1295
 
@@ -1526,28 +1334,16 @@ class AsanaApp(APIApplication):
1526
1334
  """
1527
1335
  if goal_relationship_gid is None:
1528
1336
  raise ValueError("Missing required parameter 'goal_relationship_gid'")
1529
- request_body = {
1530
- "data": data,
1531
- }
1337
+ request_body = {"data": data}
1532
1338
  request_body = {k: v for k, v in request_body.items() if v is not None}
1533
1339
  url = f"{self.base_url}/goal_relationships/{goal_relationship_gid}"
1534
- query_params = {
1535
- k: v
1536
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
1537
- if v is not None
1538
- }
1340
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
1539
1341
  response = self._put(url, data=request_body, params=query_params)
1540
1342
  response.raise_for_status()
1541
1343
  return response.json()
1542
1344
 
1543
- def get_goal_relationships(
1544
- self,
1545
- opt_pretty=None,
1546
- limit=None,
1547
- offset=None,
1548
- supported_goal=None,
1549
- resource_subtype=None,
1550
- opt_fields=None,
1345
+ async def get_goal_relationships(
1346
+ self, opt_pretty=None, limit=None, offset=None, supported_goal=None, resource_subtype=None, opt_fields=None
1551
1347
  ) -> dict[str, Any]:
1552
1348
  """
1553
1349
  Retrieves compact goal relationship objects between goals, projects, or portfolios with optional filtering and field selection.
@@ -1587,9 +1383,7 @@ class AsanaApp(APIApplication):
1587
1383
  response.raise_for_status()
1588
1384
  return response.json()
1589
1385
 
1590
- def add_asupporting_goal_relationship(
1591
- self, goal_gid, opt_fields=None, opt_pretty=None, data=None
1592
- ) -> dict[str, Any]:
1386
+ async def add_asupporting_goal_relationship(self, goal_gid, opt_fields=None, opt_pretty=None, data=None) -> dict[str, Any]:
1593
1387
  """
1594
1388
  Adds a supporting relationship to a specified goal using the POST method at the "/goals/{goal_gid}/addSupportingRelationship" endpoint.
1595
1389
 
@@ -1619,23 +1413,15 @@ class AsanaApp(APIApplication):
1619
1413
  """
1620
1414
  if goal_gid is None:
1621
1415
  raise ValueError("Missing required parameter 'goal_gid'")
1622
- request_body = {
1623
- "data": data,
1624
- }
1416
+ request_body = {"data": data}
1625
1417
  request_body = {k: v for k, v in request_body.items() if v is not None}
1626
1418
  url = f"{self.base_url}/goals/{goal_gid}/addSupportingRelationship"
1627
- query_params = {
1628
- k: v
1629
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
1630
- if v is not None
1631
- }
1419
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
1632
1420
  response = self._post(url, data=request_body, params=query_params)
1633
1421
  response.raise_for_status()
1634
1422
  return response.json()
1635
1423
 
1636
- def removes_asupporting_goal_relationship(
1637
- self, goal_gid, opt_pretty=None, data=None
1638
- ) -> dict[str, Any]:
1424
+ async def removes_asupporting_goal_relationship(self, goal_gid, opt_pretty=None, data=None) -> dict[str, Any]:
1639
1425
  """
1640
1426
  Removes the supporting relationship from a specified goal and returns a status message.
1641
1427
 
@@ -1661,9 +1447,7 @@ class AsanaApp(APIApplication):
1661
1447
  """
1662
1448
  if goal_gid is None:
1663
1449
  raise ValueError("Missing required parameter 'goal_gid'")
1664
- request_body = {
1665
- "data": data,
1666
- }
1450
+ request_body = {"data": data}
1667
1451
  request_body = {k: v for k, v in request_body.items() if v is not None}
1668
1452
  url = f"{self.base_url}/goals/{goal_gid}/removeSupportingRelationship"
1669
1453
  query_params = {k: v for k, v in [("opt_pretty", opt_pretty)] if v is not None}
@@ -1671,9 +1455,7 @@ class AsanaApp(APIApplication):
1671
1455
  response.raise_for_status()
1672
1456
  return response.json()
1673
1457
 
1674
- def get_ajob_by_id(
1675
- self, job_gid, opt_fields=None, opt_pretty=None
1676
- ) -> dict[str, Any]:
1458
+ async def get_ajob_by_id(self, job_gid, opt_fields=None, opt_pretty=None) -> dict[str, Any]:
1677
1459
  """
1678
1460
  Retrieves job details using the specified job GID, with optional fields and formatting controls, via a GET request to the "/jobs/{job_gid}" endpoint.
1679
1461
 
@@ -1692,23 +1474,13 @@ class AsanaApp(APIApplication):
1692
1474
  if job_gid is None:
1693
1475
  raise ValueError("Missing required parameter 'job_gid'")
1694
1476
  url = f"{self.base_url}/jobs/{job_gid}"
1695
- query_params = {
1696
- k: v
1697
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
1698
- if v is not None
1699
- }
1477
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
1700
1478
  response = self._get(url, params=query_params)
1701
1479
  response.raise_for_status()
1702
1480
  return response.json()
1703
1481
 
1704
- def get_multiple_memberships(
1705
- self,
1706
- parent=None,
1707
- member=None,
1708
- limit=None,
1709
- offset=None,
1710
- opt_fields=None,
1711
- opt_pretty=None,
1482
+ async def get_multiple_memberships(
1483
+ self, parent=None, member=None, limit=None, offset=None, opt_fields=None, opt_pretty=None
1712
1484
  ) -> dict[str, Any]:
1713
1485
  """
1714
1486
  Retrieves paginated membership records with optional parent, member, and field selection parameters.
@@ -1748,7 +1520,7 @@ class AsanaApp(APIApplication):
1748
1520
  response.raise_for_status()
1749
1521
  return response.json()
1750
1522
 
1751
- def create_amembership(self, opt_pretty=None, data=None) -> dict[str, Any]:
1523
+ async def create_amembership(self, opt_pretty=None, data=None) -> dict[str, Any]:
1752
1524
  """
1753
1525
  Creates a new membership by sending a POST request to the "/memberships" endpoint, potentially returning a newly created membership resource with a status code indicating successful creation.
1754
1526
 
@@ -1774,9 +1546,7 @@ class AsanaApp(APIApplication):
1774
1546
  Tags:
1775
1547
  Memberships
1776
1548
  """
1777
- request_body = {
1778
- "data": data,
1779
- }
1549
+ request_body = {"data": data}
1780
1550
  request_body = {k: v for k, v in request_body.items() if v is not None}
1781
1551
  url = f"{self.base_url}/memberships"
1782
1552
  query_params = {k: v for k, v in [("opt_pretty", opt_pretty)] if v is not None}
@@ -1784,9 +1554,7 @@ class AsanaApp(APIApplication):
1784
1554
  response.raise_for_status()
1785
1555
  return response.json()
1786
1556
 
1787
- def get_amembership(
1788
- self, membership_gid, opt_fields=None, opt_pretty=None
1789
- ) -> dict[str, Any]:
1557
+ async def get_amembership(self, membership_gid, opt_fields=None, opt_pretty=None) -> dict[str, Any]:
1790
1558
  """
1791
1559
  Retrieves membership details for a specified membership ID, supporting optional field selection and formatted responses.
1792
1560
 
@@ -1805,18 +1573,12 @@ class AsanaApp(APIApplication):
1805
1573
  if membership_gid is None:
1806
1574
  raise ValueError("Missing required parameter 'membership_gid'")
1807
1575
  url = f"{self.base_url}/memberships/{membership_gid}"
1808
- query_params = {
1809
- k: v
1810
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
1811
- if v is not None
1812
- }
1576
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
1813
1577
  response = self._get(url, params=query_params)
1814
1578
  response.raise_for_status()
1815
1579
  return response.json()
1816
1580
 
1817
- def update_amembership(
1818
- self, membership_gid, opt_pretty=None, data=None
1819
- ) -> dict[str, Any]:
1581
+ async def update_amembership(self, membership_gid, opt_pretty=None, data=None) -> dict[str, Any]:
1820
1582
  """
1821
1583
  Updates an existing membership identified by `{membership_gid}` using the PUT method.
1822
1584
 
@@ -1842,9 +1604,7 @@ class AsanaApp(APIApplication):
1842
1604
  """
1843
1605
  if membership_gid is None:
1844
1606
  raise ValueError("Missing required parameter 'membership_gid'")
1845
- request_body = {
1846
- "data": data,
1847
- }
1607
+ request_body = {"data": data}
1848
1608
  request_body = {k: v for k, v in request_body.items() if v is not None}
1849
1609
  url = f"{self.base_url}/memberships/{membership_gid}"
1850
1610
  query_params = {k: v for k, v in [("opt_pretty", opt_pretty)] if v is not None}
@@ -1852,7 +1612,7 @@ class AsanaApp(APIApplication):
1852
1612
  response.raise_for_status()
1853
1613
  return response.json()
1854
1614
 
1855
- def delete_amembership(self, membership_gid, opt_pretty=None) -> dict[str, Any]:
1615
+ async def delete_amembership(self, membership_gid, opt_pretty=None) -> dict[str, Any]:
1856
1616
  """
1857
1617
  Deletes a membership by its GUID using the API, removing the associated relationship between entities.
1858
1618
 
@@ -1875,9 +1635,7 @@ class AsanaApp(APIApplication):
1875
1635
  response.raise_for_status()
1876
1636
  return response.json()
1877
1637
 
1878
- def create_an_organization_export_request(
1879
- self, opt_fields=None, opt_pretty=None, data=None
1880
- ) -> dict[str, Any]:
1638
+ async def create_an_organization_export_request(self, opt_fields=None, opt_pretty=None, data=None) -> dict[str, Any]:
1881
1639
  """
1882
1640
  Initiates a request to export an organization's complete data in JSON format, returning a status response upon successful creation.
1883
1641
 
@@ -1901,23 +1659,15 @@ class AsanaApp(APIApplication):
1901
1659
  Tags:
1902
1660
  Organization exports
1903
1661
  """
1904
- request_body = {
1905
- "data": data,
1906
- }
1662
+ request_body = {"data": data}
1907
1663
  request_body = {k: v for k, v in request_body.items() if v is not None}
1908
1664
  url = f"{self.base_url}/organization_exports"
1909
- query_params = {
1910
- k: v
1911
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
1912
- if v is not None
1913
- }
1665
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
1914
1666
  response = self._post(url, data=request_body, params=query_params)
1915
1667
  response.raise_for_status()
1916
1668
  return response.json()
1917
1669
 
1918
- def get_details_on_an_org_export_request(
1919
- self, organization_export_gid, opt_fields=None, opt_pretty=None
1920
- ) -> dict[str, Any]:
1670
+ async def get_details_on_an_org_export_request(self, organization_export_gid, opt_fields=None, opt_pretty=None) -> dict[str, Any]:
1921
1671
  """
1922
1672
  Retrieves information about an organization export using the provided GID, allowing optional specification of additional fields and pretty-print formatting.
1923
1673
 
@@ -1936,23 +1686,13 @@ class AsanaApp(APIApplication):
1936
1686
  if organization_export_gid is None:
1937
1687
  raise ValueError("Missing required parameter 'organization_export_gid'")
1938
1688
  url = f"{self.base_url}/organization_exports/{organization_export_gid}"
1939
- query_params = {
1940
- k: v
1941
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
1942
- if v is not None
1943
- }
1689
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
1944
1690
  response = self._get(url, params=query_params)
1945
1691
  response.raise_for_status()
1946
1692
  return response.json()
1947
1693
 
1948
- def get_multiple_portfolios(
1949
- self,
1950
- limit=None,
1951
- offset=None,
1952
- workspace=None,
1953
- owner=None,
1954
- opt_fields=None,
1955
- opt_pretty=None,
1694
+ async def get_multiple_portfolios(
1695
+ self, limit=None, offset=None, workspace=None, owner=None, opt_fields=None, opt_pretty=None
1956
1696
  ) -> dict[str, Any]:
1957
1697
  """
1958
1698
  Retrieves a list of portfolios with optional filtering and field selection parameters.
@@ -1992,9 +1732,7 @@ class AsanaApp(APIApplication):
1992
1732
  response.raise_for_status()
1993
1733
  return response.json()
1994
1734
 
1995
- def create_aportfolio(
1996
- self, opt_fields=None, opt_pretty=None, data=None
1997
- ) -> dict[str, Any]:
1735
+ async def create_aportfolio(self, opt_fields=None, opt_pretty=None, data=None) -> dict[str, Any]:
1998
1736
  """
1999
1737
  Creates a new portfolio and returns the result, optionally including specified fields and formatted output, using the Portfolio API.
2000
1738
 
@@ -2027,23 +1765,15 @@ class AsanaApp(APIApplication):
2027
1765
  Tags:
2028
1766
  Portfolios
2029
1767
  """
2030
- request_body = {
2031
- "data": data,
2032
- }
1768
+ request_body = {"data": data}
2033
1769
  request_body = {k: v for k, v in request_body.items() if v is not None}
2034
1770
  url = f"{self.base_url}/portfolios"
2035
- query_params = {
2036
- k: v
2037
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
2038
- if v is not None
2039
- }
1771
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
2040
1772
  response = self._post(url, data=request_body, params=query_params)
2041
1773
  response.raise_for_status()
2042
1774
  return response.json()
2043
1775
 
2044
- def get_aportfolio(
2045
- self, portfolio_gid, opt_fields=None, opt_pretty=None
2046
- ) -> dict[str, Any]:
1776
+ async def get_aportfolio(self, portfolio_gid, opt_fields=None, opt_pretty=None) -> dict[str, Any]:
2047
1777
  """
2048
1778
  Retrieves details about a specific portfolio identified by `{portfolio_gid}` using the `GET` method, allowing optional fields (`opt_fields`) and pretty formatting (`opt_pretty`) in the query parameters.
2049
1779
 
@@ -2062,18 +1792,12 @@ class AsanaApp(APIApplication):
2062
1792
  if portfolio_gid is None:
2063
1793
  raise ValueError("Missing required parameter 'portfolio_gid'")
2064
1794
  url = f"{self.base_url}/portfolios/{portfolio_gid}"
2065
- query_params = {
2066
- k: v
2067
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
2068
- if v is not None
2069
- }
1795
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
2070
1796
  response = self._get(url, params=query_params)
2071
1797
  response.raise_for_status()
2072
1798
  return response.json()
2073
1799
 
2074
- def update_aportfolio(
2075
- self, portfolio_gid, opt_fields=None, opt_pretty=None, data=None
2076
- ) -> dict[str, Any]:
1800
+ async def update_aportfolio(self, portfolio_gid, opt_fields=None, opt_pretty=None, data=None) -> dict[str, Any]:
2077
1801
  """
2078
1802
  Replaces the entire portfolio resource with the provided data and returns the updated portfolio.
2079
1803
 
@@ -2109,21 +1833,15 @@ class AsanaApp(APIApplication):
2109
1833
  """
2110
1834
  if portfolio_gid is None:
2111
1835
  raise ValueError("Missing required parameter 'portfolio_gid'")
2112
- request_body = {
2113
- "data": data,
2114
- }
1836
+ request_body = {"data": data}
2115
1837
  request_body = {k: v for k, v in request_body.items() if v is not None}
2116
1838
  url = f"{self.base_url}/portfolios/{portfolio_gid}"
2117
- query_params = {
2118
- k: v
2119
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
2120
- if v is not None
2121
- }
1839
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
2122
1840
  response = self._put(url, data=request_body, params=query_params)
2123
1841
  response.raise_for_status()
2124
1842
  return response.json()
2125
1843
 
2126
- def delete_aportfolio(self, portfolio_gid, opt_pretty=None) -> dict[str, Any]:
1844
+ async def delete_aportfolio(self, portfolio_gid, opt_pretty=None) -> dict[str, Any]:
2127
1845
  """
2128
1846
  Deletes the specified portfolio and returns a success status or error code.
2129
1847
 
@@ -2146,9 +1864,7 @@ class AsanaApp(APIApplication):
2146
1864
  response.raise_for_status()
2147
1865
  return response.json()
2148
1866
 
2149
- def get_portfolio_items(
2150
- self, portfolio_gid, opt_fields=None, opt_pretty=None, limit=None, offset=None
2151
- ) -> dict[str, Any]:
1867
+ async def get_portfolio_items(self, portfolio_gid, opt_fields=None, opt_pretty=None, limit=None, offset=None) -> dict[str, Any]:
2152
1868
  """
2153
1869
  Retrieves a list of items associated with a specified portfolio using a GET request, allowing for optional parameters to customize the response fields and pagination.
2154
1870
 
@@ -2173,22 +1889,13 @@ class AsanaApp(APIApplication):
2173
1889
  raise ValueError("Missing required parameter 'portfolio_gid'")
2174
1890
  url = f"{self.base_url}/portfolios/{portfolio_gid}/items"
2175
1891
  query_params = {
2176
- k: v
2177
- for k, v in [
2178
- ("opt_fields", opt_fields),
2179
- ("opt_pretty", opt_pretty),
2180
- ("limit", limit),
2181
- ("offset", offset),
2182
- ]
2183
- if v is not None
1892
+ k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty), ("limit", limit), ("offset", offset)] if v is not None
2184
1893
  }
2185
1894
  response = self._get(url, params=query_params)
2186
1895
  response.raise_for_status()
2187
1896
  return response.json()
2188
1897
 
2189
- def add_aportfolio_item(
2190
- self, portfolio_gid, opt_pretty=None, data=None
2191
- ) -> dict[str, Any]:
1898
+ async def add_aportfolio_item(self, portfolio_gid, opt_pretty=None, data=None) -> dict[str, Any]:
2192
1899
  """
2193
1900
  Adds an item to a specified portfolio using a POST request, requiring item placement parameters.
2194
1901
 
@@ -2216,9 +1923,7 @@ class AsanaApp(APIApplication):
2216
1923
  """
2217
1924
  if portfolio_gid is None:
2218
1925
  raise ValueError("Missing required parameter 'portfolio_gid'")
2219
- request_body = {
2220
- "data": data,
2221
- }
1926
+ request_body = {"data": data}
2222
1927
  request_body = {k: v for k, v in request_body.items() if v is not None}
2223
1928
  url = f"{self.base_url}/portfolios/{portfolio_gid}/addItem"
2224
1929
  query_params = {k: v for k, v in [("opt_pretty", opt_pretty)] if v is not None}
@@ -2226,9 +1931,7 @@ class AsanaApp(APIApplication):
2226
1931
  response.raise_for_status()
2227
1932
  return response.json()
2228
1933
 
2229
- def remove_aportfolio_item(
2230
- self, portfolio_gid, opt_pretty=None, data=None
2231
- ) -> dict[str, Any]:
1934
+ async def remove_aportfolio_item(self, portfolio_gid, opt_pretty=None, data=None) -> dict[str, Any]:
2232
1935
  """
2233
1936
  Removes an item from a portfolio using the provided path "/portfolios/{portfolio_gid}/removeItem" via a POST request.
2234
1937
 
@@ -2254,9 +1957,7 @@ class AsanaApp(APIApplication):
2254
1957
  """
2255
1958
  if portfolio_gid is None:
2256
1959
  raise ValueError("Missing required parameter 'portfolio_gid'")
2257
- request_body = {
2258
- "data": data,
2259
- }
1960
+ request_body = {"data": data}
2260
1961
  request_body = {k: v for k, v in request_body.items() if v is not None}
2261
1962
  url = f"{self.base_url}/portfolios/{portfolio_gid}/removeItem"
2262
1963
  query_params = {k: v for k, v in [("opt_pretty", opt_pretty)] if v is not None}
@@ -2264,9 +1965,7 @@ class AsanaApp(APIApplication):
2264
1965
  response.raise_for_status()
2265
1966
  return response.json()
2266
1967
 
2267
- def add_acustom_field_to_aportfolio(
2268
- self, portfolio_gid, opt_pretty=None, data=None
2269
- ) -> dict[str, Any]:
1968
+ async def add_acustom_field_to_aportfolio(self, portfolio_gid, opt_pretty=None, data=None) -> dict[str, Any]:
2270
1969
  """
2271
1970
  Adds a custom field to a specified portfolio by creating a custom field setting using the Asana API.
2272
1971
 
@@ -2295,9 +1994,7 @@ class AsanaApp(APIApplication):
2295
1994
  """
2296
1995
  if portfolio_gid is None:
2297
1996
  raise ValueError("Missing required parameter 'portfolio_gid'")
2298
- request_body = {
2299
- "data": data,
2300
- }
1997
+ request_body = {"data": data}
2301
1998
  request_body = {k: v for k, v in request_body.items() if v is not None}
2302
1999
  url = f"{self.base_url}/portfolios/{portfolio_gid}/addCustomFieldSetting"
2303
2000
  query_params = {k: v for k, v in [("opt_pretty", opt_pretty)] if v is not None}
@@ -2305,9 +2002,7 @@ class AsanaApp(APIApplication):
2305
2002
  response.raise_for_status()
2306
2003
  return response.json()
2307
2004
 
2308
- def remove_acustom_field_from_aportfolio(
2309
- self, portfolio_gid, opt_pretty=None, data=None
2310
- ) -> dict[str, Any]:
2005
+ async def remove_acustom_field_from_aportfolio(self, portfolio_gid, opt_pretty=None, data=None) -> dict[str, Any]:
2311
2006
  """
2312
2007
  Removes a custom field setting from a portfolio and returns a success status.
2313
2008
 
@@ -2333,9 +2028,7 @@ class AsanaApp(APIApplication):
2333
2028
  """
2334
2029
  if portfolio_gid is None:
2335
2030
  raise ValueError("Missing required parameter 'portfolio_gid'")
2336
- request_body = {
2337
- "data": data,
2338
- }
2031
+ request_body = {"data": data}
2339
2032
  request_body = {k: v for k, v in request_body.items() if v is not None}
2340
2033
  url = f"{self.base_url}/portfolios/{portfolio_gid}/removeCustomFieldSetting"
2341
2034
  query_params = {k: v for k, v in [("opt_pretty", opt_pretty)] if v is not None}
@@ -2343,9 +2036,7 @@ class AsanaApp(APIApplication):
2343
2036
  response.raise_for_status()
2344
2037
  return response.json()
2345
2038
 
2346
- def add_users_to_aportfolio(
2347
- self, portfolio_gid, opt_fields=None, opt_pretty=None, data=None
2348
- ) -> dict[str, Any]:
2039
+ async def add_users_to_aportfolio(self, portfolio_gid, opt_fields=None, opt_pretty=None, data=None) -> dict[str, Any]:
2349
2040
  """
2350
2041
  Adds specified users as members to a portfolio and returns the updated portfolio record.
2351
2042
 
@@ -2372,23 +2063,15 @@ class AsanaApp(APIApplication):
2372
2063
  """
2373
2064
  if portfolio_gid is None:
2374
2065
  raise ValueError("Missing required parameter 'portfolio_gid'")
2375
- request_body = {
2376
- "data": data,
2377
- }
2066
+ request_body = {"data": data}
2378
2067
  request_body = {k: v for k, v in request_body.items() if v is not None}
2379
2068
  url = f"{self.base_url}/portfolios/{portfolio_gid}/addMembers"
2380
- query_params = {
2381
- k: v
2382
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
2383
- if v is not None
2384
- }
2069
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
2385
2070
  response = self._post(url, data=request_body, params=query_params)
2386
2071
  response.raise_for_status()
2387
2072
  return response.json()
2388
2073
 
2389
- def remove_users_from_aportfolio(
2390
- self, portfolio_gid, opt_fields=None, opt_pretty=None, data=None
2391
- ) -> dict[str, Any]:
2074
+ async def remove_users_from_aportfolio(self, portfolio_gid, opt_fields=None, opt_pretty=None, data=None) -> dict[str, Any]:
2392
2075
  """
2393
2076
  Removes members from a portfolio using the specified portfolio ID and returns a status message.
2394
2077
 
@@ -2415,29 +2098,16 @@ class AsanaApp(APIApplication):
2415
2098
  """
2416
2099
  if portfolio_gid is None:
2417
2100
  raise ValueError("Missing required parameter 'portfolio_gid'")
2418
- request_body = {
2419
- "data": data,
2420
- }
2101
+ request_body = {"data": data}
2421
2102
  request_body = {k: v for k, v in request_body.items() if v is not None}
2422
2103
  url = f"{self.base_url}/portfolios/{portfolio_gid}/removeMembers"
2423
- query_params = {
2424
- k: v
2425
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
2426
- if v is not None
2427
- }
2104
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
2428
2105
  response = self._post(url, data=request_body, params=query_params)
2429
2106
  response.raise_for_status()
2430
2107
  return response.json()
2431
2108
 
2432
- def get_multiple_portfolio_memberships(
2433
- self,
2434
- opt_fields=None,
2435
- portfolio=None,
2436
- workspace=None,
2437
- user=None,
2438
- opt_pretty=None,
2439
- limit=None,
2440
- offset=None,
2109
+ async def get_multiple_portfolio_memberships(
2110
+ self, opt_fields=None, portfolio=None, workspace=None, user=None, opt_pretty=None, limit=None, offset=None
2441
2111
  ) -> dict[str, Any]:
2442
2112
  """
2443
2113
  Retrieves portfolio membership details in Asana, including associated users and workspaces, with optional filtering and output field selection.
@@ -2479,9 +2149,7 @@ class AsanaApp(APIApplication):
2479
2149
  response.raise_for_status()
2480
2150
  return response.json()
2481
2151
 
2482
- def get_aportfolio_membership(
2483
- self, portfolio_membership_gid, opt_fields=None, opt_pretty=None
2484
- ) -> dict[str, Any]:
2152
+ async def get_aportfolio_membership(self, portfolio_membership_gid, opt_fields=None, opt_pretty=None) -> dict[str, Any]:
2485
2153
  """
2486
2154
  Retrieves details about a portfolio membership by its GID, optionally including additional fields and formatted output.
2487
2155
 
@@ -2500,23 +2168,13 @@ class AsanaApp(APIApplication):
2500
2168
  if portfolio_membership_gid is None:
2501
2169
  raise ValueError("Missing required parameter 'portfolio_membership_gid'")
2502
2170
  url = f"{self.base_url}/portfolio_memberships/{portfolio_membership_gid}"
2503
- query_params = {
2504
- k: v
2505
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
2506
- if v is not None
2507
- }
2171
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
2508
2172
  response = self._get(url, params=query_params)
2509
2173
  response.raise_for_status()
2510
2174
  return response.json()
2511
2175
 
2512
- def get_memberships_from_aportfolio(
2513
- self,
2514
- portfolio_gid,
2515
- opt_fields=None,
2516
- user=None,
2517
- opt_pretty=None,
2518
- limit=None,
2519
- offset=None,
2176
+ async def get_memberships_from_aportfolio(
2177
+ self, portfolio_gid, opt_fields=None, user=None, opt_pretty=None, limit=None, offset=None
2520
2178
  ) -> dict[str, Any]:
2521
2179
  """
2522
2180
  Retrieves a list of portfolio memberships for a specific portfolio identified by its GID, allowing for optional filtering by user and customizing the response with additional fields.
@@ -2544,28 +2202,15 @@ class AsanaApp(APIApplication):
2544
2202
  url = f"{self.base_url}/portfolios/{portfolio_gid}/portfolio_memberships"
2545
2203
  query_params = {
2546
2204
  k: v
2547
- for k, v in [
2548
- ("opt_fields", opt_fields),
2549
- ("user", user),
2550
- ("opt_pretty", opt_pretty),
2551
- ("limit", limit),
2552
- ("offset", offset),
2553
- ]
2205
+ for k, v in [("opt_fields", opt_fields), ("user", user), ("opt_pretty", opt_pretty), ("limit", limit), ("offset", offset)]
2554
2206
  if v is not None
2555
2207
  }
2556
2208
  response = self._get(url, params=query_params)
2557
2209
  response.raise_for_status()
2558
2210
  return response.json()
2559
2211
 
2560
- def get_multiple_projects(
2561
- self,
2562
- limit=None,
2563
- offset=None,
2564
- workspace=None,
2565
- team=None,
2566
- archived=None,
2567
- opt_fields=None,
2568
- opt_pretty=None,
2212
+ async def get_multiple_projects(
2213
+ self, limit=None, offset=None, workspace=None, team=None, archived=None, opt_fields=None, opt_pretty=None
2569
2214
  ) -> dict[str, Any]:
2570
2215
  """
2571
2216
  Retrieves a list of projects using the specified parameters such as limit, offset, workspace, team, archived status, optional fields, and formatting options.
@@ -2607,9 +2252,7 @@ class AsanaApp(APIApplication):
2607
2252
  response.raise_for_status()
2608
2253
  return response.json()
2609
2254
 
2610
- def create_aproject(
2611
- self, opt_fields=None, opt_pretty=None, data=None
2612
- ) -> dict[str, Any]:
2255
+ async def create_aproject(self, opt_fields=None, opt_pretty=None, data=None) -> dict[str, Any]:
2613
2256
  """
2614
2257
  Creates a new GitLab project with customizable fields and returns a success status upon completion.
2615
2258
 
@@ -2896,23 +2539,15 @@ class AsanaApp(APIApplication):
2896
2539
  Tags:
2897
2540
  Projects
2898
2541
  """
2899
- request_body = {
2900
- "data": data,
2901
- }
2542
+ request_body = {"data": data}
2902
2543
  request_body = {k: v for k, v in request_body.items() if v is not None}
2903
2544
  url = f"{self.base_url}/projects"
2904
- query_params = {
2905
- k: v
2906
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
2907
- if v is not None
2908
- }
2545
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
2909
2546
  response = self._post(url, data=request_body, params=query_params)
2910
2547
  response.raise_for_status()
2911
2548
  return response.json()
2912
2549
 
2913
- def get_aproject(
2914
- self, project_gid, opt_fields=None, opt_pretty=None
2915
- ) -> dict[str, Any]:
2550
+ async def get_aproject(self, project_gid, opt_fields=None, opt_pretty=None) -> dict[str, Any]:
2916
2551
  """
2917
2552
  Retrieves a specific project's details using its unique identifier (project_gid) with options to customize the response fields and formatting.
2918
2553
 
@@ -2931,18 +2566,12 @@ class AsanaApp(APIApplication):
2931
2566
  if project_gid is None:
2932
2567
  raise ValueError("Missing required parameter 'project_gid'")
2933
2568
  url = f"{self.base_url}/projects/{project_gid}"
2934
- query_params = {
2935
- k: v
2936
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
2937
- if v is not None
2938
- }
2569
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
2939
2570
  response = self._get(url, params=query_params)
2940
2571
  response.raise_for_status()
2941
2572
  return response.json()
2942
2573
 
2943
- def update_aproject(
2944
- self, project_gid, opt_fields=None, opt_pretty=None, data=None
2945
- ) -> dict[str, Any]:
2574
+ async def update_aproject(self, project_gid, opt_fields=None, opt_pretty=None, data=None) -> dict[str, Any]:
2946
2575
  """
2947
2576
  Updates an existing project at the specified path, replacing its entire resource with the provided request content, using the PUT method.
2948
2577
 
@@ -3231,21 +2860,15 @@ class AsanaApp(APIApplication):
3231
2860
  """
3232
2861
  if project_gid is None:
3233
2862
  raise ValueError("Missing required parameter 'project_gid'")
3234
- request_body = {
3235
- "data": data,
3236
- }
2863
+ request_body = {"data": data}
3237
2864
  request_body = {k: v for k, v in request_body.items() if v is not None}
3238
2865
  url = f"{self.base_url}/projects/{project_gid}"
3239
- query_params = {
3240
- k: v
3241
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
3242
- if v is not None
3243
- }
2866
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
3244
2867
  response = self._put(url, data=request_body, params=query_params)
3245
2868
  response.raise_for_status()
3246
2869
  return response.json()
3247
2870
 
3248
- def delete_aproject(self, project_gid, opt_pretty=None) -> dict[str, Any]:
2871
+ async def delete_aproject(self, project_gid, opt_pretty=None) -> dict[str, Any]:
3249
2872
  """
3250
2873
  Deletes a project identified by the project GID using the DELETE method at the path "/projects/{project_gid}", with optional support for pretty-printed output.
3251
2874
 
@@ -3268,9 +2891,7 @@ class AsanaApp(APIApplication):
3268
2891
  response.raise_for_status()
3269
2892
  return response.json()
3270
2893
 
3271
- def duplicate_aproject(
3272
- self, project_gid, opt_fields=None, opt_pretty=None, data=None
3273
- ) -> dict[str, Any]:
2894
+ async def duplicate_aproject(self, project_gid, opt_fields=None, opt_pretty=None, data=None) -> dict[str, Any]:
3274
2895
  """
3275
2896
  Creates a duplicate of the specified project, including its structure and dependencies, while allowing optional field customization.
3276
2897
 
@@ -3304,23 +2925,15 @@ class AsanaApp(APIApplication):
3304
2925
  """
3305
2926
  if project_gid is None:
3306
2927
  raise ValueError("Missing required parameter 'project_gid'")
3307
- request_body = {
3308
- "data": data,
3309
- }
2928
+ request_body = {"data": data}
3310
2929
  request_body = {k: v for k, v in request_body.items() if v is not None}
3311
2930
  url = f"{self.base_url}/projects/{project_gid}/duplicate"
3312
- query_params = {
3313
- k: v
3314
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
3315
- if v is not None
3316
- }
2931
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
3317
2932
  response = self._post(url, data=request_body, params=query_params)
3318
2933
  response.raise_for_status()
3319
2934
  return response.json()
3320
2935
 
3321
- def get_projects_atask_is_in(
3322
- self, task_gid, opt_fields=None, opt_pretty=None, limit=None, offset=None
3323
- ) -> dict[str, Any]:
2936
+ async def get_projects_atask_is_in(self, task_gid, opt_fields=None, opt_pretty=None, limit=None, offset=None) -> dict[str, Any]:
3324
2937
  """
3325
2938
  Retrieves the projects associated with a specific task using the GET method, allowing for optional customization of output fields and pagination.
3326
2939
 
@@ -3345,27 +2958,14 @@ class AsanaApp(APIApplication):
3345
2958
  raise ValueError("Missing required parameter 'task_gid'")
3346
2959
  url = f"{self.base_url}/tasks/{task_gid}/projects"
3347
2960
  query_params = {
3348
- k: v
3349
- for k, v in [
3350
- ("opt_fields", opt_fields),
3351
- ("opt_pretty", opt_pretty),
3352
- ("limit", limit),
3353
- ("offset", offset),
3354
- ]
3355
- if v is not None
2961
+ k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty), ("limit", limit), ("offset", offset)] if v is not None
3356
2962
  }
3357
2963
  response = self._get(url, params=query_params)
3358
2964
  response.raise_for_status()
3359
2965
  return response.json()
3360
2966
 
3361
- def get_ateam_sprojects(
3362
- self,
3363
- team_gid,
3364
- limit=None,
3365
- offset=None,
3366
- archived=None,
3367
- opt_fields=None,
3368
- opt_pretty=None,
2967
+ async def get_ateam_sprojects(
2968
+ self, team_gid, limit=None, offset=None, archived=None, opt_fields=None, opt_pretty=None
3369
2969
  ) -> dict[str, Any]:
3370
2970
  """
3371
2971
  Retrieves a paginated list of projects associated with a specific team, supporting optional filtering for archived status and custom field selection.
@@ -3406,9 +3006,7 @@ class AsanaApp(APIApplication):
3406
3006
  response.raise_for_status()
3407
3007
  return response.json()
3408
3008
 
3409
- def create_aproject_in_ateam(
3410
- self, team_gid, opt_fields=None, opt_pretty=None, data=None
3411
- ) -> dict[str, Any]:
3009
+ async def create_aproject_in_ateam(self, team_gid, opt_fields=None, opt_pretty=None, data=None) -> dict[str, Any]:
3412
3010
  """
3413
3011
  Adds a project to a team using the GitHub API and returns a success status.
3414
3012
 
@@ -3698,28 +3296,16 @@ class AsanaApp(APIApplication):
3698
3296
  """
3699
3297
  if team_gid is None:
3700
3298
  raise ValueError("Missing required parameter 'team_gid'")
3701
- request_body = {
3702
- "data": data,
3703
- }
3299
+ request_body = {"data": data}
3704
3300
  request_body = {k: v for k, v in request_body.items() if v is not None}
3705
3301
  url = f"{self.base_url}/teams/{team_gid}/projects"
3706
- query_params = {
3707
- k: v
3708
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
3709
- if v is not None
3710
- }
3302
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
3711
3303
  response = self._post(url, data=request_body, params=query_params)
3712
3304
  response.raise_for_status()
3713
3305
  return response.json()
3714
3306
 
3715
- def get_all_projects_in_aworkspace(
3716
- self,
3717
- workspace_gid,
3718
- limit=None,
3719
- offset=None,
3720
- archived=None,
3721
- opt_fields=None,
3722
- opt_pretty=None,
3307
+ async def get_all_projects_in_aworkspace(
3308
+ self, workspace_gid, limit=None, offset=None, archived=None, opt_fields=None, opt_pretty=None
3723
3309
  ) -> dict[str, Any]:
3724
3310
  """
3725
3311
  Retrieves a list of projects for a specified workspace, allowing customization through parameters such as limit, offset, archived status, and optional fields, using the GET method.
@@ -3760,9 +3346,7 @@ class AsanaApp(APIApplication):
3760
3346
  response.raise_for_status()
3761
3347
  return response.json()
3762
3348
 
3763
- def create_aproject_in_aworkspace(
3764
- self, workspace_gid, opt_fields=None, opt_pretty=None, data=None
3765
- ) -> dict[str, Any]:
3349
+ async def create_aproject_in_aworkspace(self, workspace_gid, opt_fields=None, opt_pretty=None, data=None) -> dict[str, Any]:
3766
3350
  """
3767
3351
  Creates a new project within the specified workspace using optional query parameters to control response fields and formatting.
3768
3352
 
@@ -4052,23 +3636,15 @@ class AsanaApp(APIApplication):
4052
3636
  """
4053
3637
  if workspace_gid is None:
4054
3638
  raise ValueError("Missing required parameter 'workspace_gid'")
4055
- request_body = {
4056
- "data": data,
4057
- }
3639
+ request_body = {"data": data}
4058
3640
  request_body = {k: v for k, v in request_body.items() if v is not None}
4059
3641
  url = f"{self.base_url}/workspaces/{workspace_gid}/projects"
4060
- query_params = {
4061
- k: v
4062
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
4063
- if v is not None
4064
- }
3642
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
4065
3643
  response = self._post(url, data=request_body, params=query_params)
4066
3644
  response.raise_for_status()
4067
3645
  return response.json()
4068
3646
 
4069
- def add_acustom_field_to_aproject(
4070
- self, project_gid, opt_fields=None, opt_pretty=None, data=None
4071
- ) -> dict[str, Any]:
3647
+ async def add_acustom_field_to_aproject(self, project_gid, opt_fields=None, opt_pretty=None, data=None) -> dict[str, Any]:
4072
3648
  """
4073
3649
  Adds a custom field setting to a specified project using the POST method via the API endpoint "/projects/{project_gid}/addCustomFieldSetting", allowing optional query parameters for field selection and response formatting.
4074
3650
 
@@ -4098,23 +3674,15 @@ class AsanaApp(APIApplication):
4098
3674
  """
4099
3675
  if project_gid is None:
4100
3676
  raise ValueError("Missing required parameter 'project_gid'")
4101
- request_body = {
4102
- "data": data,
4103
- }
3677
+ request_body = {"data": data}
4104
3678
  request_body = {k: v for k, v in request_body.items() if v is not None}
4105
3679
  url = f"{self.base_url}/projects/{project_gid}/addCustomFieldSetting"
4106
- query_params = {
4107
- k: v
4108
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
4109
- if v is not None
4110
- }
3680
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
4111
3681
  response = self._post(url, data=request_body, params=query_params)
4112
3682
  response.raise_for_status()
4113
3683
  return response.json()
4114
3684
 
4115
- def remove_acustom_field_from_aproject(
4116
- self, project_gid, opt_pretty=None, data=None
4117
- ) -> dict[str, Any]:
3685
+ async def remove_acustom_field_from_aproject(self, project_gid, opt_pretty=None, data=None) -> dict[str, Any]:
4118
3686
  """
4119
3687
  Removes a custom field setting from a specified project using the Asana API by sending a POST request to the "/projects/{project_gid}/removeCustomFieldSetting" endpoint.
4120
3688
 
@@ -4140,9 +3708,7 @@ class AsanaApp(APIApplication):
4140
3708
  """
4141
3709
  if project_gid is None:
4142
3710
  raise ValueError("Missing required parameter 'project_gid'")
4143
- request_body = {
4144
- "data": data,
4145
- }
3711
+ request_body = {"data": data}
4146
3712
  request_body = {k: v for k, v in request_body.items() if v is not None}
4147
3713
  url = f"{self.base_url}/projects/{project_gid}/removeCustomFieldSetting"
4148
3714
  query_params = {k: v for k, v in [("opt_pretty", opt_pretty)] if v is not None}
@@ -4150,9 +3716,7 @@ class AsanaApp(APIApplication):
4150
3716
  response.raise_for_status()
4151
3717
  return response.json()
4152
3718
 
4153
- def get_task_count_of_aproject(
4154
- self, project_gid, opt_fields=None, opt_pretty=None
4155
- ) -> dict[str, Any]:
3719
+ async def get_task_count_of_aproject(self, project_gid, opt_fields=None, opt_pretty=None) -> dict[str, Any]:
4156
3720
  """
4157
3721
  Retrieves task counts for a specified project using the Asana API, allowing users to obtain an object containing task count fields by opting in with the `opt_fields` parameter.
4158
3722
 
@@ -4171,18 +3735,12 @@ class AsanaApp(APIApplication):
4171
3735
  if project_gid is None:
4172
3736
  raise ValueError("Missing required parameter 'project_gid'")
4173
3737
  url = f"{self.base_url}/projects/{project_gid}/task_counts"
4174
- query_params = {
4175
- k: v
4176
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
4177
- if v is not None
4178
- }
3738
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
4179
3739
  response = self._get(url, params=query_params)
4180
3740
  response.raise_for_status()
4181
3741
  return response.json()
4182
3742
 
4183
- def add_users_to_aproject(
4184
- self, project_gid, opt_fields=None, opt_pretty=None, data=None
4185
- ) -> dict[str, Any]:
3743
+ async def add_users_to_aproject(self, project_gid, opt_fields=None, opt_pretty=None, data=None) -> dict[str, Any]:
4186
3744
  """
4187
3745
  Adds members to a project specified by its project GID using the POST method.
4188
3746
 
@@ -4209,23 +3767,15 @@ class AsanaApp(APIApplication):
4209
3767
  """
4210
3768
  if project_gid is None:
4211
3769
  raise ValueError("Missing required parameter 'project_gid'")
4212
- request_body = {
4213
- "data": data,
4214
- }
3770
+ request_body = {"data": data}
4215
3771
  request_body = {k: v for k, v in request_body.items() if v is not None}
4216
3772
  url = f"{self.base_url}/projects/{project_gid}/addMembers"
4217
- query_params = {
4218
- k: v
4219
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
4220
- if v is not None
4221
- }
3773
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
4222
3774
  response = self._post(url, data=request_body, params=query_params)
4223
3775
  response.raise_for_status()
4224
3776
  return response.json()
4225
3777
 
4226
- def remove_users_from_aproject(
4227
- self, project_gid, opt_fields=None, opt_pretty=None, data=None
4228
- ) -> dict[str, Any]:
3778
+ async def remove_users_from_aproject(self, project_gid, opt_fields=None, opt_pretty=None, data=None) -> dict[str, Any]:
4229
3779
  """
4230
3780
  Removes specified members from a project using their identifiers and returns an updated project object or error status.
4231
3781
 
@@ -4252,23 +3802,15 @@ class AsanaApp(APIApplication):
4252
3802
  """
4253
3803
  if project_gid is None:
4254
3804
  raise ValueError("Missing required parameter 'project_gid'")
4255
- request_body = {
4256
- "data": data,
4257
- }
3805
+ request_body = {"data": data}
4258
3806
  request_body = {k: v for k, v in request_body.items() if v is not None}
4259
3807
  url = f"{self.base_url}/projects/{project_gid}/removeMembers"
4260
- query_params = {
4261
- k: v
4262
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
4263
- if v is not None
4264
- }
3808
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
4265
3809
  response = self._post(url, data=request_body, params=query_params)
4266
3810
  response.raise_for_status()
4267
3811
  return response.json()
4268
3812
 
4269
- def add_followers_to_aproject(
4270
- self, project_gid, opt_fields=None, opt_pretty=None, data=None
4271
- ) -> dict[str, Any]:
3813
+ async def add_followers_to_aproject(self, project_gid, opt_fields=None, opt_pretty=None, data=None) -> dict[str, Any]:
4272
3814
  """
4273
3815
  Adds specified users as followers to a project and returns a success or error status.
4274
3816
 
@@ -4295,23 +3837,15 @@ class AsanaApp(APIApplication):
4295
3837
  """
4296
3838
  if project_gid is None:
4297
3839
  raise ValueError("Missing required parameter 'project_gid'")
4298
- request_body = {
4299
- "data": data,
4300
- }
3840
+ request_body = {"data": data}
4301
3841
  request_body = {k: v for k, v in request_body.items() if v is not None}
4302
3842
  url = f"{self.base_url}/projects/{project_gid}/addFollowers"
4303
- query_params = {
4304
- k: v
4305
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
4306
- if v is not None
4307
- }
3843
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
4308
3844
  response = self._post(url, data=request_body, params=query_params)
4309
3845
  response.raise_for_status()
4310
3846
  return response.json()
4311
3847
 
4312
- def remove_followers_from_aproject(
4313
- self, project_gid, opt_fields=None, opt_pretty=None, data=None
4314
- ) -> dict[str, Any]:
3848
+ async def remove_followers_from_aproject(self, project_gid, opt_fields=None, opt_pretty=None, data=None) -> dict[str, Any]:
4315
3849
  """
4316
3850
  Removes specified followers from a project identified by its GID, updating the project's record without affecting its membership status.
4317
3851
 
@@ -4338,23 +3872,15 @@ class AsanaApp(APIApplication):
4338
3872
  """
4339
3873
  if project_gid is None:
4340
3874
  raise ValueError("Missing required parameter 'project_gid'")
4341
- request_body = {
4342
- "data": data,
4343
- }
3875
+ request_body = {"data": data}
4344
3876
  request_body = {k: v for k, v in request_body.items() if v is not None}
4345
3877
  url = f"{self.base_url}/projects/{project_gid}/removeFollowers"
4346
- query_params = {
4347
- k: v
4348
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
4349
- if v is not None
4350
- }
3878
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
4351
3879
  response = self._post(url, data=request_body, params=query_params)
4352
3880
  response.raise_for_status()
4353
3881
  return response.json()
4354
3882
 
4355
- def create_aproject_template_from_aproject(
4356
- self, project_gid, opt_fields=None, opt_pretty=None, data=None
4357
- ) -> dict[str, Any]:
3883
+ async def create_aproject_template_from_aproject(self, project_gid, opt_fields=None, opt_pretty=None, data=None) -> dict[str, Any]:
4358
3884
  """
4359
3885
  Saves a project as a template using the POST method at "/projects/{project_gid}/saveAsTemplate," allowing for the creation of new projects with predefined structures based on existing projects.
4360
3886
 
@@ -4384,23 +3910,15 @@ class AsanaApp(APIApplication):
4384
3910
  """
4385
3911
  if project_gid is None:
4386
3912
  raise ValueError("Missing required parameter 'project_gid'")
4387
- request_body = {
4388
- "data": data,
4389
- }
3913
+ request_body = {"data": data}
4390
3914
  request_body = {k: v for k, v in request_body.items() if v is not None}
4391
3915
  url = f"{self.base_url}/projects/{project_gid}/saveAsTemplate"
4392
- query_params = {
4393
- k: v
4394
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
4395
- if v is not None
4396
- }
3916
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
4397
3917
  response = self._post(url, data=request_body, params=query_params)
4398
3918
  response.raise_for_status()
4399
3919
  return response.json()
4400
3920
 
4401
- def get_aproject_brief(
4402
- self, project_brief_gid, opt_fields=None, opt_pretty=None
4403
- ) -> dict[str, Any]:
3921
+ async def get_aproject_brief(self, project_brief_gid, opt_fields=None, opt_pretty=None) -> dict[str, Any]:
4404
3922
  """
4405
3923
  Retrieves a specific project brief identified by its unique identifier and returns its details, optionally including additional fields or formatted responses.
4406
3924
 
@@ -4419,18 +3937,12 @@ class AsanaApp(APIApplication):
4419
3937
  if project_brief_gid is None:
4420
3938
  raise ValueError("Missing required parameter 'project_brief_gid'")
4421
3939
  url = f"{self.base_url}/project_briefs/{project_brief_gid}"
4422
- query_params = {
4423
- k: v
4424
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
4425
- if v is not None
4426
- }
3940
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
4427
3941
  response = self._get(url, params=query_params)
4428
3942
  response.raise_for_status()
4429
3943
  return response.json()
4430
3944
 
4431
- def update_aproject_brief(
4432
- self, project_brief_gid, opt_fields=None, opt_pretty=None, data=None
4433
- ) -> dict[str, Any]:
3945
+ async def update_aproject_brief(self, project_brief_gid, opt_fields=None, opt_pretty=None, data=None) -> dict[str, Any]:
4434
3946
  """
4435
3947
  Updates or replaces a project brief with the specified ID and returns the modified resource.
4436
3948
 
@@ -4448,7 +3960,7 @@ class AsanaApp(APIApplication):
4448
3960
  "html_text": "<body>This is a <strong>project brief</strong>.</body>",
4449
3961
  "resource_type": "task",
4450
3962
  "text": "This is a project brief.",
4451
- "title": "Stuff to buy \u2014 Project Brief"
3963
+ "title": "Stuff to buy Project Brief"
4452
3964
  }
4453
3965
  }
4454
3966
  ```
@@ -4461,23 +3973,15 @@ class AsanaApp(APIApplication):
4461
3973
  """
4462
3974
  if project_brief_gid is None:
4463
3975
  raise ValueError("Missing required parameter 'project_brief_gid'")
4464
- request_body = {
4465
- "data": data,
4466
- }
3976
+ request_body = {"data": data}
4467
3977
  request_body = {k: v for k, v in request_body.items() if v is not None}
4468
3978
  url = f"{self.base_url}/project_briefs/{project_brief_gid}"
4469
- query_params = {
4470
- k: v
4471
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
4472
- if v is not None
4473
- }
3979
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
4474
3980
  response = self._put(url, data=request_body, params=query_params)
4475
3981
  response.raise_for_status()
4476
3982
  return response.json()
4477
3983
 
4478
- def delete_aproject_brief(
4479
- self, project_brief_gid, opt_pretty=None
4480
- ) -> dict[str, Any]:
3984
+ async def delete_aproject_brief(self, project_brief_gid, opt_pretty=None) -> dict[str, Any]:
4481
3985
  """
4482
3986
  Deletes a specific project brief identified by its GID using the Asana API and returns an empty data record upon successful deletion.
4483
3987
 
@@ -4500,9 +4004,7 @@ class AsanaApp(APIApplication):
4500
4004
  response.raise_for_status()
4501
4005
  return response.json()
4502
4006
 
4503
- def create_aproject_brief(
4504
- self, project_gid, opt_fields=None, opt_pretty=None, data=None
4505
- ) -> dict[str, Any]:
4007
+ async def create_aproject_brief(self, project_gid, opt_fields=None, opt_pretty=None, data=None) -> dict[str, Any]:
4506
4008
  """
4507
4009
  Creates a project brief for the specified project using the provided data and returns the newly created brief.
4508
4010
 
@@ -4520,7 +4022,7 @@ class AsanaApp(APIApplication):
4520
4022
  "html_text": "<body>This is a <strong>project brief</strong>.</body>",
4521
4023
  "resource_type": "task",
4522
4024
  "text": "This is a project brief.",
4523
- "title": "Stuff to buy \u2014 Project Brief"
4025
+ "title": "Stuff to buy Project Brief"
4524
4026
  }
4525
4027
  }
4526
4028
  ```
@@ -4533,23 +4035,15 @@ class AsanaApp(APIApplication):
4533
4035
  """
4534
4036
  if project_gid is None:
4535
4037
  raise ValueError("Missing required parameter 'project_gid'")
4536
- request_body = {
4537
- "data": data,
4538
- }
4038
+ request_body = {"data": data}
4539
4039
  request_body = {k: v for k, v in request_body.items() if v is not None}
4540
4040
  url = f"{self.base_url}/projects/{project_gid}/project_briefs"
4541
- query_params = {
4542
- k: v
4543
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
4544
- if v is not None
4545
- }
4041
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
4546
4042
  response = self._post(url, data=request_body, params=query_params)
4547
4043
  response.raise_for_status()
4548
4044
  return response.json()
4549
4045
 
4550
- def get_aproject_membership(
4551
- self, project_membership_gid, opt_fields=None, opt_pretty=None
4552
- ) -> dict[str, Any]:
4046
+ async def get_aproject_membership(self, project_membership_gid, opt_fields=None, opt_pretty=None) -> dict[str, Any]:
4553
4047
  """
4554
4048
  Retrieves details of a specific project membership by its ID, including optional fields and formatted output.
4555
4049
 
@@ -4568,23 +4062,13 @@ class AsanaApp(APIApplication):
4568
4062
  if project_membership_gid is None:
4569
4063
  raise ValueError("Missing required parameter 'project_membership_gid'")
4570
4064
  url = f"{self.base_url}/project_memberships/{project_membership_gid}"
4571
- query_params = {
4572
- k: v
4573
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
4574
- if v is not None
4575
- }
4065
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
4576
4066
  response = self._get(url, params=query_params)
4577
4067
  response.raise_for_status()
4578
4068
  return response.json()
4579
4069
 
4580
- def get_memberships_from_aproject(
4581
- self,
4582
- project_gid,
4583
- opt_fields=None,
4584
- user=None,
4585
- opt_pretty=None,
4586
- limit=None,
4587
- offset=None,
4070
+ async def get_memberships_from_aproject(
4071
+ self, project_gid, opt_fields=None, user=None, opt_pretty=None, limit=None, offset=None
4588
4072
  ) -> dict[str, Any]:
4589
4073
  """
4590
4074
  Retrieves a list of project memberships with optional query parameters for filtering and pagination.
@@ -4612,22 +4096,14 @@ class AsanaApp(APIApplication):
4612
4096
  url = f"{self.base_url}/projects/{project_gid}/project_memberships"
4613
4097
  query_params = {
4614
4098
  k: v
4615
- for k, v in [
4616
- ("opt_fields", opt_fields),
4617
- ("user", user),
4618
- ("opt_pretty", opt_pretty),
4619
- ("limit", limit),
4620
- ("offset", offset),
4621
- ]
4099
+ for k, v in [("opt_fields", opt_fields), ("user", user), ("opt_pretty", opt_pretty), ("limit", limit), ("offset", offset)]
4622
4100
  if v is not None
4623
4101
  }
4624
4102
  response = self._get(url, params=query_params)
4625
4103
  response.raise_for_status()
4626
4104
  return response.json()
4627
4105
 
4628
- def get_aproject_status(
4629
- self, project_status_gid, opt_fields=None, opt_pretty=None
4630
- ) -> dict[str, Any]:
4106
+ async def get_aproject_status(self, project_status_gid, opt_fields=None, opt_pretty=None) -> dict[str, Any]:
4631
4107
  """
4632
4108
  Retrieves a specific project status by its GID using the "GET" method, allowing for optional fields and pretty-printing.
4633
4109
 
@@ -4646,18 +4122,12 @@ class AsanaApp(APIApplication):
4646
4122
  if project_status_gid is None:
4647
4123
  raise ValueError("Missing required parameter 'project_status_gid'")
4648
4124
  url = f"{self.base_url}/project_statuses/{project_status_gid}"
4649
- query_params = {
4650
- k: v
4651
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
4652
- if v is not None
4653
- }
4125
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
4654
4126
  response = self._get(url, params=query_params)
4655
4127
  response.raise_for_status()
4656
4128
  return response.json()
4657
4129
 
4658
- def delete_aproject_status(
4659
- self, project_status_gid, opt_pretty=None
4660
- ) -> dict[str, Any]:
4130
+ async def delete_aproject_status(self, project_status_gid, opt_pretty=None) -> dict[str, Any]:
4661
4131
  """
4662
4132
  Deletes a specific project status by its GID and returns an empty response upon success.
4663
4133
 
@@ -4680,9 +4150,7 @@ class AsanaApp(APIApplication):
4680
4150
  response.raise_for_status()
4681
4151
  return response.json()
4682
4152
 
4683
- def get_statuses_from_aproject(
4684
- self, project_gid, opt_pretty=None, limit=None, offset=None, opt_fields=None
4685
- ) -> dict[str, Any]:
4153
+ async def get_statuses_from_aproject(self, project_gid, opt_pretty=None, limit=None, offset=None, opt_fields=None) -> dict[str, Any]:
4686
4154
  """
4687
4155
  Retrieves a list of project statuses for a specified project and returns paginated results with optional field filtering.
4688
4156
 
@@ -4707,22 +4175,13 @@ class AsanaApp(APIApplication):
4707
4175
  raise ValueError("Missing required parameter 'project_gid'")
4708
4176
  url = f"{self.base_url}/projects/{project_gid}/project_statuses"
4709
4177
  query_params = {
4710
- k: v
4711
- for k, v in [
4712
- ("opt_pretty", opt_pretty),
4713
- ("limit", limit),
4714
- ("offset", offset),
4715
- ("opt_fields", opt_fields),
4716
- ]
4717
- if v is not None
4178
+ k: v for k, v in [("opt_pretty", opt_pretty), ("limit", limit), ("offset", offset), ("opt_fields", opt_fields)] if v is not None
4718
4179
  }
4719
4180
  response = self._get(url, params=query_params)
4720
4181
  response.raise_for_status()
4721
4182
  return response.json()
4722
4183
 
4723
- def create_aproject_status(
4724
- self, project_gid, opt_fields=None, opt_pretty=None, data=None
4725
- ) -> dict[str, Any]:
4184
+ async def create_aproject_status(self, project_gid, opt_fields=None, opt_pretty=None, data=None) -> dict[str, Any]:
4726
4185
  """
4727
4186
  Creates a new project status for the specified project and returns the created status, supporting optional field selection and pretty-printed responses.
4728
4187
 
@@ -4754,23 +4213,15 @@ class AsanaApp(APIApplication):
4754
4213
  """
4755
4214
  if project_gid is None:
4756
4215
  raise ValueError("Missing required parameter 'project_gid'")
4757
- request_body = {
4758
- "data": data,
4759
- }
4216
+ request_body = {"data": data}
4760
4217
  request_body = {k: v for k, v in request_body.items() if v is not None}
4761
4218
  url = f"{self.base_url}/projects/{project_gid}/project_statuses"
4762
- query_params = {
4763
- k: v
4764
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
4765
- if v is not None
4766
- }
4219
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
4767
4220
  response = self._post(url, data=request_body, params=query_params)
4768
4221
  response.raise_for_status()
4769
4222
  return response.json()
4770
4223
 
4771
- def get_aproject_template(
4772
- self, project_template_gid, opt_fields=None, opt_pretty=None
4773
- ) -> dict[str, Any]:
4224
+ async def get_aproject_template(self, project_template_gid, opt_fields=None, opt_pretty=None) -> dict[str, Any]:
4774
4225
  """
4775
4226
  Retrieves a specific project template by its unique identifier, providing configurable output fields and formatted responses.
4776
4227
 
@@ -4789,18 +4240,12 @@ class AsanaApp(APIApplication):
4789
4240
  if project_template_gid is None:
4790
4241
  raise ValueError("Missing required parameter 'project_template_gid'")
4791
4242
  url = f"{self.base_url}/project_templates/{project_template_gid}"
4792
- query_params = {
4793
- k: v
4794
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
4795
- if v is not None
4796
- }
4243
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
4797
4244
  response = self._get(url, params=query_params)
4798
4245
  response.raise_for_status()
4799
4246
  return response.json()
4800
4247
 
4801
- def delete_aproject_template(
4802
- self, project_template_gid, opt_pretty=None
4803
- ) -> dict[str, Any]:
4248
+ async def delete_aproject_template(self, project_template_gid, opt_pretty=None) -> dict[str, Any]:
4804
4249
  """
4805
4250
  Deletes an existing project template using the Asana API and returns an empty data record.
4806
4251
 
@@ -4823,14 +4268,8 @@ class AsanaApp(APIApplication):
4823
4268
  response.raise_for_status()
4824
4269
  return response.json()
4825
4270
 
4826
- def get_multiple_project_templates(
4827
- self,
4828
- workspace=None,
4829
- team=None,
4830
- limit=None,
4831
- offset=None,
4832
- opt_fields=None,
4833
- opt_pretty=None,
4271
+ async def get_multiple_project_templates(
4272
+ self, workspace=None, team=None, limit=None, offset=None, opt_fields=None, opt_pretty=None
4834
4273
  ) -> dict[str, Any]:
4835
4274
  """
4836
4275
  Retrieves a list of project templates, optionally filtered by workspace or team, with support for pagination and field selection.
@@ -4870,9 +4309,7 @@ class AsanaApp(APIApplication):
4870
4309
  response.raise_for_status()
4871
4310
  return response.json()
4872
4311
 
4873
- def get_ateam_sproject_templates(
4874
- self, team_gid, limit=None, offset=None, opt_fields=None, opt_pretty=None
4875
- ) -> dict[str, Any]:
4312
+ async def get_ateam_sproject_templates(self, team_gid, limit=None, offset=None, opt_fields=None, opt_pretty=None) -> dict[str, Any]:
4876
4313
  """
4877
4314
  Retrieves a paginated list of project templates associated with a specific team, supporting optional filtering and field customization.
4878
4315
 
@@ -4897,20 +4334,13 @@ class AsanaApp(APIApplication):
4897
4334
  raise ValueError("Missing required parameter 'team_gid'")
4898
4335
  url = f"{self.base_url}/teams/{team_gid}/project_templates"
4899
4336
  query_params = {
4900
- k: v
4901
- for k, v in [
4902
- ("limit", limit),
4903
- ("offset", offset),
4904
- ("opt_fields", opt_fields),
4905
- ("opt_pretty", opt_pretty),
4906
- ]
4907
- if v is not None
4337
+ k: v for k, v in [("limit", limit), ("offset", offset), ("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None
4908
4338
  }
4909
4339
  response = self._get(url, params=query_params)
4910
4340
  response.raise_for_status()
4911
4341
  return response.json()
4912
4342
 
4913
- def instantiate_aproject_from_aproject_template(
4343
+ async def instantiate_aproject_from_aproject_template(
4914
4344
  self, project_template_gid, opt_fields=None, opt_pretty=None, data=None
4915
4345
  ) -> dict[str, Any]:
4916
4346
  """
@@ -4963,21 +4393,15 @@ class AsanaApp(APIApplication):
4963
4393
  """
4964
4394
  if project_template_gid is None:
4965
4395
  raise ValueError("Missing required parameter 'project_template_gid'")
4966
- request_body = {
4967
- "data": data,
4968
- }
4396
+ request_body = {"data": data}
4969
4397
  request_body = {k: v for k, v in request_body.items() if v is not None}
4970
4398
  url = f"{self.base_url}/project_templates/{project_template_gid}/instantiateProject"
4971
- query_params = {
4972
- k: v
4973
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
4974
- if v is not None
4975
- }
4399
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
4976
4400
  response = self._post(url, data=request_body, params=query_params)
4977
4401
  response.raise_for_status()
4978
4402
  return response.json()
4979
4403
 
4980
- def trigger_arule(self, rule_trigger_gid, data=None) -> dict[str, Any]:
4404
+ async def trigger_arule(self, rule_trigger_gid, data=None) -> dict[str, Any]:
4981
4405
  """
4982
4406
  Triggers the execution of a specific rule using the API defined at the path "/rule_triggers/{rule_trigger_gid}/run" via a POST request.
4983
4407
 
@@ -5005,9 +4429,7 @@ class AsanaApp(APIApplication):
5005
4429
  """
5006
4430
  if rule_trigger_gid is None:
5007
4431
  raise ValueError("Missing required parameter 'rule_trigger_gid'")
5008
- request_body = {
5009
- "data": data,
5010
- }
4432
+ request_body = {"data": data}
5011
4433
  request_body = {k: v for k, v in request_body.items() if v is not None}
5012
4434
  url = f"{self.base_url}/rule_triggers/{rule_trigger_gid}/run"
5013
4435
  query_params = {}
@@ -5015,9 +4437,7 @@ class AsanaApp(APIApplication):
5015
4437
  response.raise_for_status()
5016
4438
  return response.json()
5017
4439
 
5018
- def get_asection(
5019
- self, section_gid, opt_fields=None, opt_pretty=None
5020
- ) -> dict[str, Any]:
4440
+ async def get_asection(self, section_gid, opt_fields=None, opt_pretty=None) -> dict[str, Any]:
5021
4441
  """
5022
4442
  Retrieves information about a specific section using the "GET" method at the "/sections/{section_gid}" endpoint, optionally allowing customization with additional fields and pretty-printing.
5023
4443
 
@@ -5036,18 +4456,12 @@ class AsanaApp(APIApplication):
5036
4456
  if section_gid is None:
5037
4457
  raise ValueError("Missing required parameter 'section_gid'")
5038
4458
  url = f"{self.base_url}/sections/{section_gid}"
5039
- query_params = {
5040
- k: v
5041
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
5042
- if v is not None
5043
- }
4459
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
5044
4460
  response = self._get(url, params=query_params)
5045
4461
  response.raise_for_status()
5046
4462
  return response.json()
5047
4463
 
5048
- def update_asection(
5049
- self, section_gid, opt_fields=None, opt_pretty=None, data=None
5050
- ) -> dict[str, Any]:
4464
+ async def update_asection(self, section_gid, opt_fields=None, opt_pretty=None, data=None) -> dict[str, Any]:
5051
4465
  """
5052
4466
  Updates or replaces a specific section resource identified by its GID, returning relevant status messages based on success or failure, with optional parameters for customizing output fields and formatting.
5053
4467
 
@@ -5076,21 +4490,15 @@ class AsanaApp(APIApplication):
5076
4490
  """
5077
4491
  if section_gid is None:
5078
4492
  raise ValueError("Missing required parameter 'section_gid'")
5079
- request_body = {
5080
- "data": data,
5081
- }
4493
+ request_body = {"data": data}
5082
4494
  request_body = {k: v for k, v in request_body.items() if v is not None}
5083
4495
  url = f"{self.base_url}/sections/{section_gid}"
5084
- query_params = {
5085
- k: v
5086
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
5087
- if v is not None
5088
- }
4496
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
5089
4497
  response = self._put(url, data=request_body, params=query_params)
5090
4498
  response.raise_for_status()
5091
4499
  return response.json()
5092
4500
 
5093
- def delete_asection(self, section_gid, opt_pretty=None) -> dict[str, Any]:
4501
+ async def delete_asection(self, section_gid, opt_pretty=None) -> dict[str, Any]:
5094
4502
  """
5095
4503
  Deletes the specified section identified by its global ID and returns a success or error status.
5096
4504
 
@@ -5113,9 +4521,7 @@ class AsanaApp(APIApplication):
5113
4521
  response.raise_for_status()
5114
4522
  return response.json()
5115
4523
 
5116
- def get_sections_in_aproject(
5117
- self, project_gid, limit=None, offset=None, opt_fields=None, opt_pretty=None
5118
- ) -> dict[str, Any]:
4524
+ async def get_sections_in_aproject(self, project_gid, limit=None, offset=None, opt_fields=None, opt_pretty=None) -> dict[str, Any]:
5119
4525
  """
5120
4526
  Retrieves a list of sections associated with a specific project, supporting optional query parameters for pagination and field customization.
5121
4527
 
@@ -5140,22 +4546,13 @@ class AsanaApp(APIApplication):
5140
4546
  raise ValueError("Missing required parameter 'project_gid'")
5141
4547
  url = f"{self.base_url}/projects/{project_gid}/sections"
5142
4548
  query_params = {
5143
- k: v
5144
- for k, v in [
5145
- ("limit", limit),
5146
- ("offset", offset),
5147
- ("opt_fields", opt_fields),
5148
- ("opt_pretty", opt_pretty),
5149
- ]
5150
- if v is not None
4549
+ k: v for k, v in [("limit", limit), ("offset", offset), ("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None
5151
4550
  }
5152
4551
  response = self._get(url, params=query_params)
5153
4552
  response.raise_for_status()
5154
4553
  return response.json()
5155
4554
 
5156
- def create_asection_in_aproject(
5157
- self, project_gid, opt_fields=None, opt_pretty=None, data=None
5158
- ) -> dict[str, Any]:
4555
+ async def create_asection_in_aproject(self, project_gid, opt_fields=None, opt_pretty=None, data=None) -> dict[str, Any]:
5159
4556
  """
5160
4557
  Creates a new section in a specified project using the Asana API and returns a status message.
5161
4558
 
@@ -5184,23 +4581,15 @@ class AsanaApp(APIApplication):
5184
4581
  """
5185
4582
  if project_gid is None:
5186
4583
  raise ValueError("Missing required parameter 'project_gid'")
5187
- request_body = {
5188
- "data": data,
5189
- }
4584
+ request_body = {"data": data}
5190
4585
  request_body = {k: v for k, v in request_body.items() if v is not None}
5191
4586
  url = f"{self.base_url}/projects/{project_gid}/sections"
5192
- query_params = {
5193
- k: v
5194
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
5195
- if v is not None
5196
- }
4587
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
5197
4588
  response = self._post(url, data=request_body, params=query_params)
5198
4589
  response.raise_for_status()
5199
4590
  return response.json()
5200
4591
 
5201
- def add_task_to_section(
5202
- self, section_gid, opt_pretty=None, data=None
5203
- ) -> dict[str, Any]:
4592
+ async def add_task_to_section(self, section_gid, opt_pretty=None, data=None) -> dict[str, Any]:
5204
4593
  """
5205
4594
  Adds a task to the specified section using the POST method.
5206
4595
 
@@ -5228,9 +4617,7 @@ class AsanaApp(APIApplication):
5228
4617
  """
5229
4618
  if section_gid is None:
5230
4619
  raise ValueError("Missing required parameter 'section_gid'")
5231
- request_body = {
5232
- "data": data,
5233
- }
4620
+ request_body = {"data": data}
5234
4621
  request_body = {k: v for k, v in request_body.items() if v is not None}
5235
4622
  url = f"{self.base_url}/sections/{section_gid}/addTask"
5236
4623
  query_params = {k: v for k, v in [("opt_pretty", opt_pretty)] if v is not None}
@@ -5238,9 +4625,7 @@ class AsanaApp(APIApplication):
5238
4625
  response.raise_for_status()
5239
4626
  return response.json()
5240
4627
 
5241
- def move_or_insert_sections(
5242
- self, project_gid, opt_pretty=None, data=None
5243
- ) -> dict[str, Any]:
4628
+ async def move_or_insert_sections(self, project_gid, opt_pretty=None, data=None) -> dict[str, Any]:
5244
4629
  """
5245
4630
  Inserts a new section into a specific project and returns the operation's status.
5246
4631
 
@@ -5268,9 +4653,7 @@ class AsanaApp(APIApplication):
5268
4653
  """
5269
4654
  if project_gid is None:
5270
4655
  raise ValueError("Missing required parameter 'project_gid'")
5271
- request_body = {
5272
- "data": data,
5273
- }
4656
+ request_body = {"data": data}
5274
4657
  request_body = {k: v for k, v in request_body.items() if v is not None}
5275
4658
  url = f"{self.base_url}/projects/{project_gid}/sections/insert"
5276
4659
  query_params = {k: v for k, v in [("opt_pretty", opt_pretty)] if v is not None}
@@ -5278,9 +4661,7 @@ class AsanaApp(APIApplication):
5278
4661
  response.raise_for_status()
5279
4662
  return response.json()
5280
4663
 
5281
- def get_astatus_update(
5282
- self, status_update_gid, opt_fields=None, opt_pretty=None
5283
- ) -> dict[str, Any]:
4664
+ async def get_astatus_update(self, status_update_gid, opt_fields=None, opt_pretty=None) -> dict[str, Any]:
5284
4665
  """
5285
4666
  Retrieves a specific status update's details and associated metadata based on the provided status update identifier.
5286
4667
 
@@ -5299,18 +4680,12 @@ class AsanaApp(APIApplication):
5299
4680
  if status_update_gid is None:
5300
4681
  raise ValueError("Missing required parameter 'status_update_gid'")
5301
4682
  url = f"{self.base_url}/status_updates/{status_update_gid}"
5302
- query_params = {
5303
- k: v
5304
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
5305
- if v is not None
5306
- }
4683
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
5307
4684
  response = self._get(url, params=query_params)
5308
4685
  response.raise_for_status()
5309
4686
  return response.json()
5310
4687
 
5311
- def delete_astatus_update(
5312
- self, status_update_gid, opt_pretty=None
5313
- ) -> dict[str, Any]:
4688
+ async def delete_astatus_update(self, status_update_gid, opt_pretty=None) -> dict[str, Any]:
5314
4689
  """
5315
4690
  Deletes a specific status update identified by its GID and returns a response based on the operation's success or failure.
5316
4691
 
@@ -5333,14 +4708,8 @@ class AsanaApp(APIApplication):
5333
4708
  response.raise_for_status()
5334
4709
  return response.json()
5335
4710
 
5336
- def get_status_updates_from_an_object(
5337
- self,
5338
- parent=None,
5339
- created_since=None,
5340
- opt_fields=None,
5341
- opt_pretty=None,
5342
- limit=None,
5343
- offset=None,
4711
+ async def get_status_updates_from_an_object(
4712
+ self, parent=None, created_since=None, opt_fields=None, opt_pretty=None, limit=None, offset=None
5344
4713
  ) -> dict[str, Any]:
5345
4714
  """
5346
4715
  Retrieves status updates with filtering options for parent, creation date, and other parameters, returning paginated results.
@@ -5380,9 +4749,7 @@ class AsanaApp(APIApplication):
5380
4749
  response.raise_for_status()
5381
4750
  return response.json()
5382
4751
 
5383
- def create_astatus_update(
5384
- self, opt_fields=None, opt_pretty=None, limit=None, offset=None, data=None
5385
- ) -> dict[str, Any]:
4752
+ async def create_astatus_update(self, opt_fields=None, opt_pretty=None, limit=None, offset=None, data=None) -> dict[str, Any]:
5386
4753
  """
5387
4754
  Creates a status update with optional fields, pagination controls, and returns success or error responses based on provided parameters.
5388
4755
 
@@ -5418,26 +4785,17 @@ class AsanaApp(APIApplication):
5418
4785
  Tags:
5419
4786
  Status updates
5420
4787
  """
5421
- request_body = {
5422
- "data": data,
5423
- }
4788
+ request_body = {"data": data}
5424
4789
  request_body = {k: v for k, v in request_body.items() if v is not None}
5425
4790
  url = f"{self.base_url}/status_updates"
5426
4791
  query_params = {
5427
- k: v
5428
- for k, v in [
5429
- ("opt_fields", opt_fields),
5430
- ("opt_pretty", opt_pretty),
5431
- ("limit", limit),
5432
- ("offset", offset),
5433
- ]
5434
- if v is not None
4792
+ k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty), ("limit", limit), ("offset", offset)] if v is not None
5435
4793
  }
5436
4794
  response = self._post(url, data=request_body, params=query_params)
5437
4795
  response.raise_for_status()
5438
4796
  return response.json()
5439
4797
 
5440
- def get_astory(self, story_gid, opt_fields=None, opt_pretty=None) -> dict[str, Any]:
4798
+ async def get_astory(self, story_gid, opt_fields=None, opt_pretty=None) -> dict[str, Any]:
5441
4799
  """
5442
4800
  Retrieves a specific story by its globally unique identifier (GID) with optional fields and formatting parameters.
5443
4801
 
@@ -5456,18 +4814,12 @@ class AsanaApp(APIApplication):
5456
4814
  if story_gid is None:
5457
4815
  raise ValueError("Missing required parameter 'story_gid'")
5458
4816
  url = f"{self.base_url}/stories/{story_gid}"
5459
- query_params = {
5460
- k: v
5461
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
5462
- if v is not None
5463
- }
4817
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
5464
4818
  response = self._get(url, params=query_params)
5465
4819
  response.raise_for_status()
5466
4820
  return response.json()
5467
4821
 
5468
- def update_astory(
5469
- self, story_gid, opt_fields=None, opt_pretty=None, data=None
5470
- ) -> dict[str, Any]:
4822
+ async def update_astory(self, story_gid, opt_fields=None, opt_pretty=None, data=None) -> dict[str, Any]:
5471
4823
  """
5472
4824
  Updates or creates a story at the specified path "/stories/{story_gid}" using the provided data.
5473
4825
 
@@ -5501,21 +4853,15 @@ class AsanaApp(APIApplication):
5501
4853
  """
5502
4854
  if story_gid is None:
5503
4855
  raise ValueError("Missing required parameter 'story_gid'")
5504
- request_body = {
5505
- "data": data,
5506
- }
4856
+ request_body = {"data": data}
5507
4857
  request_body = {k: v for k, v in request_body.items() if v is not None}
5508
4858
  url = f"{self.base_url}/stories/{story_gid}"
5509
- query_params = {
5510
- k: v
5511
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
5512
- if v is not None
5513
- }
4859
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
5514
4860
  response = self._put(url, data=request_body, params=query_params)
5515
4861
  response.raise_for_status()
5516
4862
  return response.json()
5517
4863
 
5518
- def delete_astory(self, story_gid, opt_pretty=None) -> dict[str, Any]:
4864
+ async def delete_astory(self, story_gid, opt_pretty=None) -> dict[str, Any]:
5519
4865
  """
5520
4866
  Deletes a specific story identified by its story GID from the collection of stories.
5521
4867
 
@@ -5538,9 +4884,7 @@ class AsanaApp(APIApplication):
5538
4884
  response.raise_for_status()
5539
4885
  return response.json()
5540
4886
 
5541
- def get_stories_from_atask(
5542
- self, task_gid, limit=None, offset=None, opt_fields=None, opt_pretty=None
5543
- ) -> dict[str, Any]:
4887
+ async def get_stories_from_atask(self, task_gid, limit=None, offset=None, opt_fields=None, opt_pretty=None) -> dict[str, Any]:
5544
4888
  """
5545
4889
  Retrieves the stories associated with a specific task using the task's unique identifier and supports optional query parameters for pagination and field selection.
5546
4890
 
@@ -5565,22 +4909,13 @@ class AsanaApp(APIApplication):
5565
4909
  raise ValueError("Missing required parameter 'task_gid'")
5566
4910
  url = f"{self.base_url}/tasks/{task_gid}/stories"
5567
4911
  query_params = {
5568
- k: v
5569
- for k, v in [
5570
- ("limit", limit),
5571
- ("offset", offset),
5572
- ("opt_fields", opt_fields),
5573
- ("opt_pretty", opt_pretty),
5574
- ]
5575
- if v is not None
4912
+ k: v for k, v in [("limit", limit), ("offset", offset), ("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None
5576
4913
  }
5577
4914
  response = self._get(url, params=query_params)
5578
4915
  response.raise_for_status()
5579
4916
  return response.json()
5580
4917
 
5581
- def create_astory_on_atask(
5582
- self, task_gid, opt_fields=None, opt_pretty=None, data=None
5583
- ) -> dict[str, Any]:
4918
+ async def create_astory_on_atask(self, task_gid, opt_fields=None, opt_pretty=None, data=None) -> dict[str, Any]:
5584
4919
  """
5585
4920
  Creates a story for a specific task using the "POST" method at the "/tasks/{task_gid}/stories" endpoint, allowing for optional fields and formatting through query parameters.
5586
4921
 
@@ -5614,23 +4949,15 @@ class AsanaApp(APIApplication):
5614
4949
  """
5615
4950
  if task_gid is None:
5616
4951
  raise ValueError("Missing required parameter 'task_gid'")
5617
- request_body = {
5618
- "data": data,
5619
- }
4952
+ request_body = {"data": data}
5620
4953
  request_body = {k: v for k, v in request_body.items() if v is not None}
5621
4954
  url = f"{self.base_url}/tasks/{task_gid}/stories"
5622
- query_params = {
5623
- k: v
5624
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
5625
- if v is not None
5626
- }
4955
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
5627
4956
  response = self._post(url, data=request_body, params=query_params)
5628
4957
  response.raise_for_status()
5629
4958
  return response.json()
5630
4959
 
5631
- def get_multiple_tags(
5632
- self, limit=None, offset=None, workspace=None, opt_fields=None, opt_pretty=None
5633
- ) -> dict[str, Any]:
4960
+ async def get_multiple_tags(self, limit=None, offset=None, workspace=None, opt_fields=None, opt_pretty=None) -> dict[str, Any]:
5634
4961
  """
5635
4962
  Retrieves a list of tags using the "GET" method at the "/tags" endpoint, allowing customization with parameters for limit, offset, workspace, optional fields, and pretty formatting.
5636
4963
 
@@ -5667,9 +4994,7 @@ class AsanaApp(APIApplication):
5667
4994
  response.raise_for_status()
5668
4995
  return response.json()
5669
4996
 
5670
- def create_atag(
5671
- self, opt_fields=None, opt_pretty=None, data=None
5672
- ) -> dict[str, Any]:
4997
+ async def create_atag(self, opt_fields=None, opt_pretty=None, data=None) -> dict[str, Any]:
5673
4998
  """
5674
4999
  Creates a new tag entry with optional fields and formatted response.
5675
5000
 
@@ -5702,21 +5027,15 @@ class AsanaApp(APIApplication):
5702
5027
  Tags:
5703
5028
  Tags
5704
5029
  """
5705
- request_body = {
5706
- "data": data,
5707
- }
5030
+ request_body = {"data": data}
5708
5031
  request_body = {k: v for k, v in request_body.items() if v is not None}
5709
5032
  url = f"{self.base_url}/tags"
5710
- query_params = {
5711
- k: v
5712
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
5713
- if v is not None
5714
- }
5033
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
5715
5034
  response = self._post(url, data=request_body, params=query_params)
5716
5035
  response.raise_for_status()
5717
5036
  return response.json()
5718
5037
 
5719
- def get_atag(self, tag_gid, opt_fields=None, opt_pretty=None) -> dict[str, Any]:
5038
+ async def get_atag(self, tag_gid, opt_fields=None, opt_pretty=None) -> dict[str, Any]:
5720
5039
  """
5721
5040
  Retrieves information about a specific tag, identified by its GID, using the "GET" method at the path "/tags/{tag_gid}" with optional formatting and field selection.
5722
5041
 
@@ -5735,16 +5054,12 @@ class AsanaApp(APIApplication):
5735
5054
  if tag_gid is None:
5736
5055
  raise ValueError("Missing required parameter 'tag_gid'")
5737
5056
  url = f"{self.base_url}/tags/{tag_gid}"
5738
- query_params = {
5739
- k: v
5740
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
5741
- if v is not None
5742
- }
5057
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
5743
5058
  response = self._get(url, params=query_params)
5744
5059
  response.raise_for_status()
5745
5060
  return response.json()
5746
5061
 
5747
- def update_atag(self, tag_gid, opt_fields=None, opt_pretty=None) -> dict[str, Any]:
5062
+ async def update_atag(self, tag_gid, opt_fields=None, opt_pretty=None) -> dict[str, Any]:
5748
5063
  """
5749
5064
  Updates or replaces a Git tag with the specified GID and returns the operation status.
5750
5065
 
@@ -5763,16 +5078,12 @@ class AsanaApp(APIApplication):
5763
5078
  if tag_gid is None:
5764
5079
  raise ValueError("Missing required parameter 'tag_gid'")
5765
5080
  url = f"{self.base_url}/tags/{tag_gid}"
5766
- query_params = {
5767
- k: v
5768
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
5769
- if v is not None
5770
- }
5081
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
5771
5082
  response = self._put(url, data={}, params=query_params)
5772
5083
  response.raise_for_status()
5773
5084
  return response.json()
5774
5085
 
5775
- def delete_atag(self, tag_gid, opt_pretty=None) -> dict[str, Any]:
5086
+ async def delete_atag(self, tag_gid, opt_pretty=None) -> dict[str, Any]:
5776
5087
  """
5777
5088
  Deletes a specific tag from a repository using the API and returns relevant status messages, depending on the outcome of the deletion operation.
5778
5089
 
@@ -5795,9 +5106,7 @@ class AsanaApp(APIApplication):
5795
5106
  response.raise_for_status()
5796
5107
  return response.json()
5797
5108
 
5798
- def get_atask_stags(
5799
- self, task_gid, opt_fields=None, opt_pretty=None, limit=None, offset=None
5800
- ) -> dict[str, Any]:
5109
+ async def get_atask_stags(self, task_gid, opt_fields=None, opt_pretty=None, limit=None, offset=None) -> dict[str, Any]:
5801
5110
  """
5802
5111
  Retrieves the tags associated with a specific task using the task's unique identifier and supports optional filtering/pagination through query parameters.
5803
5112
 
@@ -5822,22 +5131,13 @@ class AsanaApp(APIApplication):
5822
5131
  raise ValueError("Missing required parameter 'task_gid'")
5823
5132
  url = f"{self.base_url}/tasks/{task_gid}/tags"
5824
5133
  query_params = {
5825
- k: v
5826
- for k, v in [
5827
- ("opt_fields", opt_fields),
5828
- ("opt_pretty", opt_pretty),
5829
- ("limit", limit),
5830
- ("offset", offset),
5831
- ]
5832
- if v is not None
5134
+ k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty), ("limit", limit), ("offset", offset)] if v is not None
5833
5135
  }
5834
5136
  response = self._get(url, params=query_params)
5835
5137
  response.raise_for_status()
5836
5138
  return response.json()
5837
5139
 
5838
- def get_tags_in_aworkspace(
5839
- self, workspace_gid, limit=None, offset=None, opt_fields=None, opt_pretty=None
5840
- ) -> dict[str, Any]:
5140
+ async def get_tags_in_aworkspace(self, workspace_gid, limit=None, offset=None, opt_fields=None, opt_pretty=None) -> dict[str, Any]:
5841
5141
  """
5842
5142
  Retrieves a list of tags associated with a specific workspace, with options to limit the response size and customize the output fields.
5843
5143
 
@@ -5862,22 +5162,13 @@ class AsanaApp(APIApplication):
5862
5162
  raise ValueError("Missing required parameter 'workspace_gid'")
5863
5163
  url = f"{self.base_url}/workspaces/{workspace_gid}/tags"
5864
5164
  query_params = {
5865
- k: v
5866
- for k, v in [
5867
- ("limit", limit),
5868
- ("offset", offset),
5869
- ("opt_fields", opt_fields),
5870
- ("opt_pretty", opt_pretty),
5871
- ]
5872
- if v is not None
5165
+ k: v for k, v in [("limit", limit), ("offset", offset), ("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None
5873
5166
  }
5874
5167
  response = self._get(url, params=query_params)
5875
5168
  response.raise_for_status()
5876
5169
  return response.json()
5877
5170
 
5878
- def create_atag_in_aworkspace(
5879
- self, workspace_gid, opt_fields=None, opt_pretty=None, data=None
5880
- ) -> dict[str, Any]:
5171
+ async def create_atag_in_aworkspace(self, workspace_gid, opt_fields=None, opt_pretty=None, data=None) -> dict[str, Any]:
5881
5172
  """
5882
5173
  Adds tags to a specified workspace using a POST request to the "/workspaces/{workspace_gid}/tags" endpoint.
5883
5174
 
@@ -5912,21 +5203,15 @@ class AsanaApp(APIApplication):
5912
5203
  """
5913
5204
  if workspace_gid is None:
5914
5205
  raise ValueError("Missing required parameter 'workspace_gid'")
5915
- request_body = {
5916
- "data": data,
5917
- }
5206
+ request_body = {"data": data}
5918
5207
  request_body = {k: v for k, v in request_body.items() if v is not None}
5919
5208
  url = f"{self.base_url}/workspaces/{workspace_gid}/tags"
5920
- query_params = {
5921
- k: v
5922
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
5923
- if v is not None
5924
- }
5209
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
5925
5210
  response = self._post(url, data=request_body, params=query_params)
5926
5211
  response.raise_for_status()
5927
5212
  return response.json()
5928
5213
 
5929
- def get_multiple_tasks(
5214
+ async def get_multiple_tasks(
5930
5215
  self,
5931
5216
  limit=None,
5932
5217
  offset=None,
@@ -5992,9 +5277,7 @@ class AsanaApp(APIApplication):
5992
5277
  response.raise_for_status()
5993
5278
  return response.json()
5994
5279
 
5995
- def create_atask(
5996
- self, opt_fields=None, opt_pretty=None, data=None
5997
- ) -> dict[str, Any]:
5280
+ async def create_atask(self, opt_fields=None, opt_pretty=None, data=None) -> dict[str, Any]:
5998
5281
  """
5999
5282
  Creates a new task using the API and returns a status message, allowing optional fields and pretty-printing configurations through query parameters.
6000
5283
 
@@ -6152,21 +5435,15 @@ class AsanaApp(APIApplication):
6152
5435
  Tags:
6153
5436
  Tasks
6154
5437
  """
6155
- request_body = {
6156
- "data": data,
6157
- }
5438
+ request_body = {"data": data}
6158
5439
  request_body = {k: v for k, v in request_body.items() if v is not None}
6159
5440
  url = f"{self.base_url}/tasks"
6160
- query_params = {
6161
- k: v
6162
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
6163
- if v is not None
6164
- }
5441
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
6165
5442
  response = self._post(url, data=request_body, params=query_params)
6166
5443
  response.raise_for_status()
6167
5444
  return response.json()
6168
5445
 
6169
- def get_atask(self, task_gid, opt_fields=None, opt_pretty=None) -> dict[str, Any]:
5446
+ async def get_atask(self, task_gid, opt_fields=None, opt_pretty=None) -> dict[str, Any]:
6170
5447
  """
6171
5448
  Retrieves task details using the Asana API and returns information about the specified task, with optional fields and formatting available through query parameters.
6172
5449
 
@@ -6185,18 +5462,12 @@ class AsanaApp(APIApplication):
6185
5462
  if task_gid is None:
6186
5463
  raise ValueError("Missing required parameter 'task_gid'")
6187
5464
  url = f"{self.base_url}/tasks/{task_gid}"
6188
- query_params = {
6189
- k: v
6190
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
6191
- if v is not None
6192
- }
5465
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
6193
5466
  response = self._get(url, params=query_params)
6194
5467
  response.raise_for_status()
6195
5468
  return response.json()
6196
5469
 
6197
- def update_atask(
6198
- self, task_gid, opt_fields=None, opt_pretty=None, data=None
6199
- ) -> dict[str, Any]:
5470
+ async def update_atask(self, task_gid, opt_fields=None, opt_pretty=None, data=None) -> dict[str, Any]:
6200
5471
  """
6201
5472
  Updates an existing task specified by its ID using the PUT method, allowing for a complete replacement of the task resource.
6202
5473
 
@@ -6357,21 +5628,15 @@ class AsanaApp(APIApplication):
6357
5628
  """
6358
5629
  if task_gid is None:
6359
5630
  raise ValueError("Missing required parameter 'task_gid'")
6360
- request_body = {
6361
- "data": data,
6362
- }
5631
+ request_body = {"data": data}
6363
5632
  request_body = {k: v for k, v in request_body.items() if v is not None}
6364
5633
  url = f"{self.base_url}/tasks/{task_gid}"
6365
- query_params = {
6366
- k: v
6367
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
6368
- if v is not None
6369
- }
5634
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
6370
5635
  response = self._put(url, data=request_body, params=query_params)
6371
5636
  response.raise_for_status()
6372
5637
  return response.json()
6373
5638
 
6374
- def delete_atask(self, task_gid, opt_pretty=None) -> dict[str, Any]:
5639
+ async def delete_atask(self, task_gid, opt_pretty=None) -> dict[str, Any]:
6375
5640
  """
6376
5641
  Deletes the specified task identified by the task_gid and returns an appropriate HTTP status code.
6377
5642
 
@@ -6394,9 +5659,7 @@ class AsanaApp(APIApplication):
6394
5659
  response.raise_for_status()
6395
5660
  return response.json()
6396
5661
 
6397
- def duplicate_atask(
6398
- self, task_gid, opt_fields=None, opt_pretty=None, data=None
6399
- ) -> dict[str, Any]:
5662
+ async def duplicate_atask(self, task_gid, opt_fields=None, opt_pretty=None, data=None) -> dict[str, Any]:
6400
5663
  """
6401
5664
  Duplicates a task using the Asana API and returns a job ID, requiring a subsequent update call to modify the new task's properties.
6402
5665
 
@@ -6424,28 +5687,16 @@ class AsanaApp(APIApplication):
6424
5687
  """
6425
5688
  if task_gid is None:
6426
5689
  raise ValueError("Missing required parameter 'task_gid'")
6427
- request_body = {
6428
- "data": data,
6429
- }
5690
+ request_body = {"data": data}
6430
5691
  request_body = {k: v for k, v in request_body.items() if v is not None}
6431
5692
  url = f"{self.base_url}/tasks/{task_gid}/duplicate"
6432
- query_params = {
6433
- k: v
6434
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
6435
- if v is not None
6436
- }
5693
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
6437
5694
  response = self._post(url, data=request_body, params=query_params)
6438
5695
  response.raise_for_status()
6439
5696
  return response.json()
6440
5697
 
6441
- def get_tasks_from_aproject(
6442
- self,
6443
- project_gid,
6444
- opt_fields=None,
6445
- completed_since=None,
6446
- opt_pretty=None,
6447
- limit=None,
6448
- offset=None,
5698
+ async def get_tasks_from_aproject(
5699
+ self, project_gid, opt_fields=None, completed_since=None, opt_pretty=None, limit=None, offset=None
6449
5700
  ) -> dict[str, Any]:
6450
5701
  """
6451
5702
  Retrieves a list of tasks associated with a specific project, supporting optional filtering and pagination parameters.
@@ -6486,14 +5737,8 @@ class AsanaApp(APIApplication):
6486
5737
  response.raise_for_status()
6487
5738
  return response.json()
6488
5739
 
6489
- def get_tasks_from_asection(
6490
- self,
6491
- section_gid,
6492
- opt_fields=None,
6493
- opt_pretty=None,
6494
- limit=None,
6495
- offset=None,
6496
- completed_since=None,
5740
+ async def get_tasks_from_asection(
5741
+ self, section_gid, opt_fields=None, opt_pretty=None, limit=None, offset=None, completed_since=None
6497
5742
  ) -> dict[str, Any]:
6498
5743
  """
6499
5744
  Retrieves a list of tasks within a specified section using the Asana API and returns the data based on optional query parameters such as fields, formatting, limit, offset, and completion status.
@@ -6534,9 +5779,7 @@ class AsanaApp(APIApplication):
6534
5779
  response.raise_for_status()
6535
5780
  return response.json()
6536
5781
 
6537
- def get_tasks_from_atag(
6538
- self, tag_gid, opt_fields=None, opt_pretty=None, limit=None, offset=None
6539
- ) -> dict[str, Any]:
5782
+ async def get_tasks_from_atag(self, tag_gid, opt_fields=None, opt_pretty=None, limit=None, offset=None) -> dict[str, Any]:
6540
5783
  """
6541
5784
  Retrieves a list of tasks associated with a specific tag, allowing for optional filtering by fields, formatting, and pagination using query parameters.
6542
5785
 
@@ -6561,27 +5804,14 @@ class AsanaApp(APIApplication):
6561
5804
  raise ValueError("Missing required parameter 'tag_gid'")
6562
5805
  url = f"{self.base_url}/tags/{tag_gid}/tasks"
6563
5806
  query_params = {
6564
- k: v
6565
- for k, v in [
6566
- ("opt_fields", opt_fields),
6567
- ("opt_pretty", opt_pretty),
6568
- ("limit", limit),
6569
- ("offset", offset),
6570
- ]
6571
- if v is not None
5807
+ k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty), ("limit", limit), ("offset", offset)] if v is not None
6572
5808
  }
6573
5809
  response = self._get(url, params=query_params)
6574
5810
  response.raise_for_status()
6575
5811
  return response.json()
6576
5812
 
6577
- def get_tasks_from_auser_task_list(
6578
- self,
6579
- user_task_list_gid,
6580
- opt_fields=None,
6581
- completed_since=None,
6582
- opt_pretty=None,
6583
- limit=None,
6584
- offset=None,
5813
+ async def get_tasks_from_auser_task_list(
5814
+ self, user_task_list_gid, opt_fields=None, completed_since=None, opt_pretty=None, limit=None, offset=None
6585
5815
  ) -> dict[str, Any]:
6586
5816
  """
6587
5817
  Retrieves a list of tasks associated with a specific user task list, allowing optional filtering by completion status, custom fields, and pagination limits.
@@ -6622,9 +5852,7 @@ class AsanaApp(APIApplication):
6622
5852
  response.raise_for_status()
6623
5853
  return response.json()
6624
5854
 
6625
- def get_subtasks_from_atask(
6626
- self, task_gid, limit=None, offset=None, opt_fields=None, opt_pretty=None
6627
- ) -> dict[str, Any]:
5855
+ async def get_subtasks_from_atask(self, task_gid, limit=None, offset=None, opt_fields=None, opt_pretty=None) -> dict[str, Any]:
6628
5856
  """
6629
5857
  Retrieves a list of subtasks for a specified task using the GET method, allowing optional parameters for customizing the response.
6630
5858
 
@@ -6649,22 +5877,13 @@ class AsanaApp(APIApplication):
6649
5877
  raise ValueError("Missing required parameter 'task_gid'")
6650
5878
  url = f"{self.base_url}/tasks/{task_gid}/subtasks"
6651
5879
  query_params = {
6652
- k: v
6653
- for k, v in [
6654
- ("limit", limit),
6655
- ("offset", offset),
6656
- ("opt_fields", opt_fields),
6657
- ("opt_pretty", opt_pretty),
6658
- ]
6659
- if v is not None
5880
+ k: v for k, v in [("limit", limit), ("offset", offset), ("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None
6660
5881
  }
6661
5882
  response = self._get(url, params=query_params)
6662
5883
  response.raise_for_status()
6663
5884
  return response.json()
6664
5885
 
6665
- def create_asubtask(
6666
- self, task_gid, opt_fields=None, opt_pretty=None, data=None
6667
- ) -> dict[str, Any]:
5886
+ async def create_asubtask(self, task_gid, opt_fields=None, opt_pretty=None, data=None) -> dict[str, Any]:
6668
5887
  """
6669
5888
  Creates a new subtask for the specified parent task and returns the created subtask details.
6670
5889
 
@@ -6825,23 +6044,15 @@ class AsanaApp(APIApplication):
6825
6044
  """
6826
6045
  if task_gid is None:
6827
6046
  raise ValueError("Missing required parameter 'task_gid'")
6828
- request_body = {
6829
- "data": data,
6830
- }
6047
+ request_body = {"data": data}
6831
6048
  request_body = {k: v for k, v in request_body.items() if v is not None}
6832
6049
  url = f"{self.base_url}/tasks/{task_gid}/subtasks"
6833
- query_params = {
6834
- k: v
6835
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
6836
- if v is not None
6837
- }
6050
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
6838
6051
  response = self._post(url, data=request_body, params=query_params)
6839
6052
  response.raise_for_status()
6840
6053
  return response.json()
6841
6054
 
6842
- def set_the_parent_of_atask(
6843
- self, task_gid, opt_fields=None, opt_pretty=None, data=None
6844
- ) -> dict[str, Any]:
6055
+ async def set_the_parent_of_atask(self, task_gid, opt_fields=None, opt_pretty=None, data=None) -> dict[str, Any]:
6845
6056
  """
6846
6057
  Changes the parent task of a specified task by submitting a POST request to the "/tasks/{task_gid}/setParent" endpoint.
6847
6058
 
@@ -6870,23 +6081,15 @@ class AsanaApp(APIApplication):
6870
6081
  """
6871
6082
  if task_gid is None:
6872
6083
  raise ValueError("Missing required parameter 'task_gid'")
6873
- request_body = {
6874
- "data": data,
6875
- }
6084
+ request_body = {"data": data}
6876
6085
  request_body = {k: v for k, v in request_body.items() if v is not None}
6877
6086
  url = f"{self.base_url}/tasks/{task_gid}/setParent"
6878
- query_params = {
6879
- k: v
6880
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
6881
- if v is not None
6882
- }
6087
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
6883
6088
  response = self._post(url, data=request_body, params=query_params)
6884
6089
  response.raise_for_status()
6885
6090
  return response.json()
6886
6091
 
6887
- def get_dependencies_from_atask(
6888
- self, task_gid, opt_fields=None, opt_pretty=None, limit=None, offset=None
6889
- ) -> dict[str, Any]:
6092
+ async def get_dependencies_from_atask(self, task_gid, opt_fields=None, opt_pretty=None, limit=None, offset=None) -> dict[str, Any]:
6890
6093
  """
6891
6094
  Retrieves a list of dependencies for a task with the specified task GID, allowing customization with optional fields, pretty formatting, and pagination limits.
6892
6095
 
@@ -6911,22 +6114,13 @@ class AsanaApp(APIApplication):
6911
6114
  raise ValueError("Missing required parameter 'task_gid'")
6912
6115
  url = f"{self.base_url}/tasks/{task_gid}/dependencies"
6913
6116
  query_params = {
6914
- k: v
6915
- for k, v in [
6916
- ("opt_fields", opt_fields),
6917
- ("opt_pretty", opt_pretty),
6918
- ("limit", limit),
6919
- ("offset", offset),
6920
- ]
6921
- if v is not None
6117
+ k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty), ("limit", limit), ("offset", offset)] if v is not None
6922
6118
  }
6923
6119
  response = self._get(url, params=query_params)
6924
6120
  response.raise_for_status()
6925
6121
  return response.json()
6926
6122
 
6927
- def set_dependencies_for_atask(
6928
- self, task_gid, opt_pretty=None, data=None
6929
- ) -> dict[str, Any]:
6123
+ async def set_dependencies_for_atask(self, task_gid, opt_pretty=None, data=None) -> dict[str, Any]:
6930
6124
  """
6931
6125
  Adds dependencies to a task using the task's GID and returns a status message, with optional pretty formatting.
6932
6126
 
@@ -6955,9 +6149,7 @@ class AsanaApp(APIApplication):
6955
6149
  """
6956
6150
  if task_gid is None:
6957
6151
  raise ValueError("Missing required parameter 'task_gid'")
6958
- request_body = {
6959
- "data": data,
6960
- }
6152
+ request_body = {"data": data}
6961
6153
  request_body = {k: v for k, v in request_body.items() if v is not None}
6962
6154
  url = f"{self.base_url}/tasks/{task_gid}/addDependencies"
6963
6155
  query_params = {k: v for k, v in [("opt_pretty", opt_pretty)] if v is not None}
@@ -6965,9 +6157,7 @@ class AsanaApp(APIApplication):
6965
6157
  response.raise_for_status()
6966
6158
  return response.json()
6967
6159
 
6968
- def unlink_dependencies_from_atask(
6969
- self, task_gid, opt_pretty=None, data=None
6970
- ) -> dict[str, Any]:
6160
+ async def unlink_dependencies_from_atask(self, task_gid, opt_pretty=None, data=None) -> dict[str, Any]:
6971
6161
  """
6972
6162
  Removes dependencies from a task using the "POST" method at the "/tasks/{task_gid}/removeDependencies" path.
6973
6163
 
@@ -6996,9 +6186,7 @@ class AsanaApp(APIApplication):
6996
6186
  """
6997
6187
  if task_gid is None:
6998
6188
  raise ValueError("Missing required parameter 'task_gid'")
6999
- request_body = {
7000
- "data": data,
7001
- }
6189
+ request_body = {"data": data}
7002
6190
  request_body = {k: v for k, v in request_body.items() if v is not None}
7003
6191
  url = f"{self.base_url}/tasks/{task_gid}/removeDependencies"
7004
6192
  query_params = {k: v for k, v in [("opt_pretty", opt_pretty)] if v is not None}
@@ -7006,9 +6194,7 @@ class AsanaApp(APIApplication):
7006
6194
  response.raise_for_status()
7007
6195
  return response.json()
7008
6196
 
7009
- def get_dependents_from_atask(
7010
- self, task_gid, opt_fields=None, opt_pretty=None, limit=None, offset=None
7011
- ) -> dict[str, Any]:
6197
+ async def get_dependents_from_atask(self, task_gid, opt_fields=None, opt_pretty=None, limit=None, offset=None) -> dict[str, Any]:
7012
6198
  """
7013
6199
  Retrieves a list of dependent tasks for a specified task using the GET method at "/tasks/{task_gid}/dependents," allowing for optional filtering with parameters such as `opt_fields`, `opt_pretty`, `limit`, and `offset`.
7014
6200
 
@@ -7033,22 +6219,13 @@ class AsanaApp(APIApplication):
7033
6219
  raise ValueError("Missing required parameter 'task_gid'")
7034
6220
  url = f"{self.base_url}/tasks/{task_gid}/dependents"
7035
6221
  query_params = {
7036
- k: v
7037
- for k, v in [
7038
- ("opt_fields", opt_fields),
7039
- ("opt_pretty", opt_pretty),
7040
- ("limit", limit),
7041
- ("offset", offset),
7042
- ]
7043
- if v is not None
6222
+ k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty), ("limit", limit), ("offset", offset)] if v is not None
7044
6223
  }
7045
6224
  response = self._get(url, params=query_params)
7046
6225
  response.raise_for_status()
7047
6226
  return response.json()
7048
6227
 
7049
- def set_dependents_for_atask(
7050
- self, task_gid, opt_pretty=None, data=None
7051
- ) -> dict[str, Any]:
6228
+ async def set_dependents_for_atask(self, task_gid, opt_pretty=None, data=None) -> dict[str, Any]:
7052
6229
  """
7053
6230
  Adds dependent tasks to a specified task using the POST method.
7054
6231
 
@@ -7077,9 +6254,7 @@ class AsanaApp(APIApplication):
7077
6254
  """
7078
6255
  if task_gid is None:
7079
6256
  raise ValueError("Missing required parameter 'task_gid'")
7080
- request_body = {
7081
- "data": data,
7082
- }
6257
+ request_body = {"data": data}
7083
6258
  request_body = {k: v for k, v in request_body.items() if v is not None}
7084
6259
  url = f"{self.base_url}/tasks/{task_gid}/addDependents"
7085
6260
  query_params = {k: v for k, v in [("opt_pretty", opt_pretty)] if v is not None}
@@ -7087,9 +6262,7 @@ class AsanaApp(APIApplication):
7087
6262
  response.raise_for_status()
7088
6263
  return response.json()
7089
6264
 
7090
- def unlink_dependents_from_atask(
7091
- self, task_gid, opt_pretty=None, data=None
7092
- ) -> dict[str, Any]:
6265
+ async def unlink_dependents_from_atask(self, task_gid, opt_pretty=None, data=None) -> dict[str, Any]:
7093
6266
  """
7094
6267
  Removes dependent tasks from the specified task using the POST method.
7095
6268
 
@@ -7118,9 +6291,7 @@ class AsanaApp(APIApplication):
7118
6291
  """
7119
6292
  if task_gid is None:
7120
6293
  raise ValueError("Missing required parameter 'task_gid'")
7121
- request_body = {
7122
- "data": data,
7123
- }
6294
+ request_body = {"data": data}
7124
6295
  request_body = {k: v for k, v in request_body.items() if v is not None}
7125
6296
  url = f"{self.base_url}/tasks/{task_gid}/removeDependents"
7126
6297
  query_params = {k: v for k, v in [("opt_pretty", opt_pretty)] if v is not None}
@@ -7128,9 +6299,7 @@ class AsanaApp(APIApplication):
7128
6299
  response.raise_for_status()
7129
6300
  return response.json()
7130
6301
 
7131
- def add_aproject_to_atask(
7132
- self, task_gid, opt_pretty=None, data=None
7133
- ) -> dict[str, Any]:
6302
+ async def add_aproject_to_atask(self, task_gid, opt_pretty=None, data=None) -> dict[str, Any]:
7134
6303
  """
7135
6304
  Adds a project to a specific task using the "POST" method at the path "/tasks/{task_gid}/addProject".
7136
6305
 
@@ -7159,9 +6328,7 @@ class AsanaApp(APIApplication):
7159
6328
  """
7160
6329
  if task_gid is None:
7161
6330
  raise ValueError("Missing required parameter 'task_gid'")
7162
- request_body = {
7163
- "data": data,
7164
- }
6331
+ request_body = {"data": data}
7165
6332
  request_body = {k: v for k, v in request_body.items() if v is not None}
7166
6333
  url = f"{self.base_url}/tasks/{task_gid}/addProject"
7167
6334
  query_params = {k: v for k, v in [("opt_pretty", opt_pretty)] if v is not None}
@@ -7169,9 +6336,7 @@ class AsanaApp(APIApplication):
7169
6336
  response.raise_for_status()
7170
6337
  return response.json()
7171
6338
 
7172
- def remove_aproject_from_atask(
7173
- self, task_gid, opt_pretty=None, data=None
7174
- ) -> dict[str, Any]:
6339
+ async def remove_aproject_from_atask(self, task_gid, opt_pretty=None, data=None) -> dict[str, Any]:
7175
6340
  """
7176
6341
  Removes the specified project from a task while retaining the task in the system.
7177
6342
 
@@ -7197,9 +6362,7 @@ class AsanaApp(APIApplication):
7197
6362
  """
7198
6363
  if task_gid is None:
7199
6364
  raise ValueError("Missing required parameter 'task_gid'")
7200
- request_body = {
7201
- "data": data,
7202
- }
6365
+ request_body = {"data": data}
7203
6366
  request_body = {k: v for k, v in request_body.items() if v is not None}
7204
6367
  url = f"{self.base_url}/tasks/{task_gid}/removeProject"
7205
6368
  query_params = {k: v for k, v in [("opt_pretty", opt_pretty)] if v is not None}
@@ -7207,7 +6370,7 @@ class AsanaApp(APIApplication):
7207
6370
  response.raise_for_status()
7208
6371
  return response.json()
7209
6372
 
7210
- def add_atag_to_atask(self, task_gid, opt_pretty=None, data=None) -> dict[str, Any]:
6373
+ async def add_atag_to_atask(self, task_gid, opt_pretty=None, data=None) -> dict[str, Any]:
7211
6374
  """
7212
6375
  Adds a tag to a specified task in the system using the provided task identifier and returns a status message.
7213
6376
 
@@ -7233,9 +6396,7 @@ class AsanaApp(APIApplication):
7233
6396
  """
7234
6397
  if task_gid is None:
7235
6398
  raise ValueError("Missing required parameter 'task_gid'")
7236
- request_body = {
7237
- "data": data,
7238
- }
6399
+ request_body = {"data": data}
7239
6400
  request_body = {k: v for k, v in request_body.items() if v is not None}
7240
6401
  url = f"{self.base_url}/tasks/{task_gid}/addTag"
7241
6402
  query_params = {k: v for k, v in [("opt_pretty", opt_pretty)] if v is not None}
@@ -7243,9 +6404,7 @@ class AsanaApp(APIApplication):
7243
6404
  response.raise_for_status()
7244
6405
  return response.json()
7245
6406
 
7246
- def remove_atag_from_atask(
7247
- self, task_gid, opt_pretty=None, data=None
7248
- ) -> dict[str, Any]:
6407
+ async def remove_atag_from_atask(self, task_gid, opt_pretty=None, data=None) -> dict[str, Any]:
7249
6408
  """
7250
6409
  Removes a tag from a task with the specified identifier using the "POST" method and returns a status message.
7251
6410
 
@@ -7271,9 +6430,7 @@ class AsanaApp(APIApplication):
7271
6430
  """
7272
6431
  if task_gid is None:
7273
6432
  raise ValueError("Missing required parameter 'task_gid'")
7274
- request_body = {
7275
- "data": data,
7276
- }
6433
+ request_body = {"data": data}
7277
6434
  request_body = {k: v for k, v in request_body.items() if v is not None}
7278
6435
  url = f"{self.base_url}/tasks/{task_gid}/removeTag"
7279
6436
  query_params = {k: v for k, v in [("opt_pretty", opt_pretty)] if v is not None}
@@ -7281,9 +6438,7 @@ class AsanaApp(APIApplication):
7281
6438
  response.raise_for_status()
7282
6439
  return response.json()
7283
6440
 
7284
- def add_followers_to_atask(
7285
- self, task_gid, opt_fields=None, opt_pretty=None, data=None
7286
- ) -> dict[str, Any]:
6441
+ async def add_followers_to_atask(self, task_gid, opt_fields=None, opt_pretty=None, data=None) -> dict[str, Any]:
7287
6442
  """
7288
6443
  Adds followers to a specific task identified by its GID using the POST method, allowing optional fields and formatting for the response.
7289
6444
 
@@ -7313,23 +6468,15 @@ class AsanaApp(APIApplication):
7313
6468
  """
7314
6469
  if task_gid is None:
7315
6470
  raise ValueError("Missing required parameter 'task_gid'")
7316
- request_body = {
7317
- "data": data,
7318
- }
6471
+ request_body = {"data": data}
7319
6472
  request_body = {k: v for k, v in request_body.items() if v is not None}
7320
6473
  url = f"{self.base_url}/tasks/{task_gid}/addFollowers"
7321
- query_params = {
7322
- k: v
7323
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
7324
- if v is not None
7325
- }
6474
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
7326
6475
  response = self._post(url, data=request_body, params=query_params)
7327
6476
  response.raise_for_status()
7328
6477
  return response.json()
7329
6478
 
7330
- def remove_followers_from_atask(
7331
- self, task_gid, opt_fields=None, opt_pretty=None, data=None
7332
- ) -> dict[str, Any]:
6479
+ async def remove_followers_from_atask(self, task_gid, opt_fields=None, opt_pretty=None, data=None) -> dict[str, Any]:
7333
6480
  """
7334
6481
  Removes specified followers from a task using the POST method, returning the updated task record.
7335
6482
 
@@ -7359,23 +6506,15 @@ class AsanaApp(APIApplication):
7359
6506
  """
7360
6507
  if task_gid is None:
7361
6508
  raise ValueError("Missing required parameter 'task_gid'")
7362
- request_body = {
7363
- "data": data,
7364
- }
6509
+ request_body = {"data": data}
7365
6510
  request_body = {k: v for k, v in request_body.items() if v is not None}
7366
6511
  url = f"{self.base_url}/tasks/{task_gid}/removeFollowers"
7367
- query_params = {
7368
- k: v
7369
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
7370
- if v is not None
7371
- }
6512
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
7372
6513
  response = self._post(url, data=request_body, params=query_params)
7373
6514
  response.raise_for_status()
7374
6515
  return response.json()
7375
6516
 
7376
- def get_atask_for_agiven_custom_id(
7377
- self, workspace_gid, custom_id
7378
- ) -> dict[str, Any]:
6517
+ async def get_atask_for_agiven_custom_id(self, workspace_gid, custom_id) -> dict[str, Any]:
7379
6518
  """
7380
6519
  Retrieves a task by its custom ID from a specified workspace using the Asana API.
7381
6520
 
@@ -7399,7 +6538,7 @@ class AsanaApp(APIApplication):
7399
6538
  response.raise_for_status()
7400
6539
  return response.json()
7401
6540
 
7402
- def search_tasks_in_aworkspace(
6541
+ async def search_tasks_in_aworkspace(
7403
6542
  self,
7404
6543
  workspace_gid,
7405
6544
  opt_fields=None,
@@ -7591,9 +6730,7 @@ class AsanaApp(APIApplication):
7591
6730
  response.raise_for_status()
7592
6731
  return response.json()
7593
6732
 
7594
- def get_multiple_task_templates(
7595
- self, limit=None, offset=None, project=None, opt_fields=None, opt_pretty=None
7596
- ) -> dict[str, Any]:
6733
+ async def get_multiple_task_templates(self, limit=None, offset=None, project=None, opt_fields=None, opt_pretty=None) -> dict[str, Any]:
7597
6734
  """
7598
6735
  Retrieves a list of available task templates for standardized task creation, supporting optional filters like project, pagination (limit/offset), and field customization (opt_fields).
7599
6736
 
@@ -7617,22 +6754,14 @@ class AsanaApp(APIApplication):
7617
6754
  url = f"{self.base_url}/task_templates"
7618
6755
  query_params = {
7619
6756
  k: v
7620
- for k, v in [
7621
- ("limit", limit),
7622
- ("offset", offset),
7623
- ("project", project),
7624
- ("opt_fields", opt_fields),
7625
- ("opt_pretty", opt_pretty),
7626
- ]
6757
+ for k, v in [("limit", limit), ("offset", offset), ("project", project), ("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
7627
6758
  if v is not None
7628
6759
  }
7629
6760
  response = self._get(url, params=query_params)
7630
6761
  response.raise_for_status()
7631
6762
  return response.json()
7632
6763
 
7633
- def get_atask_template(
7634
- self, task_template_gid, opt_fields=None, opt_pretty=None
7635
- ) -> dict[str, Any]:
6764
+ async def get_atask_template(self, task_template_gid, opt_fields=None, opt_pretty=None) -> dict[str, Any]:
7636
6765
  """
7637
6766
  Retrieves detailed information about a specific task template in Asana using the "GET" method at the "/task_templates/{task_template_gid}" path.
7638
6767
 
@@ -7651,18 +6780,12 @@ class AsanaApp(APIApplication):
7651
6780
  if task_template_gid is None:
7652
6781
  raise ValueError("Missing required parameter 'task_template_gid'")
7653
6782
  url = f"{self.base_url}/task_templates/{task_template_gid}"
7654
- query_params = {
7655
- k: v
7656
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
7657
- if v is not None
7658
- }
6783
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
7659
6784
  response = self._get(url, params=query_params)
7660
6785
  response.raise_for_status()
7661
6786
  return response.json()
7662
6787
 
7663
- def delete_atask_template(
7664
- self, task_template_gid, opt_pretty=None
7665
- ) -> dict[str, Any]:
6788
+ async def delete_atask_template(self, task_template_gid, opt_pretty=None) -> dict[str, Any]:
7666
6789
  """
7667
6790
  Deletes a specific task template by making a DELETE request to the API endpoint, returning an empty response upon success.
7668
6791
 
@@ -7685,9 +6808,7 @@ class AsanaApp(APIApplication):
7685
6808
  response.raise_for_status()
7686
6809
  return response.json()
7687
6810
 
7688
- def instantiate_atask_from_atask_template(
7689
- self, task_template_gid, opt_fields=None, opt_pretty=None, data=None
7690
- ) -> dict[str, Any]:
6811
+ async def instantiate_atask_from_atask_template(self, task_template_gid, opt_fields=None, opt_pretty=None, data=None) -> dict[str, Any]:
7691
6812
  """
7692
6813
  Instantiates a task from a specified task template using the Asana API, allowing for the creation of standardized and repeatable workflows by leveraging pre-defined templates.
7693
6814
 
@@ -7714,23 +6835,15 @@ class AsanaApp(APIApplication):
7714
6835
  """
7715
6836
  if task_template_gid is None:
7716
6837
  raise ValueError("Missing required parameter 'task_template_gid'")
7717
- request_body = {
7718
- "data": data,
7719
- }
6838
+ request_body = {"data": data}
7720
6839
  request_body = {k: v for k, v in request_body.items() if v is not None}
7721
6840
  url = f"{self.base_url}/task_templates/{task_template_gid}/instantiateTask"
7722
- query_params = {
7723
- k: v
7724
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
7725
- if v is not None
7726
- }
6841
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
7727
6842
  response = self._post(url, data=request_body, params=query_params)
7728
6843
  response.raise_for_status()
7729
6844
  return response.json()
7730
6845
 
7731
- def create_ateam(
7732
- self, opt_fields=None, opt_pretty=None, data=None
7733
- ) -> dict[str, Any]:
6846
+ async def create_ateam(self, opt_fields=None, opt_pretty=None, data=None) -> dict[str, Any]:
7734
6847
  """
7735
6848
  Creates a new team resource using the API at the "/teams" path with the "POST" method.
7736
6849
 
@@ -7767,21 +6880,15 @@ class AsanaApp(APIApplication):
7767
6880
  Tags:
7768
6881
  Teams
7769
6882
  """
7770
- request_body = {
7771
- "data": data,
7772
- }
6883
+ request_body = {"data": data}
7773
6884
  request_body = {k: v for k, v in request_body.items() if v is not None}
7774
6885
  url = f"{self.base_url}/teams"
7775
- query_params = {
7776
- k: v
7777
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
7778
- if v is not None
7779
- }
6886
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
7780
6887
  response = self._post(url, data=request_body, params=query_params)
7781
6888
  response.raise_for_status()
7782
6889
  return response.json()
7783
6890
 
7784
- def get_ateam(self, team_gid, opt_fields=None, opt_pretty=None) -> dict[str, Any]:
6891
+ async def get_ateam(self, team_gid, opt_fields=None, opt_pretty=None) -> dict[str, Any]:
7785
6892
  """
7786
6893
  Retrieves details for a specific GitHub team by its global ID, supporting optional query parameters to customize the response format and included fields.
7787
6894
 
@@ -7800,18 +6907,12 @@ class AsanaApp(APIApplication):
7800
6907
  if team_gid is None:
7801
6908
  raise ValueError("Missing required parameter 'team_gid'")
7802
6909
  url = f"{self.base_url}/teams/{team_gid}"
7803
- query_params = {
7804
- k: v
7805
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
7806
- if v is not None
7807
- }
6910
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
7808
6911
  response = self._get(url, params=query_params)
7809
6912
  response.raise_for_status()
7810
6913
  return response.json()
7811
6914
 
7812
- def update_ateam(
7813
- self, team_gid, opt_fields=None, opt_pretty=None, data=None
7814
- ) -> dict[str, Any]:
6915
+ async def update_ateam(self, team_gid, opt_fields=None, opt_pretty=None, data=None) -> dict[str, Any]:
7815
6916
  """
7816
6917
  Updates the details of a team with the specified GID using the provided parameters, returning a status response based on the operation's success or failure.
7817
6918
 
@@ -7851,23 +6952,15 @@ class AsanaApp(APIApplication):
7851
6952
  """
7852
6953
  if team_gid is None:
7853
6954
  raise ValueError("Missing required parameter 'team_gid'")
7854
- request_body = {
7855
- "data": data,
7856
- }
6955
+ request_body = {"data": data}
7857
6956
  request_body = {k: v for k, v in request_body.items() if v is not None}
7858
6957
  url = f"{self.base_url}/teams/{team_gid}"
7859
- query_params = {
7860
- k: v
7861
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
7862
- if v is not None
7863
- }
6958
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
7864
6959
  response = self._put(url, data=request_body, params=query_params)
7865
6960
  response.raise_for_status()
7866
6961
  return response.json()
7867
6962
 
7868
- def get_teams_in_aworkspace(
7869
- self, workspace_gid, opt_fields=None, opt_pretty=None, limit=None, offset=None
7870
- ) -> dict[str, Any]:
6963
+ async def get_teams_in_aworkspace(self, workspace_gid, opt_fields=None, opt_pretty=None, limit=None, offset=None) -> dict[str, Any]:
7871
6964
  """
7872
6965
  Retrieves a list of teams in a specified workspace using the GET method, allowing optional query parameters for customizing output fields, formatting, and pagination.
7873
6966
 
@@ -7892,27 +6985,14 @@ class AsanaApp(APIApplication):
7892
6985
  raise ValueError("Missing required parameter 'workspace_gid'")
7893
6986
  url = f"{self.base_url}/workspaces/{workspace_gid}/teams"
7894
6987
  query_params = {
7895
- k: v
7896
- for k, v in [
7897
- ("opt_fields", opt_fields),
7898
- ("opt_pretty", opt_pretty),
7899
- ("limit", limit),
7900
- ("offset", offset),
7901
- ]
7902
- if v is not None
6988
+ k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty), ("limit", limit), ("offset", offset)] if v is not None
7903
6989
  }
7904
6990
  response = self._get(url, params=query_params)
7905
6991
  response.raise_for_status()
7906
6992
  return response.json()
7907
6993
 
7908
- def get_teams_for_auser(
7909
- self,
7910
- user_gid,
7911
- opt_fields=None,
7912
- opt_pretty=None,
7913
- limit=None,
7914
- offset=None,
7915
- organization=None,
6994
+ async def get_teams_for_auser(
6995
+ self, user_gid, opt_fields=None, opt_pretty=None, limit=None, offset=None, organization=None
7916
6996
  ) -> dict[str, Any]:
7917
6997
  """
7918
6998
  Retrieves a paginated list of teams associated with a specific user, optionally filtered by organization, using query parameters for customization.
@@ -7953,9 +7033,7 @@ class AsanaApp(APIApplication):
7953
7033
  response.raise_for_status()
7954
7034
  return response.json()
7955
7035
 
7956
- def add_auser_to_ateam(
7957
- self, team_gid, opt_fields=None, opt_pretty=None, data=None
7958
- ) -> dict[str, Any]:
7036
+ async def add_auser_to_ateam(self, team_gid, opt_fields=None, opt_pretty=None, data=None) -> dict[str, Any]:
7959
7037
  """
7960
7038
  Adds a user to a team using the provided team ID, allowing for optional specification of additional fields and formatting preferences.
7961
7039
 
@@ -7982,23 +7060,15 @@ class AsanaApp(APIApplication):
7982
7060
  """
7983
7061
  if team_gid is None:
7984
7062
  raise ValueError("Missing required parameter 'team_gid'")
7985
- request_body = {
7986
- "data": data,
7987
- }
7063
+ request_body = {"data": data}
7988
7064
  request_body = {k: v for k, v in request_body.items() if v is not None}
7989
7065
  url = f"{self.base_url}/teams/{team_gid}/addUser"
7990
- query_params = {
7991
- k: v
7992
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
7993
- if v is not None
7994
- }
7066
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
7995
7067
  response = self._post(url, data=request_body, params=query_params)
7996
7068
  response.raise_for_status()
7997
7069
  return response.json()
7998
7070
 
7999
- def remove_auser_from_ateam(
8000
- self, team_gid, opt_pretty=None, data=None
8001
- ) -> dict[str, Any]:
7071
+ async def remove_auser_from_ateam(self, team_gid, opt_pretty=None, data=None) -> dict[str, Any]:
8002
7072
  """
8003
7073
  Removes a user from a specified team using a POST request and returns a success status upon completion.
8004
7074
 
@@ -8024,9 +7094,7 @@ class AsanaApp(APIApplication):
8024
7094
  """
8025
7095
  if team_gid is None:
8026
7096
  raise ValueError("Missing required parameter 'team_gid'")
8027
- request_body = {
8028
- "data": data,
8029
- }
7097
+ request_body = {"data": data}
8030
7098
  request_body = {k: v for k, v in request_body.items() if v is not None}
8031
7099
  url = f"{self.base_url}/teams/{team_gid}/removeUser"
8032
7100
  query_params = {k: v for k, v in [("opt_pretty", opt_pretty)] if v is not None}
@@ -8034,9 +7102,7 @@ class AsanaApp(APIApplication):
8034
7102
  response.raise_for_status()
8035
7103
  return response.json()
8036
7104
 
8037
- def get_ateam_membership(
8038
- self, team_membership_gid, opt_fields=None, opt_pretty=None
8039
- ) -> dict[str, Any]:
7105
+ async def get_ateam_membership(self, team_membership_gid, opt_fields=None, opt_pretty=None) -> dict[str, Any]:
8040
7106
  """
8041
7107
  Retrieves a specific team membership using the "GET" method at "/team_memberships/{team_membership_gid}", allowing optional fields and formatting parameters to be specified.
8042
7108
 
@@ -8055,24 +7121,13 @@ class AsanaApp(APIApplication):
8055
7121
  if team_membership_gid is None:
8056
7122
  raise ValueError("Missing required parameter 'team_membership_gid'")
8057
7123
  url = f"{self.base_url}/team_memberships/{team_membership_gid}"
8058
- query_params = {
8059
- k: v
8060
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
8061
- if v is not None
8062
- }
7124
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
8063
7125
  response = self._get(url, params=query_params)
8064
7126
  response.raise_for_status()
8065
7127
  return response.json()
8066
7128
 
8067
- def get_team_memberships(
8068
- self,
8069
- team=None,
8070
- user=None,
8071
- workspace=None,
8072
- opt_fields=None,
8073
- opt_pretty=None,
8074
- limit=None,
8075
- offset=None,
7129
+ async def get_team_memberships(
7130
+ self, team=None, user=None, workspace=None, opt_fields=None, opt_pretty=None, limit=None, offset=None
8076
7131
  ) -> dict[str, Any]:
8077
7132
  """
8078
7133
  Retrieves team membership information for a specified user within a team and workspace, allowing optional fields and pagination.
@@ -8114,9 +7169,7 @@ class AsanaApp(APIApplication):
8114
7169
  response.raise_for_status()
8115
7170
  return response.json()
8116
7171
 
8117
- def get_memberships_from_ateam(
8118
- self, team_gid, opt_fields=None, opt_pretty=None, limit=None, offset=None
8119
- ) -> dict[str, Any]:
7172
+ async def get_memberships_from_ateam(self, team_gid, opt_fields=None, opt_pretty=None, limit=None, offset=None) -> dict[str, Any]:
8120
7173
  """
8121
7174
  Retrieves team memberships for a specified team using the GitHub API, returning details about members based on optional fields and pagination parameters.
8122
7175
 
@@ -8141,27 +7194,14 @@ class AsanaApp(APIApplication):
8141
7194
  raise ValueError("Missing required parameter 'team_gid'")
8142
7195
  url = f"{self.base_url}/teams/{team_gid}/team_memberships"
8143
7196
  query_params = {
8144
- k: v
8145
- for k, v in [
8146
- ("opt_fields", opt_fields),
8147
- ("opt_pretty", opt_pretty),
8148
- ("limit", limit),
8149
- ("offset", offset),
8150
- ]
8151
- if v is not None
7197
+ k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty), ("limit", limit), ("offset", offset)] if v is not None
8152
7198
  }
8153
7199
  response = self._get(url, params=query_params)
8154
7200
  response.raise_for_status()
8155
7201
  return response.json()
8156
7202
 
8157
- def get_memberships_from_auser(
8158
- self,
8159
- user_gid,
8160
- workspace=None,
8161
- opt_fields=None,
8162
- opt_pretty=None,
8163
- limit=None,
8164
- offset=None,
7203
+ async def get_memberships_from_auser(
7204
+ self, user_gid, workspace=None, opt_fields=None, opt_pretty=None, limit=None, offset=None
8165
7205
  ) -> dict[str, Any]:
8166
7206
  """
8167
7207
  Retrieves a paginated list of team memberships for a specified user, including optional filtering by workspace and customizable response fields.
@@ -8202,9 +7242,7 @@ class AsanaApp(APIApplication):
8202
7242
  response.raise_for_status()
8203
7243
  return response.json()
8204
7244
 
8205
- def get_atime_period(
8206
- self, time_period_gid, opt_fields=None, opt_pretty=None
8207
- ) -> dict[str, Any]:
7245
+ async def get_atime_period(self, time_period_gid, opt_fields=None, opt_pretty=None) -> dict[str, Any]:
8208
7246
  """
8209
7247
  Retrieves details about a specific time period, identified by its GID, using the "GET" method at the "/time_periods/{time_period_gid}" path.
8210
7248
 
@@ -8223,24 +7261,13 @@ class AsanaApp(APIApplication):
8223
7261
  if time_period_gid is None:
8224
7262
  raise ValueError("Missing required parameter 'time_period_gid'")
8225
7263
  url = f"{self.base_url}/time_periods/{time_period_gid}"
8226
- query_params = {
8227
- k: v
8228
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
8229
- if v is not None
8230
- }
7264
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
8231
7265
  response = self._get(url, params=query_params)
8232
7266
  response.raise_for_status()
8233
7267
  return response.json()
8234
7268
 
8235
- def get_time_periods(
8236
- self,
8237
- start_on=None,
8238
- end_on=None,
8239
- workspace=None,
8240
- opt_fields=None,
8241
- opt_pretty=None,
8242
- limit=None,
8243
- offset=None,
7269
+ async def get_time_periods(
7270
+ self, start_on=None, end_on=None, workspace=None, opt_fields=None, opt_pretty=None, limit=None, offset=None
8244
7271
  ) -> dict[str, Any]:
8245
7272
  """
8246
7273
  Retrieves a list of time periods filtered by start and end dates, workspace, and other optional parameters.
@@ -8282,7 +7309,7 @@ class AsanaApp(APIApplication):
8282
7309
  response.raise_for_status()
8283
7310
  return response.json()
8284
7311
 
8285
- def get_time_tracking_entries_for_atask(
7312
+ async def get_time_tracking_entries_for_atask(
8286
7313
  self, task_gid, limit=None, offset=None, opt_fields=None, opt_pretty=None
8287
7314
  ) -> dict[str, Any]:
8288
7315
  """
@@ -8309,22 +7336,13 @@ class AsanaApp(APIApplication):
8309
7336
  raise ValueError("Missing required parameter 'task_gid'")
8310
7337
  url = f"{self.base_url}/tasks/{task_gid}/time_tracking_entries"
8311
7338
  query_params = {
8312
- k: v
8313
- for k, v in [
8314
- ("limit", limit),
8315
- ("offset", offset),
8316
- ("opt_fields", opt_fields),
8317
- ("opt_pretty", opt_pretty),
8318
- ]
8319
- if v is not None
7339
+ k: v for k, v in [("limit", limit), ("offset", offset), ("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None
8320
7340
  }
8321
7341
  response = self._get(url, params=query_params)
8322
7342
  response.raise_for_status()
8323
7343
  return response.json()
8324
7344
 
8325
- def create_atime_tracking_entry(
8326
- self, task_gid, opt_fields=None, opt_pretty=None, data=None
8327
- ) -> dict[str, Any]:
7345
+ async def create_atime_tracking_entry(self, task_gid, opt_fields=None, opt_pretty=None, data=None) -> dict[str, Any]:
8328
7346
  """
8329
7347
  Creates a new time tracking entry for a specified task using the POST method, allowing for optional fields and formatting through query parameters.
8330
7348
 
@@ -8352,23 +7370,15 @@ class AsanaApp(APIApplication):
8352
7370
  """
8353
7371
  if task_gid is None:
8354
7372
  raise ValueError("Missing required parameter 'task_gid'")
8355
- request_body = {
8356
- "data": data,
8357
- }
7373
+ request_body = {"data": data}
8358
7374
  request_body = {k: v for k, v in request_body.items() if v is not None}
8359
7375
  url = f"{self.base_url}/tasks/{task_gid}/time_tracking_entries"
8360
- query_params = {
8361
- k: v
8362
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
8363
- if v is not None
8364
- }
7376
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
8365
7377
  response = self._post(url, data=request_body, params=query_params)
8366
7378
  response.raise_for_status()
8367
7379
  return response.json()
8368
7380
 
8369
- def get_atime_tracking_entry(
8370
- self, time_tracking_entry_gid, opt_fields=None, opt_pretty=None
8371
- ) -> dict[str, Any]:
7381
+ async def get_atime_tracking_entry(self, time_tracking_entry_gid, opt_fields=None, opt_pretty=None) -> dict[str, Any]:
8372
7382
  """
8373
7383
  Retrieves a specific time tracking entry by its global ID, allowing optional field selection for the response.
8374
7384
 
@@ -8387,18 +7397,12 @@ class AsanaApp(APIApplication):
8387
7397
  if time_tracking_entry_gid is None:
8388
7398
  raise ValueError("Missing required parameter 'time_tracking_entry_gid'")
8389
7399
  url = f"{self.base_url}/time_tracking_entries/{time_tracking_entry_gid}"
8390
- query_params = {
8391
- k: v
8392
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
8393
- if v is not None
8394
- }
7400
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
8395
7401
  response = self._get(url, params=query_params)
8396
7402
  response.raise_for_status()
8397
7403
  return response.json()
8398
7404
 
8399
- def update_atime_tracking_entry(
8400
- self, time_tracking_entry_gid, opt_fields=None, opt_pretty=None, data=None
8401
- ) -> dict[str, Any]:
7405
+ async def update_atime_tracking_entry(self, time_tracking_entry_gid, opt_fields=None, opt_pretty=None, data=None) -> dict[str, Any]:
8402
7406
  """
8403
7407
  Updates an existing time tracking entry by its GID and returns the modified entry.
8404
7408
 
@@ -8426,23 +7430,15 @@ class AsanaApp(APIApplication):
8426
7430
  """
8427
7431
  if time_tracking_entry_gid is None:
8428
7432
  raise ValueError("Missing required parameter 'time_tracking_entry_gid'")
8429
- request_body = {
8430
- "data": data,
8431
- }
7433
+ request_body = {"data": data}
8432
7434
  request_body = {k: v for k, v in request_body.items() if v is not None}
8433
7435
  url = f"{self.base_url}/time_tracking_entries/{time_tracking_entry_gid}"
8434
- query_params = {
8435
- k: v
8436
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
8437
- if v is not None
8438
- }
7436
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
8439
7437
  response = self._put(url, data=request_body, params=query_params)
8440
7438
  response.raise_for_status()
8441
7439
  return response.json()
8442
7440
 
8443
- def delete_atime_tracking_entry(
8444
- self, time_tracking_entry_gid, opt_pretty=None
8445
- ) -> dict[str, Any]:
7441
+ async def delete_atime_tracking_entry(self, time_tracking_entry_gid, opt_pretty=None) -> dict[str, Any]:
8446
7442
  """
8447
7443
  Deletes a specific time tracking entry identified by the `time_tracking_entry_gid` using the DELETE method and returns relevant status messages based on the success or failure of the operation.
8448
7444
 
@@ -8465,15 +7461,8 @@ class AsanaApp(APIApplication):
8465
7461
  response.raise_for_status()
8466
7462
  return response.json()
8467
7463
 
8468
- def get_objects_via_typeahead(
8469
- self,
8470
- workspace_gid,
8471
- opt_fields=None,
8472
- resource_type=None,
8473
- type=None,
8474
- query=None,
8475
- count=None,
8476
- opt_pretty=None,
7464
+ async def get_objects_via_typeahead(
7465
+ self, workspace_gid, opt_fields=None, resource_type=None, type=None, query=None, count=None, opt_pretty=None
8477
7466
  ) -> dict[str, Any]:
8478
7467
  """
8479
7468
  Queries a workspace for typeahead results using the specified parameters and returns relevant objects or suggestions.
@@ -8513,14 +7502,8 @@ class AsanaApp(APIApplication):
8513
7502
  response.raise_for_status()
8514
7503
  return response.json()
8515
7504
 
8516
- def get_multiple_users(
8517
- self,
8518
- opt_fields=None,
8519
- workspace=None,
8520
- team=None,
8521
- opt_pretty=None,
8522
- limit=None,
8523
- offset=None,
7505
+ async def get_multiple_users(
7506
+ self, opt_fields=None, workspace=None, team=None, opt_pretty=None, limit=None, offset=None
8524
7507
  ) -> dict[str, Any]:
8525
7508
  """
8526
7509
  Retrieves a list of users with optional filtering parameters and pagination support.
@@ -8560,7 +7543,7 @@ class AsanaApp(APIApplication):
8560
7543
  response.raise_for_status()
8561
7544
  return response.json()
8562
7545
 
8563
- def get_auser(self, user_gid, opt_fields=None, opt_pretty=None) -> dict[str, Any]:
7546
+ async def get_auser(self, user_gid, opt_fields=None, opt_pretty=None) -> dict[str, Any]:
8564
7547
  """
8565
7548
  Retrieves details for a specific user using their unique identifier (user_gid) and offers optional query parameters for customizing the returned data fields (opt_fields) and response formatting (opt_pretty).
8566
7549
 
@@ -8579,24 +7562,13 @@ class AsanaApp(APIApplication):
8579
7562
  if user_gid is None:
8580
7563
  raise ValueError("Missing required parameter 'user_gid'")
8581
7564
  url = f"{self.base_url}/users/{user_gid}"
8582
- query_params = {
8583
- k: v
8584
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
8585
- if v is not None
8586
- }
7565
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
8587
7566
  response = self._get(url, params=query_params)
8588
7567
  response.raise_for_status()
8589
7568
  return response.json()
8590
7569
 
8591
- def get_auser_sfavorites(
8592
- self,
8593
- user_gid,
8594
- opt_fields=None,
8595
- opt_pretty=None,
8596
- limit=None,
8597
- offset=None,
8598
- resource_type=None,
8599
- workspace=None,
7570
+ async def get_auser_sfavorites(
7571
+ self, user_gid, opt_fields=None, opt_pretty=None, limit=None, offset=None, resource_type=None, workspace=None
8600
7572
  ) -> dict[str, Any]:
8601
7573
  """
8602
7574
  Retrieves a list of favorites for a user with the specified `user_gid`, allowing optional filtering by resource type and workspace, and customizable output through additional query parameters.
@@ -8639,9 +7611,7 @@ class AsanaApp(APIApplication):
8639
7611
  response.raise_for_status()
8640
7612
  return response.json()
8641
7613
 
8642
- def get_users_in_ateam(
8643
- self, team_gid, opt_fields=None, opt_pretty=None, offset=None
8644
- ) -> dict[str, Any]:
7614
+ async def get_users_in_ateam(self, team_gid, opt_fields=None, opt_pretty=None, offset=None) -> dict[str, Any]:
8645
7615
  """
8646
7616
  Retrieves a paginated list of users associated with a specified team, supporting optional fields, pretty formatting, and offset parameters.
8647
7617
 
@@ -8663,22 +7633,12 @@ class AsanaApp(APIApplication):
8663
7633
  if team_gid is None:
8664
7634
  raise ValueError("Missing required parameter 'team_gid'")
8665
7635
  url = f"{self.base_url}/teams/{team_gid}/users"
8666
- query_params = {
8667
- k: v
8668
- for k, v in [
8669
- ("opt_fields", opt_fields),
8670
- ("opt_pretty", opt_pretty),
8671
- ("offset", offset),
8672
- ]
8673
- if v is not None
8674
- }
7636
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty), ("offset", offset)] if v is not None}
8675
7637
  response = self._get(url, params=query_params)
8676
7638
  response.raise_for_status()
8677
7639
  return response.json()
8678
7640
 
8679
- def get_users_in_aworkspace_or_organization(
8680
- self, workspace_gid, opt_fields=None, opt_pretty=None, offset=None
8681
- ) -> dict[str, Any]:
7641
+ async def get_users_in_aworkspace_or_organization(self, workspace_gid, opt_fields=None, opt_pretty=None, offset=None) -> dict[str, Any]:
8682
7642
  """
8683
7643
  Retrieves a list of users associated with the specified workspace, supporting optional fields, pagination, and response formatting.
8684
7644
 
@@ -8700,22 +7660,12 @@ class AsanaApp(APIApplication):
8700
7660
  if workspace_gid is None:
8701
7661
  raise ValueError("Missing required parameter 'workspace_gid'")
8702
7662
  url = f"{self.base_url}/workspaces/{workspace_gid}/users"
8703
- query_params = {
8704
- k: v
8705
- for k, v in [
8706
- ("opt_fields", opt_fields),
8707
- ("opt_pretty", opt_pretty),
8708
- ("offset", offset),
8709
- ]
8710
- if v is not None
8711
- }
7663
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty), ("offset", offset)] if v is not None}
8712
7664
  response = self._get(url, params=query_params)
8713
7665
  response.raise_for_status()
8714
7666
  return response.json()
8715
7667
 
8716
- def get_auser_task_list(
8717
- self, user_task_list_gid, opt_fields=None, opt_pretty=None
8718
- ) -> dict[str, Any]:
7668
+ async def get_auser_task_list(self, user_task_list_gid, opt_fields=None, opt_pretty=None) -> dict[str, Any]:
8719
7669
  """
8720
7670
  Retrieves details of a user task list by its global ID, supporting optional query parameters for field selection and response formatting.
8721
7671
 
@@ -8734,18 +7684,12 @@ class AsanaApp(APIApplication):
8734
7684
  if user_task_list_gid is None:
8735
7685
  raise ValueError("Missing required parameter 'user_task_list_gid'")
8736
7686
  url = f"{self.base_url}/user_task_lists/{user_task_list_gid}"
8737
- query_params = {
8738
- k: v
8739
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
8740
- if v is not None
8741
- }
7687
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
8742
7688
  response = self._get(url, params=query_params)
8743
7689
  response.raise_for_status()
8744
7690
  return response.json()
8745
7691
 
8746
- def get_auser_stask_list(
8747
- self, user_gid, opt_fields=None, opt_pretty=None, workspace=None
8748
- ) -> dict[str, Any]:
7692
+ async def get_auser_stask_list(self, user_gid, opt_fields=None, opt_pretty=None, workspace=None) -> dict[str, Any]:
8749
7693
  """
8750
7694
  Retrieves a list of tasks for a user identified by the user_gid parameter, allowing optional filtering by additional fields or workspace.
8751
7695
 
@@ -8766,26 +7710,14 @@ class AsanaApp(APIApplication):
8766
7710
  raise ValueError("Missing required parameter 'user_gid'")
8767
7711
  url = f"{self.base_url}/users/{user_gid}/user_task_list"
8768
7712
  query_params = {
8769
- k: v
8770
- for k, v in [
8771
- ("opt_fields", opt_fields),
8772
- ("opt_pretty", opt_pretty),
8773
- ("workspace", workspace),
8774
- ]
8775
- if v is not None
7713
+ k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty), ("workspace", workspace)] if v is not None
8776
7714
  }
8777
7715
  response = self._get(url, params=query_params)
8778
7716
  response.raise_for_status()
8779
7717
  return response.json()
8780
7718
 
8781
- def get_multiple_webhooks(
8782
- self,
8783
- limit=None,
8784
- offset=None,
8785
- workspace=None,
8786
- resource=None,
8787
- opt_fields=None,
8788
- opt_pretty=None,
7719
+ async def get_multiple_webhooks(
7720
+ self, limit=None, offset=None, workspace=None, resource=None, opt_fields=None, opt_pretty=None
8789
7721
  ) -> dict[str, Any]:
8790
7722
  """
8791
7723
  Retrieves a list of webhooks, allowing for optional filtering by workspace, resource, and additional fields, with pagination options via limit and offset parameters.
@@ -8825,9 +7757,7 @@ class AsanaApp(APIApplication):
8825
7757
  response.raise_for_status()
8826
7758
  return response.json()
8827
7759
 
8828
- def establish_awebhook(
8829
- self, opt_fields=None, opt_pretty=None, data=None
8830
- ) -> dict[str, Any]:
7760
+ async def establish_awebhook(self, opt_fields=None, opt_pretty=None, data=None) -> dict[str, Any]:
8831
7761
  """
8832
7762
  Creates a new webhook subscription to receive event notifications and returns the subscription details.
8833
7763
 
@@ -8874,23 +7804,15 @@ class AsanaApp(APIApplication):
8874
7804
  Tags:
8875
7805
  Webhooks
8876
7806
  """
8877
- request_body = {
8878
- "data": data,
8879
- }
7807
+ request_body = {"data": data}
8880
7808
  request_body = {k: v for k, v in request_body.items() if v is not None}
8881
7809
  url = f"{self.base_url}/webhooks"
8882
- query_params = {
8883
- k: v
8884
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
8885
- if v is not None
8886
- }
7810
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
8887
7811
  response = self._post(url, data=request_body, params=query_params)
8888
7812
  response.raise_for_status()
8889
7813
  return response.json()
8890
7814
 
8891
- def get_awebhook(
8892
- self, webhook_gid, opt_fields=None, opt_pretty=None
8893
- ) -> dict[str, Any]:
7815
+ async def get_awebhook(self, webhook_gid, opt_fields=None, opt_pretty=None) -> dict[str, Any]:
8894
7816
  """
8895
7817
  Retrieves information about a webhook with the specified ID using the "GET" method, allowing optional fields and pretty-print formatting.
8896
7818
 
@@ -8909,18 +7831,12 @@ class AsanaApp(APIApplication):
8909
7831
  if webhook_gid is None:
8910
7832
  raise ValueError("Missing required parameter 'webhook_gid'")
8911
7833
  url = f"{self.base_url}/webhooks/{webhook_gid}"
8912
- query_params = {
8913
- k: v
8914
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
8915
- if v is not None
8916
- }
7834
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
8917
7835
  response = self._get(url, params=query_params)
8918
7836
  response.raise_for_status()
8919
7837
  return response.json()
8920
7838
 
8921
- def update_awebhook(
8922
- self, webhook_gid, opt_fields=None, opt_pretty=None, data=None
8923
- ) -> dict[str, Any]:
7839
+ async def update_awebhook(self, webhook_gid, opt_fields=None, opt_pretty=None, data=None) -> dict[str, Any]:
8924
7840
  """
8925
7841
  Updates a webhook identified by its GID at the "/webhooks/{webhook_gid}" path, allowing modifications to existing webhook configurations.
8926
7842
 
@@ -8968,21 +7884,15 @@ class AsanaApp(APIApplication):
8968
7884
  """
8969
7885
  if webhook_gid is None:
8970
7886
  raise ValueError("Missing required parameter 'webhook_gid'")
8971
- request_body = {
8972
- "data": data,
8973
- }
7887
+ request_body = {"data": data}
8974
7888
  request_body = {k: v for k, v in request_body.items() if v is not None}
8975
7889
  url = f"{self.base_url}/webhooks/{webhook_gid}"
8976
- query_params = {
8977
- k: v
8978
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
8979
- if v is not None
8980
- }
7890
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
8981
7891
  response = self._put(url, data=request_body, params=query_params)
8982
7892
  response.raise_for_status()
8983
7893
  return response.json()
8984
7894
 
8985
- def delete_awebhook(self, webhook_gid, opt_pretty=None) -> dict[str, Any]:
7895
+ async def delete_awebhook(self, webhook_gid, opt_pretty=None) -> dict[str, Any]:
8986
7896
  """
8987
7897
  Deletes a webhook identified by the `{webhook_gid}` and returns a status message, allowing for the removal of existing webhook configurations.
8988
7898
 
@@ -9005,9 +7915,7 @@ class AsanaApp(APIApplication):
9005
7915
  response.raise_for_status()
9006
7916
  return response.json()
9007
7917
 
9008
- def get_multiple_workspaces(
9009
- self, opt_fields=None, opt_pretty=None, limit=None, offset=None
9010
- ) -> dict[str, Any]:
7918
+ async def get_multiple_workspaces(self, opt_fields=None, opt_pretty=None, limit=None, offset=None) -> dict[str, Any]:
9011
7919
  """
9012
7920
  Retrieves a paginated list of workspaces with optional filtering and formatting parameters.
9013
7921
 
@@ -9029,22 +7937,13 @@ class AsanaApp(APIApplication):
9029
7937
  """
9030
7938
  url = f"{self.base_url}/workspaces"
9031
7939
  query_params = {
9032
- k: v
9033
- for k, v in [
9034
- ("opt_fields", opt_fields),
9035
- ("opt_pretty", opt_pretty),
9036
- ("limit", limit),
9037
- ("offset", offset),
9038
- ]
9039
- if v is not None
7940
+ k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty), ("limit", limit), ("offset", offset)] if v is not None
9040
7941
  }
9041
7942
  response = self._get(url, params=query_params)
9042
7943
  response.raise_for_status()
9043
7944
  return response.json()
9044
7945
 
9045
- def get_aworkspace(
9046
- self, workspace_gid, opt_fields=None, opt_pretty=None
9047
- ) -> dict[str, Any]:
7946
+ async def get_aworkspace(self, workspace_gid, opt_fields=None, opt_pretty=None) -> dict[str, Any]:
9048
7947
  """
9049
7948
  Retrieves a specific workspace by its GID using the Asana API, optionally including additional fields and formatting options.
9050
7949
 
@@ -9063,18 +7962,12 @@ class AsanaApp(APIApplication):
9063
7962
  if workspace_gid is None:
9064
7963
  raise ValueError("Missing required parameter 'workspace_gid'")
9065
7964
  url = f"{self.base_url}/workspaces/{workspace_gid}"
9066
- query_params = {
9067
- k: v
9068
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
9069
- if v is not None
9070
- }
7965
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
9071
7966
  response = self._get(url, params=query_params)
9072
7967
  response.raise_for_status()
9073
7968
  return response.json()
9074
7969
 
9075
- def update_aworkspace(
9076
- self, workspace_gid, opt_fields=None, opt_pretty=None, data=None
9077
- ) -> dict[str, Any]:
7970
+ async def update_aworkspace(self, workspace_gid, opt_fields=None, opt_pretty=None, data=None) -> dict[str, Any]:
9078
7971
  """
9079
7972
  Updates a specified workspace's properties and returns the modified workspace data.
9080
7973
 
@@ -9103,23 +7996,15 @@ class AsanaApp(APIApplication):
9103
7996
  """
9104
7997
  if workspace_gid is None:
9105
7998
  raise ValueError("Missing required parameter 'workspace_gid'")
9106
- request_body = {
9107
- "data": data,
9108
- }
7999
+ request_body = {"data": data}
9109
8000
  request_body = {k: v for k, v in request_body.items() if v is not None}
9110
8001
  url = f"{self.base_url}/workspaces/{workspace_gid}"
9111
- query_params = {
9112
- k: v
9113
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
9114
- if v is not None
9115
- }
8002
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
9116
8003
  response = self._put(url, data=request_body, params=query_params)
9117
8004
  response.raise_for_status()
9118
8005
  return response.json()
9119
8006
 
9120
- def add_auser_to_aworkspace_or_organization(
9121
- self, workspace_gid, opt_fields=None, opt_pretty=None, data=None
9122
- ) -> dict[str, Any]:
8007
+ async def add_auser_to_aworkspace_or_organization(self, workspace_gid, opt_fields=None, opt_pretty=None, data=None) -> dict[str, Any]:
9123
8008
  """
9124
8009
  Adds a user to a specified workspace and returns the full user record upon successful completion.
9125
8010
 
@@ -9146,23 +8031,15 @@ class AsanaApp(APIApplication):
9146
8031
  """
9147
8032
  if workspace_gid is None:
9148
8033
  raise ValueError("Missing required parameter 'workspace_gid'")
9149
- request_body = {
9150
- "data": data,
9151
- }
8034
+ request_body = {"data": data}
9152
8035
  request_body = {k: v for k, v in request_body.items() if v is not None}
9153
8036
  url = f"{self.base_url}/workspaces/{workspace_gid}/addUser"
9154
- query_params = {
9155
- k: v
9156
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
9157
- if v is not None
9158
- }
8037
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
9159
8038
  response = self._post(url, data=request_body, params=query_params)
9160
8039
  response.raise_for_status()
9161
8040
  return response.json()
9162
8041
 
9163
- def remove_auser_from_aworkspace_or_organization(
9164
- self, workspace_gid, opt_pretty=None, data=None
9165
- ) -> dict[str, Any]:
8042
+ async def remove_auser_from_aworkspace_or_organization(self, workspace_gid, opt_pretty=None, data=None) -> dict[str, Any]:
9166
8043
  """
9167
8044
  Removes a user from a workspace using the specified POST API operation at the "/workspaces/{workspace_gid}/removeUser" path.
9168
8045
 
@@ -9188,9 +8065,7 @@ class AsanaApp(APIApplication):
9188
8065
  """
9189
8066
  if workspace_gid is None:
9190
8067
  raise ValueError("Missing required parameter 'workspace_gid'")
9191
- request_body = {
9192
- "data": data,
9193
- }
8068
+ request_body = {"data": data}
9194
8069
  request_body = {k: v for k, v in request_body.items() if v is not None}
9195
8070
  url = f"{self.base_url}/workspaces/{workspace_gid}/removeUser"
9196
8071
  query_params = {k: v for k, v in [("opt_pretty", opt_pretty)] if v is not None}
@@ -9198,9 +8073,7 @@ class AsanaApp(APIApplication):
9198
8073
  response.raise_for_status()
9199
8074
  return response.json()
9200
8075
 
9201
- def get_aworkspace_membership(
9202
- self, workspace_membership_gid, opt_fields=None, opt_pretty=None
9203
- ) -> dict[str, Any]:
8076
+ async def get_aworkspace_membership(self, workspace_membership_gid, opt_fields=None, opt_pretty=None) -> dict[str, Any]:
9204
8077
  """
9205
8078
  Retrieves a specific workspace membership entry by its global identifier (GID) with optional field filtering and formatted output.
9206
8079
 
@@ -9219,16 +8092,12 @@ class AsanaApp(APIApplication):
9219
8092
  if workspace_membership_gid is None:
9220
8093
  raise ValueError("Missing required parameter 'workspace_membership_gid'")
9221
8094
  url = f"{self.base_url}/workspace_memberships/{workspace_membership_gid}"
9222
- query_params = {
9223
- k: v
9224
- for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)]
9225
- if v is not None
9226
- }
8095
+ query_params = {k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty)] if v is not None}
9227
8096
  response = self._get(url, params=query_params)
9228
8097
  response.raise_for_status()
9229
8098
  return response.json()
9230
8099
 
9231
- def get_workspace_memberships_for_auser(
8100
+ async def get_workspace_memberships_for_auser(
9232
8101
  self, user_gid, opt_fields=None, opt_pretty=None, limit=None, offset=None
9233
8102
  ) -> dict[str, Any]:
9234
8103
  """
@@ -9255,27 +8124,14 @@ class AsanaApp(APIApplication):
9255
8124
  raise ValueError("Missing required parameter 'user_gid'")
9256
8125
  url = f"{self.base_url}/users/{user_gid}/workspace_memberships"
9257
8126
  query_params = {
9258
- k: v
9259
- for k, v in [
9260
- ("opt_fields", opt_fields),
9261
- ("opt_pretty", opt_pretty),
9262
- ("limit", limit),
9263
- ("offset", offset),
9264
- ]
9265
- if v is not None
8127
+ k: v for k, v in [("opt_fields", opt_fields), ("opt_pretty", opt_pretty), ("limit", limit), ("offset", offset)] if v is not None
9266
8128
  }
9267
8129
  response = self._get(url, params=query_params)
9268
8130
  response.raise_for_status()
9269
8131
  return response.json()
9270
8132
 
9271
- def get_the_workspace_memberships_for_aworkspace(
9272
- self,
9273
- workspace_gid,
9274
- opt_fields=None,
9275
- user=None,
9276
- opt_pretty=None,
9277
- limit=None,
9278
- offset=None,
8133
+ async def get_the_workspace_memberships_for_aworkspace(
8134
+ self, workspace_gid, opt_fields=None, user=None, opt_pretty=None, limit=None, offset=None
9279
8135
  ) -> dict[str, Any]:
9280
8136
  """
9281
8137
  Retrieves a list of workspace memberships for a specified workspace, providing details about users and their roles within the workspace, allowing for optional filtering and customization of the response.
@@ -9303,13 +8159,7 @@ class AsanaApp(APIApplication):
9303
8159
  url = f"{self.base_url}/workspaces/{workspace_gid}/workspace_memberships"
9304
8160
  query_params = {
9305
8161
  k: v
9306
- for k, v in [
9307
- ("opt_fields", opt_fields),
9308
- ("user", user),
9309
- ("opt_pretty", opt_pretty),
9310
- ("limit", limit),
9311
- ("offset", offset),
9312
- ]
8162
+ for k, v in [("opt_fields", opt_fields), ("user", user), ("opt_pretty", opt_pretty), ("limit", limit), ("offset", offset)]
9313
8163
  if v is not None
9314
8164
  }
9315
8165
  response = self._get(url, params=query_params)