twilio.rest.video.v1.composition package¶
Module contents¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.video.v1.composition.
CompositionContext
(version, sid)[source]¶ Bases:
twilio.base.instance_context.InstanceContext
-
delete
()[source]¶ Deletes the CompositionInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch
()[source]¶ Fetch the CompositionInstance
Returns: The fetched CompositionInstance Return type: twilio.rest.video.v1.composition.CompositionInstance
-
-
class
twilio.rest.video.v1.composition.
CompositionInstance
(version, payload, sid=None)[source]¶ Bases:
twilio.base.instance_resource.InstanceResource
-
class
Status
[source]¶ Bases:
object
-
COMPLETED
= 'completed'¶
-
DELETED
= 'deleted'¶
-
ENQUEUED
= 'enqueued'¶
-
FAILED
= 'failed'¶
-
PROCESSING
= 'processing'¶
-
-
account_sid
¶ Returns: The SID of the Account that created the resource Return type: unicode
-
audio_sources
¶ Returns: The array of track names to include in the composition Return type: list[unicode]
-
audio_sources_excluded
¶ Returns: The array of track names to exclude from the composition Return type: list[unicode]
-
bitrate
¶ Returns: The average bit rate of the composition’s media Return type: unicode
-
date_completed
¶ Returns: Date when the media processing task finished Return type: datetime
-
date_created
¶ Returns: The ISO 8601 date and time in GMT when the resource was created Return type: datetime
-
date_deleted
¶ Returns: The ISO 8601 date and time in GMT when the composition generated media was deleted Return type: datetime
-
delete
()[source]¶ Deletes the CompositionInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
duration
¶ Returns: The duration of the composition’s media file in seconds Return type: unicode
-
fetch
()[source]¶ Fetch the CompositionInstance
Returns: The fetched CompositionInstance Return type: twilio.rest.video.v1.composition.CompositionInstance
-
format
¶ Returns: The container format of the composition’s media files as specified in the POST request that created the Composition resource Return type: CompositionInstance.Format
-
links
¶ Returns: The URL of the media file associated with the composition Return type: unicode
-
resolution
¶ Returns: The dimensions of the video image in pixels expressed as columns (width) and rows (height) Return type: unicode
-
room_sid
¶ Returns: The SID of the Group Room that generated the audio and video tracks used in the composition Return type: unicode
-
sid
¶ Returns: The unique string that identifies the resource Return type: unicode
-
size
¶ Returns: The size of the composed media file in bytes Return type: unicode
-
status
¶ Returns: The status of the composition Return type: CompositionInstance.Status
-
url
¶ Returns: The absolute URL of the resource Return type: unicode
-
class
-
class
twilio.rest.video.v1.composition.
CompositionList
(version)[source]¶ Bases:
twilio.base.list_resource.ListResource
-
create
(room_sid, video_layout=<object object>, audio_sources=<object object>, audio_sources_excluded=<object object>, resolution=<object object>, format=<object object>, status_callback=<object object>, status_callback_method=<object object>, trim=<object object>)[source]¶ Create the CompositionInstance
Parameters: - room_sid (unicode) – The SID of the Group Room with the media tracks to be used as composition sources
- video_layout (dict) – An object that describes the video layout of the composition
- audio_sources (list[unicode]) – An array of track names from the same group room to merge
- audio_sources_excluded (list[unicode]) – An array of track names to exclude
- resolution (unicode) – A string that describes the columns (width) and rows (height) of the generated composed video in pixels
- format (CompositionInstance.Format) – The container format of the composition’s media files
- status_callback (unicode) – The URL we should call to send status information to your application
- status_callback_method (unicode) – The HTTP method we should use to call status_callback
- trim (bool) – Whether to clip the intervals where there is no active media in the composition
Returns: The created CompositionInstance
Return type:
-
get
(sid)[source]¶ Constructs a CompositionContext
Parameters: sid – The SID that identifies the resource to fetch Returns: twilio.rest.video.v1.composition.CompositionContext Return type: twilio.rest.video.v1.composition.CompositionContext
-
get_page
(target_url)[source]¶ Retrieve a specific page of CompositionInstance records from the API. Request is executed immediately
Parameters: target_url (str) – API-generated URL for the requested results page Returns: Page of CompositionInstance Return type: twilio.rest.video.v1.composition.CompositionPage
-
list
(status=<object object>, date_created_after=<object object>, date_created_before=<object object>, room_sid=<object object>, limit=None, page_size=None)[source]¶ Lists CompositionInstance records from the API as a list. Unlike stream(), this operation is eager and will load limit records into memory before returning.
Parameters: - status (CompositionInstance.Status) – Read only Composition resources with this status
- date_created_after (datetime) – Read only Composition resources created on or after this ISO 8601 date-time with time zone
- date_created_before (datetime) – Read only Composition resources created before this ISO 8601 date-time with time zone
- room_sid (unicode) – Read only Composition resources with this Room SID
- limit (int) – Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit
- page_size (int) – Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, list() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
Returns: Generator that will yield up to limit results
Return type:
-
page
(status=<object object>, date_created_after=<object object>, date_created_before=<object object>, room_sid=<object object>, page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]¶ Retrieve a single page of CompositionInstance records from the API. Request is executed immediately
Parameters: - status (CompositionInstance.Status) – Read only Composition resources with this status
- date_created_after (datetime) –
Read only Composition resources created on or after this ISO 8601 date-time with time zone
- date_created_before (datetime) – Read only Composition resources created before this ISO 8601 date-time with time zone
- room_sid (unicode) – Read only Composition resources with this Room SID
- page_token (str) – PageToken provided by the API
- page_number (int) – Page Number, this value is simply for client state
- page_size (int) – Number of records to return, defaults to 50
Returns: Page of CompositionInstance
Return type:
-
stream
(status=<object object>, date_created_after=<object object>, date_created_before=<object object>, room_sid=<object object>, limit=None, page_size=None)[source]¶ Streams CompositionInstance records from the API as a generator stream. This operation lazily loads records as efficiently as possible until the limit is reached. The results are returned as a generator, so this operation is memory efficient.
Parameters: - status (CompositionInstance.Status) – Read only Composition resources with this status
- date_created_after (datetime) –
Read only Composition resources created on or after this ISO 8601 date-time with time zone
- date_created_before (datetime) – Read only Composition resources created before this ISO 8601 date-time with time zone
- room_sid (unicode) – Read only Composition resources with this Room SID
- limit (int) – Upper limit for the number of records to return. stream() guarantees to never return more than limit. Default is no limit
- page_size (int) – Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, stream() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
Returns: Generator that will yield up to limit results
Return type:
-
-
class
twilio.rest.video.v1.composition.
CompositionPage
(version, response, solution)[source]¶ Bases:
twilio.base.page.Page
-
get_instance
(payload)[source]¶ Build an instance of CompositionInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.video.v1.composition.CompositionInstance Return type: twilio.rest.video.v1.composition.CompositionInstance
-