twilio.rest.media.v1.player_streamer package

Submodules

twilio.rest.media.v1.player_streamer.playback_grant module

This code was generated by / _ _ _| _ _

(_)/(_)(_|/| |(/_ v1.0.0 / /

System Message: WARNING/2 (/twilio/repos/twilio-python/twilio/rest/media/v1/player_streamer/playback_grant.py:docstring of twilio.rest.media.v1.player_streamer.playback_grant, line 3); backlink

Inline substitution_reference start-string without end-string.
class twilio.rest.media.v1.player_streamer.playback_grant.PlaybackGrantContext(version, sid)[source]

Bases: twilio.base.instance_context.InstanceContext

create(ttl=<object object>, access_control_allow_origin=<object object>)[source]

Create the PlaybackGrantInstance

Parameters:
  • ttl (unicode) – The time to live of the PlaybackGrant
  • access_control_allow_origin (unicode) – The full URL that is authorized to play back the livestream
Returns:

The created PlaybackGrantInstance

Return type:

twilio.rest.media.v1.player_streamer.playback_grant.PlaybackGrantInstance

fetch()[source]

Fetch the PlaybackGrantInstance

Returns:The fetched PlaybackGrantInstance
Return type:twilio.rest.media.v1.player_streamer.playback_grant.PlaybackGrantInstance
class twilio.rest.media.v1.player_streamer.playback_grant.PlaybackGrantInstance(version, payload, sid)[source]

Bases: twilio.base.instance_resource.InstanceResource

account_sid
Returns:The SID of the Account that created the resource
Return type:unicode
create(ttl=<object object>, access_control_allow_origin=<object object>)[source]

Create the PlaybackGrantInstance

Parameters:
  • ttl (unicode) – The time to live of the PlaybackGrant
  • access_control_allow_origin (unicode) – The full URL that is authorized to play back the livestream
Returns:

The created PlaybackGrantInstance

Return type:

twilio.rest.media.v1.player_streamer.playback_grant.PlaybackGrantInstance

date_created
Returns:The ISO 8601 date and time in GMT when the resource was created
Return type:datetime
fetch()[source]

Fetch the PlaybackGrantInstance

Returns:The fetched PlaybackGrantInstance
Return type:twilio.rest.media.v1.player_streamer.playback_grant.PlaybackGrantInstance
grant
Returns:The grant that authorizes the player sdk to connect to the livestream
Return type:dict
sid
Returns:The unique string that identifies the PlayerStreamer associated with this PlaybackGrant.
Return type:unicode
url
Returns:The absolute URL of the resource
Return type:unicode
class twilio.rest.media.v1.player_streamer.playback_grant.PlaybackGrantList(version, sid)[source]

Bases: twilio.base.list_resource.ListResource

get()[source]

Constructs a PlaybackGrantContext

Returns:twilio.rest.media.v1.player_streamer.playback_grant.PlaybackGrantContext
Return type:twilio.rest.media.v1.player_streamer.playback_grant.PlaybackGrantContext
class twilio.rest.media.v1.player_streamer.playback_grant.PlaybackGrantPage(version, response, solution)[source]

Bases: twilio.base.page.Page

get_instance(payload)[source]

Build an instance of PlaybackGrantInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.media.v1.player_streamer.playback_grant.PlaybackGrantInstance
Return type:twilio.rest.media.v1.player_streamer.playback_grant.PlaybackGrantInstance

Module contents

This code was generated by / _ _ _| _ _

(_)/(_)(_|/| |(/_ v1.0.0 / /

System Message: WARNING/2 (/twilio/repos/twilio-python/twilio/rest/media/v1/player_streamer/__init__.py:docstring of twilio.rest.media.v1.player_streamer, line 3); backlink

Inline substitution_reference start-string without end-string.
class twilio.rest.media.v1.player_streamer.PlayerStreamerContext(version, sid)[source]

Bases: twilio.base.instance_context.InstanceContext

fetch()[source]

Fetch the PlayerStreamerInstance

Returns:The fetched PlayerStreamerInstance
Return type:twilio.rest.media.v1.player_streamer.PlayerStreamerInstance
playback_grant

Access the playback_grant

Returns:twilio.rest.media.v1.player_streamer.playback_grant.PlaybackGrantList
Return type:twilio.rest.media.v1.player_streamer.playback_grant.PlaybackGrantList
update(status)[source]

Update the PlayerStreamerInstance

Parameters:status (PlayerStreamerInstance.UpdateStatus) – The status the PlayerStreamer should be transitioned to
Returns:The updated PlayerStreamerInstance
Return type:twilio.rest.media.v1.player_streamer.PlayerStreamerInstance
class twilio.rest.media.v1.player_streamer.PlayerStreamerInstance(version, payload, sid=None)[source]

Bases: twilio.base.instance_resource.InstanceResource

class EndedReason[source]

Bases: object

ENDED_VIA_API = 'ended-via-api'
MAX_DURATION_EXCEEDED = 'max-duration-exceeded'
STREAM_DISCONNECTED_BY_SOURCE = 'stream-disconnected-by-source'
UNEXPECTED_FAILURE = 'unexpected-failure'
class Order[source]

Bases: object

ASC = 'asc'
DESC = 'desc'
class Status[source]

Bases: object

CREATED = 'created'
ENDED = 'ended'
FAILED = 'failed'
STARTED = 'started'
class UpdateStatus[source]

Bases: object

ENDED = 'ended'
account_sid
Returns:The SID of the Account that created the resource
Return type:unicode
date_created
Returns:The ISO 8601 date and time in GMT when the resource was created
Return type:datetime
date_updated
Returns:The ISO 8601 date and time in GMT when the resource was last updated
Return type:datetime
ended_reason
Returns:The reason why a PlayerStreamer ended
Return type:PlayerStreamerInstance.EndedReason
fetch()[source]

Fetch the PlayerStreamerInstance

Returns:The fetched PlayerStreamerInstance
Return type:twilio.rest.media.v1.player_streamer.PlayerStreamerInstance
Returns:The URLs of related resources
Return type:unicode
playback_grant

Access the playback_grant

Returns:twilio.rest.media.v1.player_streamer.playback_grant.PlaybackGrantList
Return type:twilio.rest.media.v1.player_streamer.playback_grant.PlaybackGrantList
sid
Returns:The unique string that identifies the resource
Return type:unicode
status
Returns:The status of the PlayerStreamer
Return type:PlayerStreamerInstance.Status
status_callback
Returns:The URL to which Twilio will send PlayerStreamer event updates
Return type:unicode
status_callback_method
Returns:The HTTP method Twilio should use to call the status_callback URL
Return type:unicode
update(status)[source]

Update the PlayerStreamerInstance

Parameters:status (PlayerStreamerInstance.UpdateStatus) – The status the PlayerStreamer should be transitioned to
Returns:The updated PlayerStreamerInstance
Return type:twilio.rest.media.v1.player_streamer.PlayerStreamerInstance
url
Returns:The absolute URL of the resource
Return type:unicode
video
Returns:Whether the PlayerStreamer is configured to stream video
Return type:bool
class twilio.rest.media.v1.player_streamer.PlayerStreamerList(version)[source]

Bases: twilio.base.list_resource.ListResource

create(video=<object object>, status_callback=<object object>, status_callback_method=<object object>)[source]

Create the PlayerStreamerInstance

Parameters:
  • video (bool) – Whether the PlayerStreamer is configured to stream video
  • status_callback (unicode) – The URL to which Twilio will send PlayerStreamer event updates
  • status_callback_method (unicode) – The HTTP method Twilio should use to call the status_callback URL
Returns:

The created PlayerStreamerInstance

Return type:

twilio.rest.media.v1.player_streamer.PlayerStreamerInstance

get(sid)[source]

Constructs a PlayerStreamerContext

Parameters:sid – The SID that identifies the resource to fetch
Returns:twilio.rest.media.v1.player_streamer.PlayerStreamerContext
Return type:twilio.rest.media.v1.player_streamer.PlayerStreamerContext
get_page(target_url)[source]

Retrieve a specific page of PlayerStreamerInstance records from the API. Request is executed immediately

Parameters:target_url (str) – API-generated URL for the requested results page
Returns:Page of PlayerStreamerInstance
Return type:twilio.rest.media.v1.player_streamer.PlayerStreamerPage
list(order=<object object>, status=<object object>, limit=None, page_size=None)[source]

Lists PlayerStreamerInstance records from the API as a list. Unlike stream(), this operation is eager and will load limit records into memory before returning.

Parameters:
  • order (PlayerStreamerInstance.Order) – The sort order of the list
  • status (PlayerStreamerInstance.Status) – Status to filter by
  • 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:

list[twilio.rest.media.v1.player_streamer.PlayerStreamerInstance]

page(order=<object object>, status=<object object>, page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]

Retrieve a single page of PlayerStreamerInstance records from the API. Request is executed immediately

Parameters:
Returns:

Page of PlayerStreamerInstance

Return type:

twilio.rest.media.v1.player_streamer.PlayerStreamerPage

stream(order=<object object>, status=<object object>, limit=None, page_size=None)[source]

Streams PlayerStreamerInstance 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:
  • order (PlayerStreamerInstance.Order) – The sort order of the list
  • status (PlayerStreamerInstance.Status) – Status to filter by
  • 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:

list[twilio.rest.media.v1.player_streamer.PlayerStreamerInstance]

class twilio.rest.media.v1.player_streamer.PlayerStreamerPage(version, response, solution)[source]

Bases: twilio.base.page.Page

get_instance(payload)[source]

Build an instance of PlayerStreamerInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.media.v1.player_streamer.PlayerStreamerInstance
Return type:twilio.rest.media.v1.player_streamer.PlayerStreamerInstance