@@ -247,6 +247,39 @@ def get_video_tasks(
247247 params ["limit" ] = limit
248248 return self .api .get_request (endpoint , params = params )
249249
250+ def get_video_classification_tasks (
251+ self ,
252+ project : str ,
253+ status : str = None ,
254+ tags : list = [],
255+ task_name : str = None ,
256+ offset : int = None ,
257+ limit : int = 100 ,
258+ ) -> list :
259+ """
260+ Returns a list of video classification tasks.
261+ Returns up to 1000 at a time, to get more, set offset as the starting position to fetch.
262+
263+ project is slug of your project. (Required)
264+ status can be 'registered', 'completed', 'skipped', 'sent_back', 'approved', 'customer_sent_back', 'customer_approved'. (Optional)
265+ tags is a list of tag. (Optional)
266+ offset is the starting position number to fetch. (Optional)
267+ limit is the max number to fetch. (Optional)
268+ """
269+ endpoint = "tasks/video/classification"
270+ params = {"project" : project }
271+ if status :
272+ params ["status" ] = status
273+ if tags :
274+ params ["tags" ] = tags
275+ if task_name :
276+ params ["taskName" ] = task_name
277+ if offset :
278+ params ["offset" ] = offset
279+ if limit :
280+ params ["limit" ] = limit
281+ return self .api .get_request (endpoint , params = params )
282+
250283 def get_task_id_name_map (
251284 self , project : str ,
252285 offset : int = None ,
@@ -450,6 +483,56 @@ def update_task(
450483 payload ["tags" ] = tags
451484 return self .api .put_request (endpoint , payload = payload )
452485
486+ def update_image_classification_task (
487+ self ,
488+ task_id : str ,
489+ status : str = None ,
490+ attributes : list = [],
491+ tags : list = [],
492+ ) -> str :
493+ """
494+ Create a single image classification task.
495+
496+ task_id is an id of the task. (Required)
497+ status can be 'registered', 'completed', 'skipped', 'sent_back', 'approved', 'customer_sent_back', 'customer_approved'. (Optional)
498+ attributes is a list of attribute to be set in advance. (Optional)
499+ tags is a list of tag to be set in advance. (Optional)
500+ """
501+ endpoint = "tasks/image/classification/" + task_id
502+ payload = {}
503+ if status :
504+ payload ["status" ] = status
505+ if attributes :
506+ payload ["attributes" ] = attributes
507+ if tags :
508+ payload ["tags" ] = tags
509+ return self .api .put_request (endpoint , payload = payload )
510+
511+ def update_video_classification_task (
512+ self ,
513+ task_id : str ,
514+ status : str = None ,
515+ attributes : list = [],
516+ tags : list = [],
517+ ) -> str :
518+ """
519+ Create a single video classification task.
520+
521+ task_id is an id of the task. (Required)
522+ status can be 'registered', 'completed', 'skipped', 'sent_back', 'approved', 'customer_sent_back', 'customer_approved'. (Optional)
523+ attributes is a list of attribute to be set in advance. (Optional)
524+ tags is a list of tag to be set in advance. (Optional)
525+ """
526+ endpoint = "tasks/video/classification/" + task_id
527+ payload = {}
528+ if status :
529+ payload ["status" ] = status
530+ if attributes :
531+ payload ["attributes" ] = attributes
532+ if tags :
533+ payload ["tags" ] = tags
534+ return self .api .put_request (endpoint , payload = payload )
535+
453536 # Task Delete
454537
455538 def delete_task (self , task_id : str ) -> None :
0 commit comments