Asset

class Asset(parent=None)

Bases: Item

This class describes an Asset object child of Item class.

get_assigned_tasks(user_key='', task_name='', task_status='')

Gets the asset’s assigned tasks to specific user

Parameters:
  • user_key (string) – The user key

  • task_name (string, optional) – The name of the task used to filter

  • task_status (string, optional) – The status of the task used to filter

Returns:

List of Task object and Edge object

Return type:

List of dictionary {item: Task, edge: Edge}

get_by_task(project_key='', task_status='', task_name='', task_completed=False)

Gets project tasks by filters.

Parameters:
  • project_key (string) – The project key

  • task_status (string) – The task status

  • task_name (string, optional) – The task name

  • task_completed (boolean) – Task is completed

Returns:

The tasks.

Return type:

dictionary

get_tasks(task_name='', task_status='')

Gets the tasks of the asset

Parameters:
  • task_name (string, optional) – The name of the task

  • task_status (string, optional) – The status of the task

Returns:

List of Task object and Edge object

Return type:

List of dictionary {item: Task, edge: Edge}

upload_on_task(task_name='', path=None, data={}, version_name=None, override_media=True, message=None)

Uploads new media version on asset task

Parameters:
  • task_name (string) – The task name

  • path (string) – The media path to upload, optional

  • data (dict) – The data you want to upload with the file, optional

  • version_name (string) – The name of the version where you want to upload the file. Without version_name, the media is uploaded in the task, optional

  • override_media (boolean) – If the media already exist, a new history is created to override the existing one, optional

  • message (string) – The message associated with the upload, optional

Returns:

Updated media object

Return type:

dictionary