twilio.rest.sync.v1.service.sync_stream package

Submodules

twilio.rest.sync.v1.service.sync_stream.stream_message module

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

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

System Message: WARNING/2 (/twilio/repos/twilio-python/twilio/rest/sync/v1/service/sync_stream/stream_message.py:docstring of twilio.rest.sync.v1.service.sync_stream.stream_message, line 3); backlink

Inline substitution_reference start-string without end-string.
class twilio.rest.sync.v1.service.sync_stream.stream_message.StreamMessageInstance(version, payload, service_sid, stream_sid)[source]

Bases: twilio.base.instance_resource.InstanceResource

data
Returns:Stream Message body
Return type:dict
sid
Returns:The unique string that identifies the resource
Return type:unicode
class twilio.rest.sync.v1.service.sync_stream.stream_message.StreamMessageList(version, service_sid, stream_sid)[source]

Bases: twilio.base.list_resource.ListResource

create(data)[source]

Create the StreamMessageInstance

Parameters:data (dict) – A JSON string that represents an arbitrary, schema-less object that makes up the Stream Message body
Returns:The created StreamMessageInstance
Return type:twilio.rest.sync.v1.service.sync_stream.stream_message.StreamMessageInstance
class twilio.rest.sync.v1.service.sync_stream.stream_message.StreamMessagePage(version, response, solution)[source]

Bases: twilio.base.page.Page

get_instance(payload)[source]

Build an instance of StreamMessageInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.sync.v1.service.sync_stream.stream_message.StreamMessageInstance
Return type:twilio.rest.sync.v1.service.sync_stream.stream_message.StreamMessageInstance

Module contents

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

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

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

Inline substitution_reference start-string without end-string.
class twilio.rest.sync.v1.service.sync_stream.SyncStreamContext(version, service_sid, sid)[source]

Bases: twilio.base.instance_context.InstanceContext

delete()[source]

Deletes the SyncStreamInstance

Returns:True if delete succeeds, False otherwise
Return type:bool
fetch()[source]

Fetch the SyncStreamInstance

Returns:The fetched SyncStreamInstance
Return type:twilio.rest.sync.v1.service.sync_stream.SyncStreamInstance
stream_messages

Access the stream_messages

Returns:twilio.rest.sync.v1.service.sync_stream.stream_message.StreamMessageList
Return type:twilio.rest.sync.v1.service.sync_stream.stream_message.StreamMessageList
update(ttl=<object object>)[source]

Update the SyncStreamInstance

Parameters:ttl (unicode) – How long, in seconds, before the Stream expires and is deleted
Returns:The updated SyncStreamInstance
Return type:twilio.rest.sync.v1.service.sync_stream.SyncStreamInstance
class twilio.rest.sync.v1.service.sync_stream.SyncStreamInstance(version, payload, service_sid, sid=None)[source]

Bases: twilio.base.instance_resource.InstanceResource

account_sid
Returns:The SID of the Account that created the resource
Return type:unicode
created_by
Returns:The Identity of the Stream’s creator
Return type:unicode
date_created
Returns:The ISO 8601 date and time in GMT when the resource was created
Return type:datetime
date_expires
Returns:The ISO 8601 date and time in GMT when the Message Stream expires
Return type:datetime
date_updated
Returns:The ISO 8601 date and time in GMT when the resource was last updated
Return type:datetime
delete()[source]

Deletes the SyncStreamInstance

Returns:True if delete succeeds, False otherwise
Return type:bool
fetch()[source]

Fetch the SyncStreamInstance

Returns:The fetched SyncStreamInstance
Return type:twilio.rest.sync.v1.service.sync_stream.SyncStreamInstance
Returns:The URLs of the Stream’s nested resources
Return type:unicode
service_sid
Returns:The SID of the Sync Service that the resource is associated with
Return type:unicode
sid
Returns:The unique string that identifies the resource
Return type:unicode
stream_messages

Access the stream_messages

Returns:twilio.rest.sync.v1.service.sync_stream.stream_message.StreamMessageList
Return type:twilio.rest.sync.v1.service.sync_stream.stream_message.StreamMessageList
unique_name
Returns:An application-defined string that uniquely identifies the resource
Return type:unicode
update(ttl=<object object>)[source]

Update the SyncStreamInstance

Parameters:ttl (unicode) – How long, in seconds, before the Stream expires and is deleted
Returns:The updated SyncStreamInstance
Return type:twilio.rest.sync.v1.service.sync_stream.SyncStreamInstance
url
Returns:The absolute URL of the Message Stream resource
Return type:unicode
class twilio.rest.sync.v1.service.sync_stream.SyncStreamList(version, service_sid)[source]

Bases: twilio.base.list_resource.ListResource

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

Create the SyncStreamInstance

Parameters:
  • unique_name (unicode) – An application-defined string that uniquely identifies the resource
  • ttl (unicode) – How long, in seconds, before the Stream expires and is deleted
Returns:

The created SyncStreamInstance

Return type:

twilio.rest.sync.v1.service.sync_stream.SyncStreamInstance

get(sid)[source]

Constructs a SyncStreamContext

Parameters:sid – The SID of the Stream resource to fetch
Returns:twilio.rest.sync.v1.service.sync_stream.SyncStreamContext
Return type:twilio.rest.sync.v1.service.sync_stream.SyncStreamContext
get_page(target_url)[source]

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

Parameters:target_url (str) – API-generated URL for the requested results page
Returns:Page of SyncStreamInstance
Return type:twilio.rest.sync.v1.service.sync_stream.SyncStreamPage
list(limit=None, page_size=None)[source]

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

Parameters:
  • 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.sync.v1.service.sync_stream.SyncStreamInstance]

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

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

Parameters:
  • 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 SyncStreamInstance

Return type:

twilio.rest.sync.v1.service.sync_stream.SyncStreamPage

stream(limit=None, page_size=None)[source]

Streams SyncStreamInstance 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:
  • 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.sync.v1.service.sync_stream.SyncStreamInstance]

class twilio.rest.sync.v1.service.sync_stream.SyncStreamPage(version, response, solution)[source]

Bases: twilio.base.page.Page

get_instance(payload)[source]

Build an instance of SyncStreamInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.sync.v1.service.sync_stream.SyncStreamInstance
Return type:twilio.rest.sync.v1.service.sync_stream.SyncStreamInstance