@@ -269,6 +269,10 @@ def tasks(self, **kwargs) -> Tasklist:
269
269
limit (int):
270
270
Determines the page size (1-100)
271
271
272
+ include_attachment_url (bool):
273
+ If true, returns a pre-signed s3 url for the
274
+ attachment used to create the task.
275
+
272
276
next_token (str):
273
277
Can be use to fetch the next page of tasks
274
278
"""
@@ -288,6 +292,7 @@ def tasks(self, **kwargs) -> Tasklist:
288
292
"updated_before" ,
289
293
"updated_after" ,
290
294
"unique_id" ,
295
+ "include_attachment_url" ,
291
296
}
292
297
293
298
for key in kwargs :
@@ -323,6 +328,7 @@ def get_tasks(
323
328
created_after : str = None ,
324
329
created_before : str = None ,
325
330
tags : Union [List [str ], str ] = None ,
331
+ include_attachment_url : bool = True ,
326
332
) -> Generator [Task , None , None ]:
327
333
"""Retrieve all tasks as a `generator` method, with the
328
334
given parameters. This methods handles pagination of
@@ -382,6 +388,11 @@ def get_tasks(
382
388
The tags of a task; multiple tags can be
383
389
specified as a list.
384
390
391
+ include_attachment_url (bool):
392
+ If true, returns a pre-signed s3 url for the
393
+ attachment used to create the task.
394
+
395
+
385
396
Yields:
386
397
Generator[Task]:
387
398
Yields Task objects, can be iterated.
@@ -404,6 +415,7 @@ def get_tasks(
404
415
created_after ,
405
416
created_before ,
406
417
tags ,
418
+ include_attachment_url ,
407
419
)
408
420
409
421
while has_more :
@@ -431,6 +443,7 @@ def get_tasks_count(
431
443
created_after : str = None ,
432
444
created_before : str = None ,
433
445
tags : Union [List [str ], str ] = None ,
446
+ include_attachment_url : bool = True ,
434
447
) -> int :
435
448
"""Returns number of tasks with given filters.
436
449
@@ -485,6 +498,10 @@ def get_tasks_count(
485
498
The tags of a task; multiple tags can be
486
499
specified as a list.
487
500
501
+ include_attachment_url (bool):
502
+ If true, returns a pre-signed s3 url for the
503
+ attachment used to create the task.
504
+
488
505
Returns:
489
506
int:
490
507
Returns number of tasks
@@ -504,6 +521,7 @@ def get_tasks_count(
504
521
created_after ,
505
522
created_before ,
506
523
tags ,
524
+ include_attachment_url ,
507
525
)
508
526
509
527
tasks_args ["limit" ] = 1
@@ -526,6 +544,7 @@ def _process_tasks_endpoint_args(
526
544
created_after : str = None ,
527
545
created_before : str = None ,
528
546
tags : Union [List [str ], str ] = None ,
547
+ include_attachment_url : bool = True ,
529
548
):
530
549
"""Generates args for /tasks endpoint."""
531
550
tasks_args = {
@@ -539,6 +558,7 @@ def _process_tasks_endpoint_args(
539
558
"updated_before" : updated_before ,
540
559
"updated_after" : updated_after ,
541
560
"unique_id" : unique_id ,
561
+ "include_attachment_url" : include_attachment_url ,
542
562
}
543
563
544
564
if status :
0 commit comments