twilio.rest.video.v1.room package

Submodules

twilio.rest.video.v1.room.room_recording_rule module

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

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

System Message: WARNING/2 (/twilio/repos/twilio-python/twilio/rest/video/v1/room/room_recording_rule.py:docstring of twilio.rest.video.v1.room.room_recording_rule, line 3); backlink

Inline substitution_reference start-string without end-string.
class twilio.rest.video.v1.room.room_recording_rule.RecordingRulesInstance(version, payload, room_sid)[source]

Bases: twilio.base.instance_resource.InstanceResource

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
room_sid
Returns:The SID of the Room resource for the Recording Rules
Return type:unicode
rules
Returns:A collection of recording Rules that describe how to include or exclude matching tracks for recording
Return type:list[unicode]
class twilio.rest.video.v1.room.room_recording_rule.RecordingRulesList(version, room_sid)[source]

Bases: twilio.base.list_resource.ListResource

fetch()[source]

Fetch the RecordingRulesInstance

Returns:The fetched RecordingRulesInstance
Return type:twilio.rest.video.v1.room.room_recording_rule.RecordingRulesInstance
update(rules=<object object>)[source]

Update the RecordingRulesInstance

Parameters:rules (dict) – A JSON-encoded array of recording rules
Returns:The updated RecordingRulesInstance
Return type:twilio.rest.video.v1.room.room_recording_rule.RecordingRulesInstance
class twilio.rest.video.v1.room.room_recording_rule.RecordingRulesPage(version, response, solution)[source]

Bases: twilio.base.page.Page

get_instance(payload)[source]

Build an instance of RecordingRulesInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.video.v1.room.room_recording_rule.RecordingRulesInstance
Return type:twilio.rest.video.v1.room.room_recording_rule.RecordingRulesInstance

Module contents

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

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

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

Inline substitution_reference start-string without end-string.
class twilio.rest.video.v1.room.RoomContext(version, sid)[source]

Bases: twilio.base.instance_context.InstanceContext

fetch()[source]

Fetch the RoomInstance

Returns:The fetched RoomInstance
Return type:twilio.rest.video.v1.room.RoomInstance
participants

Access the participants

Returns:twilio.rest.video.v1.room.room_participant.ParticipantList
Return type:twilio.rest.video.v1.room.room_participant.ParticipantList
recording_rules

Access the recording_rules

Returns:twilio.rest.video.v1.room.room_recording_rule.RecordingRulesList
Return type:twilio.rest.video.v1.room.room_recording_rule.RecordingRulesList
recordings

Access the recordings

Returns:twilio.rest.video.v1.room.recording.RoomRecordingList
Return type:twilio.rest.video.v1.room.recording.RoomRecordingList
update(status)[source]

Update the RoomInstance

Parameters:status (RoomInstance.RoomStatus) – The new status of the resource
Returns:The updated RoomInstance
Return type:twilio.rest.video.v1.room.RoomInstance
class twilio.rest.video.v1.room.RoomInstance(version, payload, sid=None)[source]

Bases: twilio.base.instance_resource.InstanceResource

class RoomStatus[source]

Bases: object

COMPLETED = 'completed'
FAILED = 'failed'
IN_PROGRESS = 'in-progress'
class RoomType[source]

Bases: object

GO = 'go'
GROUP = 'group'
GROUP_SMALL = 'group-small'
PEER_TO_PEER = 'peer-to-peer'
class VideoCodec[source]

Bases: object

H264 = 'H264'
VP8 = 'VP8'
account_sid
Returns:The SID of the Account that created the resource
Return type:unicode
audio_only
Returns:Indicates whether the room will only contain audio track participants for group rooms.
Return type:bool
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
duration
Returns:The duration of the room in seconds
Return type:unicode
enable_turn
Returns:Enable Twilio’s Network Traversal TURN service
Return type:bool
end_time
Returns:The UTC end time of the room in UTC ISO 8601 format
Return type:datetime
fetch()[source]

Fetch the RoomInstance

Returns:The fetched RoomInstance
Return type:twilio.rest.video.v1.room.RoomInstance
Returns:The URLs of related resources
Return type:unicode
max_concurrent_published_tracks
Returns:The maximum number of published tracks allowed in the room at the same time
Return type:unicode
max_participants
Returns:The maximum number of concurrent Participants allowed in the room
Return type:unicode
media_region
Returns:The region for the media server in Group Rooms
Return type:unicode
participants

Access the participants

Returns:twilio.rest.video.v1.room.room_participant.ParticipantList
Return type:twilio.rest.video.v1.room.room_participant.ParticipantList
record_participants_on_connect
Returns:Whether to start recording when Participants connect
Return type:bool
recording_rules

Access the recording_rules

Returns:twilio.rest.video.v1.room.room_recording_rule.RecordingRulesList
Return type:twilio.rest.video.v1.room.room_recording_rule.RecordingRulesList
recordings

Access the recordings

Returns:twilio.rest.video.v1.room.recording.RoomRecordingList
Return type:twilio.rest.video.v1.room.recording.RoomRecordingList
sid
Returns:The unique string that identifies the resource
Return type:unicode
status
Returns:The status of the room
Return type:RoomInstance.RoomStatus
status_callback
Returns:The URL to send status information to your application
Return type:unicode
status_callback_method
Returns:The HTTP method we use to call status_callback
Return type:unicode
type
Returns:The type of room
Return type:RoomInstance.RoomType
unique_name
Returns:An application-defined string that uniquely identifies the resource
Return type:unicode
update(status)[source]

Update the RoomInstance

Parameters:status (RoomInstance.RoomStatus) – The new status of the resource
Returns:The updated RoomInstance
Return type:twilio.rest.video.v1.room.RoomInstance
url
Returns:The absolute URL of the resource
Return type:unicode
video_codecs
Returns:An array of the video codecs that are supported when publishing a track in the room
Return type:list[RoomInstance.VideoCodec]
class twilio.rest.video.v1.room.RoomList(version)[source]

Bases: twilio.base.list_resource.ListResource

create(enable_turn=<object object>, type=<object object>, unique_name=<object object>, status_callback=<object object>, status_callback_method=<object object>, max_participants=<object object>, record_participants_on_connect=<object object>, video_codecs=<object object>, media_region=<object object>, recording_rules=<object object>, audio_only=<object object>)[source]

Create the RoomInstance

Parameters:
  • enable_turn (bool) – Enable Twilio’s Network Traversal TURN service
  • type (RoomInstance.RoomType) – The type of room
  • unique_name (unicode) – An application-defined string that uniquely identifies the resource
  • status_callback (unicode) – The URL to send status information to your application
  • status_callback_method (unicode) – The HTTP method we should use to call status_callback
  • max_participants (unicode) – The maximum number of concurrent Participants allowed in the room
  • record_participants_on_connect (bool) – Whether to start recording when Participants connect
  • video_codecs (list[RoomInstance.VideoCodec]) – An array of the video codecs that are supported when publishing a track in the room
  • media_region (unicode) – The region for the media server in Group Rooms
  • recording_rules (dict) – A collection of Recording Rules
  • audio_only (bool) – Indicates whether the room will only contain audio track participants for group rooms.
Returns:

The created RoomInstance

Return type:

twilio.rest.video.v1.room.RoomInstance

get(sid)[source]

Constructs a RoomContext

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

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

Parameters:target_url (str) – API-generated URL for the requested results page
Returns:Page of RoomInstance
Return type:twilio.rest.video.v1.room.RoomPage
list(status=<object object>, unique_name=<object object>, date_created_after=<object object>, date_created_before=<object object>, limit=None, page_size=None)[source]

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

Parameters:
  • status (RoomInstance.RoomStatus) – Read only the rooms with this status
  • unique_name (unicode) – Read only rooms with this unique_name
  • date_created_after (datetime) – Read only rooms that started on or after this date, given as YYYY-MM-DD
  • date_created_before (datetime) – Read only rooms that started before this date, given as YYYY-MM-DD
  • 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.video.v1.room.RoomInstance]

page(status=<object object>, unique_name=<object object>, date_created_after=<object object>, date_created_before=<object object>, page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]

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

Parameters:
  • status (RoomInstance.RoomStatus) – Read only the rooms with this status
  • unique_name (unicode) – Read only rooms with this unique_name
  • date_created_after (datetime) – Read only rooms that started on or after this date, given as YYYY-MM-DD
  • date_created_before (datetime) – Read only rooms that started before this date, given as YYYY-MM-DD
  • 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 RoomInstance

Return type:

twilio.rest.video.v1.room.RoomPage

stream(status=<object object>, unique_name=<object object>, date_created_after=<object object>, date_created_before=<object object>, limit=None, page_size=None)[source]

Streams RoomInstance 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 (RoomInstance.RoomStatus) – Read only the rooms with this status
  • unique_name (unicode) – Read only rooms with this unique_name
  • date_created_after (datetime) – Read only rooms that started on or after this date, given as YYYY-MM-DD
  • date_created_before (datetime) – Read only rooms that started before this date, given as YYYY-MM-DD
  • 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.video.v1.room.RoomInstance]

class twilio.rest.video.v1.room.RoomPage(version, response, solution)[source]

Bases: twilio.base.page.Page

get_instance(payload)[source]

Build an instance of RoomInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.video.v1.room.RoomInstance
Return type:twilio.rest.video.v1.room.RoomInstance