twilio.rest.sync.v1.service package

Module contents

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

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

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

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

Bases: twilio.base.instance_context.InstanceContext

delete()[source]

Deletes the ServiceInstance

Returns:True if delete succeeds, False otherwise
Return type:bool
documents

Access the documents

Returns:twilio.rest.sync.v1.service.document.DocumentList
Return type:twilio.rest.sync.v1.service.document.DocumentList
fetch()[source]

Fetch the ServiceInstance

Returns:The fetched ServiceInstance
Return type:twilio.rest.sync.v1.service.ServiceInstance
sync_lists

Access the sync_lists

Returns:twilio.rest.sync.v1.service.sync_list.SyncListList
Return type:twilio.rest.sync.v1.service.sync_list.SyncListList
sync_maps

Access the sync_maps

Returns:twilio.rest.sync.v1.service.sync_map.SyncMapList
Return type:twilio.rest.sync.v1.service.sync_map.SyncMapList
sync_streams

Access the sync_streams

Returns:twilio.rest.sync.v1.service.sync_stream.SyncStreamList
Return type:twilio.rest.sync.v1.service.sync_stream.SyncStreamList
update(webhook_url=<object object>, friendly_name=<object object>, reachability_webhooks_enabled=<object object>, acl_enabled=<object object>, reachability_debouncing_enabled=<object object>, reachability_debouncing_window=<object object>, webhooks_from_rest_enabled=<object object>)[source]

Update the ServiceInstance

Parameters:
  • webhook_url (unicode) – The URL we should call when Sync objects are manipulated
  • friendly_name (unicode) – A string that you assign to describe the resource
  • reachability_webhooks_enabled (bool) – Whether the service instance should call webhook_url when client endpoints connect to Sync
  • acl_enabled (bool) – Whether token identities in the Service must be granted access to Sync objects by using the Permissions resource
  • reachability_debouncing_enabled (bool) – Whether every endpoint_disconnected event occurs after a configurable delay
  • reachability_debouncing_window (unicode) – The reachability event delay in milliseconds
  • webhooks_from_rest_enabled (bool) – Whether the Service instance should call webhook_url when the REST API is used to update Sync objects
Returns:

The updated ServiceInstance

Return type:

twilio.rest.sync.v1.service.ServiceInstance

class twilio.rest.sync.v1.service.ServiceInstance(version, payload, sid=None)[source]

Bases: twilio.base.instance_resource.InstanceResource

account_sid
Returns:The SID of the Account that created the resource
Return type:unicode
acl_enabled
Returns:Whether token identities in the Service must be granted access to Sync objects by using the Permissions resource
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
delete()[source]

Deletes the ServiceInstance

Returns:True if delete succeeds, False otherwise
Return type:bool
documents

Access the documents

Returns:twilio.rest.sync.v1.service.document.DocumentList
Return type:twilio.rest.sync.v1.service.document.DocumentList
fetch()[source]

Fetch the ServiceInstance

Returns:The fetched ServiceInstance
Return type:twilio.rest.sync.v1.service.ServiceInstance
friendly_name
Returns:The string that you assigned to describe the resource
Return type:unicode
Returns:The URLs of related resources
Return type:unicode
reachability_debouncing_enabled
Returns:Whether every endpoint_disconnected event occurs after a configurable delay
Return type:bool
reachability_debouncing_window
Returns:The reachability event delay in milliseconds
Return type:unicode
reachability_webhooks_enabled
Returns:Whether the service instance calls webhook_url when client endpoints connect to Sync
Return type:bool
sid
Returns:The unique string that identifies the resource
Return type:unicode
sync_lists

Access the sync_lists

Returns:twilio.rest.sync.v1.service.sync_list.SyncListList
Return type:twilio.rest.sync.v1.service.sync_list.SyncListList
sync_maps

Access the sync_maps

Returns:twilio.rest.sync.v1.service.sync_map.SyncMapList
Return type:twilio.rest.sync.v1.service.sync_map.SyncMapList
sync_streams

Access the sync_streams

Returns:twilio.rest.sync.v1.service.sync_stream.SyncStreamList
Return type:twilio.rest.sync.v1.service.sync_stream.SyncStreamList
unique_name
Returns:An application-defined string that uniquely identifies the resource
Return type:unicode
update(webhook_url=<object object>, friendly_name=<object object>, reachability_webhooks_enabled=<object object>, acl_enabled=<object object>, reachability_debouncing_enabled=<object object>, reachability_debouncing_window=<object object>, webhooks_from_rest_enabled=<object object>)[source]

Update the ServiceInstance

Parameters:
  • webhook_url (unicode) – The URL we should call when Sync objects are manipulated
  • friendly_name (unicode) – A string that you assign to describe the resource
  • reachability_webhooks_enabled (bool) – Whether the service instance should call webhook_url when client endpoints connect to Sync
  • acl_enabled (bool) – Whether token identities in the Service must be granted access to Sync objects by using the Permissions resource
  • reachability_debouncing_enabled (bool) – Whether every endpoint_disconnected event occurs after a configurable delay
  • reachability_debouncing_window (unicode) – The reachability event delay in milliseconds
  • webhooks_from_rest_enabled (bool) – Whether the Service instance should call webhook_url when the REST API is used to update Sync objects
Returns:

The updated ServiceInstance

Return type:

twilio.rest.sync.v1.service.ServiceInstance

url
Returns:The absolute URL of the Service resource
Return type:unicode
webhook_url
Returns:The URL we call when Sync objects are manipulated
Return type:unicode
webhooks_from_rest_enabled
Returns:Whether the Service instance should call webhook_url when the REST API is used to update Sync objects
Return type:bool
class twilio.rest.sync.v1.service.ServiceList(version)[source]

Bases: twilio.base.list_resource.ListResource

create(friendly_name=<object object>, webhook_url=<object object>, reachability_webhooks_enabled=<object object>, acl_enabled=<object object>, reachability_debouncing_enabled=<object object>, reachability_debouncing_window=<object object>, webhooks_from_rest_enabled=<object object>)[source]

Create the ServiceInstance

Parameters:
  • friendly_name (unicode) – A string that you assign to describe the resource
  • webhook_url (unicode) – The URL we should call when Sync objects are manipulated
  • reachability_webhooks_enabled (bool) – Whether the service instance should call webhook_url when client endpoints connect to Sync
  • acl_enabled (bool) – Whether token identities in the Service must be granted access to Sync objects by using the Permissions resource
  • reachability_debouncing_enabled (bool) – Whether every endpoint_disconnected event occurs after a configurable delay
  • reachability_debouncing_window (unicode) – The reachability event delay in milliseconds
  • webhooks_from_rest_enabled (bool) – Whether the Service instance should call webhook_url when the REST API is used to update Sync objects
Returns:

The created ServiceInstance

Return type:

twilio.rest.sync.v1.service.ServiceInstance

get(sid)[source]

Constructs a ServiceContext

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

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

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

Lists ServiceInstance 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.ServiceInstance]

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

Retrieve a single page of ServiceInstance 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 ServiceInstance

Return type:

twilio.rest.sync.v1.service.ServicePage

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

Streams ServiceInstance 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.ServiceInstance]

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

Bases: twilio.base.page.Page

get_instance(payload)[source]

Build an instance of ServiceInstance

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