twilio.rest.chat.v1.service package

Submodules

twilio.rest.chat.v1.service.role module

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

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

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

Inline substitution_reference start-string without end-string.
class twilio.rest.chat.v1.service.role.RoleContext(version, service_sid, sid)[source]

Bases: twilio.base.instance_context.InstanceContext

delete()[source]

Deletes the RoleInstance

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

Fetch the RoleInstance

Returns:The fetched RoleInstance
Return type:twilio.rest.chat.v1.service.role.RoleInstance
update(permission)[source]

Update the RoleInstance

Parameters:permission (list[unicode]) – A permission the role should have
Returns:The updated RoleInstance
Return type:twilio.rest.chat.v1.service.role.RoleInstance
class twilio.rest.chat.v1.service.role.RoleInstance(version, payload, service_sid, sid=None)[source]

Bases: twilio.base.instance_resource.InstanceResource

class RoleType[source]

Bases: object

CHANNEL = 'channel'
DEPLOYMENT = 'deployment'
account_sid
Returns:The SID of the Account that created the resource
Return type:unicode
date_created
Returns:The RFC 2822 date and time in GMT when the resource was created
Return type:datetime
date_updated
Returns:The RFC 2822 date and time in GMT when the resource was last updated
Return type:datetime
delete()[source]

Deletes the RoleInstance

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

Fetch the RoleInstance

Returns:The fetched RoleInstance
Return type:twilio.rest.chat.v1.service.role.RoleInstance
friendly_name
Returns:The string that you assigned to describe the resource
Return type:unicode
permissions
Returns:An array of the permissions the role has been granted
Return type:list[unicode]
service_sid
Returns:The SID of the Service that the resource is associated with
Return type:unicode
sid
Returns:The unique string that identifies the resource
Return type:unicode
type
Returns:The type of role
Return type:RoleInstance.RoleType
update(permission)[source]

Update the RoleInstance

Parameters:permission (list[unicode]) – A permission the role should have
Returns:The updated RoleInstance
Return type:twilio.rest.chat.v1.service.role.RoleInstance
url
Returns:The absolute URL of the Role resource
Return type:unicode
class twilio.rest.chat.v1.service.role.RoleList(version, service_sid)[source]

Bases: twilio.base.list_resource.ListResource

create(friendly_name, type, permission)[source]

Create the RoleInstance

Parameters:
  • friendly_name (unicode) – A string to describe the new resource
  • type (RoleInstance.RoleType) – The type of role
  • permission (list[unicode]) – A permission the role should have
Returns:

The created RoleInstance

Return type:

twilio.rest.chat.v1.service.role.RoleInstance

get(sid)[source]

Constructs a RoleContext

Parameters:sid – The unique string that identifies the resource
Returns:twilio.rest.chat.v1.service.role.RoleContext
Return type:twilio.rest.chat.v1.service.role.RoleContext
get_page(target_url)[source]

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

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

Lists RoleInstance 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.chat.v1.service.role.RoleInstance]

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

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

Return type:

twilio.rest.chat.v1.service.role.RolePage

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

Streams RoleInstance 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.chat.v1.service.role.RoleInstance]

class twilio.rest.chat.v1.service.role.RolePage(version, response, solution)[source]

Bases: twilio.base.page.Page

get_instance(payload)[source]

Build an instance of RoleInstance

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

Module contents

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

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

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

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

Bases: twilio.base.instance_context.InstanceContext

channels

Access the channels

Returns:twilio.rest.chat.v1.service.channel.ChannelList
Return type:twilio.rest.chat.v1.service.channel.ChannelList
delete()[source]

Deletes the ServiceInstance

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

Fetch the ServiceInstance

Returns:The fetched ServiceInstance
Return type:twilio.rest.chat.v1.service.ServiceInstance
roles

Access the roles

Returns:twilio.rest.chat.v1.service.role.RoleList
Return type:twilio.rest.chat.v1.service.role.RoleList
update(friendly_name=<object object>, default_service_role_sid=<object object>, default_channel_role_sid=<object object>, default_channel_creator_role_sid=<object object>, read_status_enabled=<object object>, reachability_enabled=<object object>, typing_indicator_timeout=<object object>, consumption_report_interval=<object object>, notifications_new_message_enabled=<object object>, notifications_new_message_template=<object object>, notifications_added_to_channel_enabled=<object object>, notifications_added_to_channel_template=<object object>, notifications_removed_from_channel_enabled=<object object>, notifications_removed_from_channel_template=<object object>, notifications_invited_to_channel_enabled=<object object>, notifications_invited_to_channel_template=<object object>, pre_webhook_url=<object object>, post_webhook_url=<object object>, webhook_method=<object object>, webhook_filters=<object object>, webhooks_on_message_send_url=<object object>, webhooks_on_message_send_method=<object object>, webhooks_on_message_update_url=<object object>, webhooks_on_message_update_method=<object object>, webhooks_on_message_remove_url=<object object>, webhooks_on_message_remove_method=<object object>, webhooks_on_channel_add_url=<object object>, webhooks_on_channel_add_method=<object object>, webhooks_on_channel_destroy_url=<object object>, webhooks_on_channel_destroy_method=<object object>, webhooks_on_channel_update_url=<object object>, webhooks_on_channel_update_method=<object object>, webhooks_on_member_add_url=<object object>, webhooks_on_member_add_method=<object object>, webhooks_on_member_remove_url=<object object>, webhooks_on_member_remove_method=<object object>, webhooks_on_message_sent_url=<object object>, webhooks_on_message_sent_method=<object object>, webhooks_on_message_updated_url=<object object>, webhooks_on_message_updated_method=<object object>, webhooks_on_message_removed_url=<object object>, webhooks_on_message_removed_method=<object object>, webhooks_on_channel_added_url=<object object>, webhooks_on_channel_added_method=<object object>, webhooks_on_channel_destroyed_url=<object object>, webhooks_on_channel_destroyed_method=<object object>, webhooks_on_channel_updated_url=<object object>, webhooks_on_channel_updated_method=<object object>, webhooks_on_member_added_url=<object object>, webhooks_on_member_added_method=<object object>, webhooks_on_member_removed_url=<object object>, webhooks_on_member_removed_method=<object object>, limits_channel_members=<object object>, limits_user_channels=<object object>)[source]

Update the ServiceInstance

Parameters:
  • friendly_name (unicode) – A string to describe the resource
  • default_service_role_sid (unicode) – The service role assigned to users when they are added to the service
  • default_channel_role_sid (unicode) – The channel role assigned to users when they are added to a channel
  • default_channel_creator_role_sid (unicode) – The channel role assigned to a channel creator when they join a new channel
  • read_status_enabled (bool) – Whether to enable the Message Consumption Horizon feature
  • reachability_enabled (bool) – Whether to enable the Reachability Indicator feature for this Service instance
  • typing_indicator_timeout (unicode) – How long in seconds to wait before assuming the user is no longer typing
  • consumption_report_interval (unicode) – DEPRECATED
  • notifications_new_message_enabled (bool) – Whether to send a notification when a new message is added to a channel
  • notifications_new_message_template (unicode) – The template to use to create the notification text displayed when a new message is added to a channel
  • notifications_added_to_channel_enabled (bool) – Whether to send a notification when a member is added to a channel
  • notifications_added_to_channel_template (unicode) – The template to use to create the notification text displayed when a member is added to a channel
  • notifications_removed_from_channel_enabled (bool) – Whether to send a notification to a user when they are removed from a channel
  • notifications_removed_from_channel_template (unicode) – The template to use to create the notification text displayed to a user when they are removed
  • notifications_invited_to_channel_enabled (bool) – Whether to send a notification when a user is invited to a channel
  • notifications_invited_to_channel_template (unicode) – The template to use to create the notification text displayed when a user is invited to a channel
  • pre_webhook_url (unicode) – The webhook URL for pre-event webhooks
  • post_webhook_url (unicode) – The URL for post-event webhooks
  • webhook_method (unicode) – The HTTP method to use for both PRE and POST webhooks
  • webhook_filters (list[unicode]) – The list of WebHook events that are enabled for this Service instance
  • webhooks_on_message_send_url (unicode) – The URL of the webhook to call in response to the on_message_send event
  • webhooks_on_message_send_method (unicode) – The HTTP method to use when calling the webhooks.on_message_send.url
  • webhooks_on_message_update_url (unicode) – The URL of the webhook to call in response to the on_message_update event
  • webhooks_on_message_update_method (unicode) – The HTTP method to use when calling the webhooks.on_message_update.url
  • webhooks_on_message_remove_url (unicode) – The URL of the webhook to call in response to the on_message_remove event
  • webhooks_on_message_remove_method (unicode) – The HTTP method to use when calling the webhooks.on_message_remove.url
  • webhooks_on_channel_add_url (unicode) – The URL of the webhook to call in response to the on_channel_add event
  • webhooks_on_channel_add_method (unicode) – The HTTP method to use when calling the webhooks.on_channel_add.url
  • webhooks_on_channel_destroy_url (unicode) – The URL of the webhook to call in response to the on_channel_destroy event
  • webhooks_on_channel_destroy_method (unicode) – The HTTP method to use when calling the webhooks.on_channel_destroy.url
  • webhooks_on_channel_update_url (unicode) – The URL of the webhook to call in response to the on_channel_update event
  • webhooks_on_channel_update_method (unicode) – The HTTP method to use when calling the webhooks.on_channel_update.url
  • webhooks_on_member_add_url (unicode) – The URL of the webhook to call in response to the on_member_add event
  • webhooks_on_member_add_method (unicode) – The HTTP method to use when calling the webhooks.on_member_add.url
  • webhooks_on_member_remove_url (unicode) – The URL of the webhook to call in response to the on_member_remove event
  • webhooks_on_member_remove_method (unicode) – The HTTP method to use when calling the webhooks.on_member_remove.url
  • webhooks_on_message_sent_url (unicode) – The URL of the webhook to call in response to the on_message_sent event
  • webhooks_on_message_sent_method (unicode) – The URL of the webhook to call in response to the on_message_sent event
  • webhooks_on_message_updated_url (unicode) – The URL of the webhook to call in response to the on_message_updated event
  • webhooks_on_message_updated_method (unicode) – The HTTP method to use when calling the webhooks.on_message_updated.url
  • webhooks_on_message_removed_url (unicode) – The URL of the webhook to call in response to the on_message_removed event
  • webhooks_on_message_removed_method (unicode) – The HTTP method to use when calling the webhooks.on_message_removed.url
  • webhooks_on_channel_added_url (unicode) – The URL of the webhook to call in response to the on_channel_added event
  • webhooks_on_channel_added_method (unicode) – The URL of the webhook to call in response to the on_channel_added event
  • webhooks_on_channel_destroyed_url (unicode) – The URL of the webhook to call in response to the on_channel_added event
  • webhooks_on_channel_destroyed_method (unicode) – The HTTP method to use when calling the webhooks.on_channel_destroyed.url
  • webhooks_on_channel_updated_url (unicode) – he URL of the webhook to call in response to the on_channel_updated event
  • webhooks_on_channel_updated_method (unicode) – The HTTP method to use when calling the webhooks.on_channel_updated.url
  • webhooks_on_member_added_url (unicode) – The URL of the webhook to call in response to the on_channel_updated event
  • webhooks_on_member_added_method (unicode) – he HTTP method to use when calling the webhooks.on_channel_updated.url
  • webhooks_on_member_removed_url (unicode) – The URL of the webhook to call in response to the on_member_removed event
  • webhooks_on_member_removed_method (unicode) – The HTTP method to use when calling the webhooks.on_member_removed.url
  • limits_channel_members (unicode) – The maximum number of Members that can be added to Channels within this Service
  • limits_user_channels (unicode) – The maximum number of Channels Users can be a Member of within this Service
Returns:

The updated ServiceInstance

Return type:

twilio.rest.chat.v1.service.ServiceInstance

users

Access the users

Returns:twilio.rest.chat.v1.service.user.UserList
Return type:twilio.rest.chat.v1.service.user.UserList
class twilio.rest.chat.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
channels

Access the channels

Returns:twilio.rest.chat.v1.service.channel.ChannelList
Return type:twilio.rest.chat.v1.service.channel.ChannelList
consumption_report_interval
Returns:DEPRECATED
Return type:unicode
date_created
Returns:The RFC 2822 date and time in GMT when the resource was created
Return type:datetime
date_updated
Returns:The RFC 2822 date and time in GMT when the resource was last updated
Return type:datetime
default_channel_creator_role_sid
Returns:The channel role assigned to a channel creator when they join a new channel
Return type:unicode
default_channel_role_sid
Returns:The channel role assigned to users when they are added to a channel
Return type:unicode
default_service_role_sid
Returns:The service role assigned to users when they are added to the service
Return type:unicode
delete()[source]

Deletes the ServiceInstance

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

Fetch the ServiceInstance

Returns:The fetched ServiceInstance
Return type:twilio.rest.chat.v1.service.ServiceInstance
friendly_name
Returns:The string that you assigned to describe the resource
Return type:unicode
limits
Returns:An object that describes the limits of the service instance
Return type:dict
Returns:The absolute URLs of the Service’s Channels, Roles, and Users
Return type:unicode
notifications
Returns:The notification configuration for the Service instance
Return type:dict
post_webhook_url
Returns:The URL for post-event webhooks
Return type:unicode
pre_webhook_url
Returns:The webhook URL for pre-event webhooks
Return type:unicode
reachability_enabled
Returns:Whether the Reachability Indicator feature is enabled for this Service instance
Return type:bool
read_status_enabled
Returns:Whether the Message Consumption Horizon feature is enabled
Return type:bool
roles

Access the roles

Returns:twilio.rest.chat.v1.service.role.RoleList
Return type:twilio.rest.chat.v1.service.role.RoleList
sid
Returns:The unique string that identifies the resource
Return type:unicode
typing_indicator_timeout
Returns:How long in seconds to wait before assuming the user is no longer typing
Return type:unicode
update(friendly_name=<object object>, default_service_role_sid=<object object>, default_channel_role_sid=<object object>, default_channel_creator_role_sid=<object object>, read_status_enabled=<object object>, reachability_enabled=<object object>, typing_indicator_timeout=<object object>, consumption_report_interval=<object object>, notifications_new_message_enabled=<object object>, notifications_new_message_template=<object object>, notifications_added_to_channel_enabled=<object object>, notifications_added_to_channel_template=<object object>, notifications_removed_from_channel_enabled=<object object>, notifications_removed_from_channel_template=<object object>, notifications_invited_to_channel_enabled=<object object>, notifications_invited_to_channel_template=<object object>, pre_webhook_url=<object object>, post_webhook_url=<object object>, webhook_method=<object object>, webhook_filters=<object object>, webhooks_on_message_send_url=<object object>, webhooks_on_message_send_method=<object object>, webhooks_on_message_update_url=<object object>, webhooks_on_message_update_method=<object object>, webhooks_on_message_remove_url=<object object>, webhooks_on_message_remove_method=<object object>, webhooks_on_channel_add_url=<object object>, webhooks_on_channel_add_method=<object object>, webhooks_on_channel_destroy_url=<object object>, webhooks_on_channel_destroy_method=<object object>, webhooks_on_channel_update_url=<object object>, webhooks_on_channel_update_method=<object object>, webhooks_on_member_add_url=<object object>, webhooks_on_member_add_method=<object object>, webhooks_on_member_remove_url=<object object>, webhooks_on_member_remove_method=<object object>, webhooks_on_message_sent_url=<object object>, webhooks_on_message_sent_method=<object object>, webhooks_on_message_updated_url=<object object>, webhooks_on_message_updated_method=<object object>, webhooks_on_message_removed_url=<object object>, webhooks_on_message_removed_method=<object object>, webhooks_on_channel_added_url=<object object>, webhooks_on_channel_added_method=<object object>, webhooks_on_channel_destroyed_url=<object object>, webhooks_on_channel_destroyed_method=<object object>, webhooks_on_channel_updated_url=<object object>, webhooks_on_channel_updated_method=<object object>, webhooks_on_member_added_url=<object object>, webhooks_on_member_added_method=<object object>, webhooks_on_member_removed_url=<object object>, webhooks_on_member_removed_method=<object object>, limits_channel_members=<object object>, limits_user_channels=<object object>)[source]

Update the ServiceInstance

Parameters:
  • friendly_name (unicode) – A string to describe the resource
  • default_service_role_sid (unicode) – The service role assigned to users when they are added to the service
  • default_channel_role_sid (unicode) – The channel role assigned to users when they are added to a channel
  • default_channel_creator_role_sid (unicode) – The channel role assigned to a channel creator when they join a new channel
  • read_status_enabled (bool) – Whether to enable the Message Consumption Horizon feature
  • reachability_enabled (bool) – Whether to enable the Reachability Indicator feature for this Service instance
  • typing_indicator_timeout (unicode) – How long in seconds to wait before assuming the user is no longer typing
  • consumption_report_interval (unicode) – DEPRECATED
  • notifications_new_message_enabled (bool) – Whether to send a notification when a new message is added to a channel
  • notifications_new_message_template (unicode) – The template to use to create the notification text displayed when a new message is added to a channel
  • notifications_added_to_channel_enabled (bool) – Whether to send a notification when a member is added to a channel
  • notifications_added_to_channel_template (unicode) – The template to use to create the notification text displayed when a member is added to a channel
  • notifications_removed_from_channel_enabled (bool) – Whether to send a notification to a user when they are removed from a channel
  • notifications_removed_from_channel_template (unicode) – The template to use to create the notification text displayed to a user when they are removed
  • notifications_invited_to_channel_enabled (bool) – Whether to send a notification when a user is invited to a channel
  • notifications_invited_to_channel_template (unicode) – The template to use to create the notification text displayed when a user is invited to a channel
  • pre_webhook_url (unicode) – The webhook URL for pre-event webhooks
  • post_webhook_url (unicode) – The URL for post-event webhooks
  • webhook_method (unicode) – The HTTP method to use for both PRE and POST webhooks
  • webhook_filters (list[unicode]) – The list of WebHook events that are enabled for this Service instance
  • webhooks_on_message_send_url (unicode) – The URL of the webhook to call in response to the on_message_send event
  • webhooks_on_message_send_method (unicode) – The HTTP method to use when calling the webhooks.on_message_send.url
  • webhooks_on_message_update_url (unicode) – The URL of the webhook to call in response to the on_message_update event
  • webhooks_on_message_update_method (unicode) – The HTTP method to use when calling the webhooks.on_message_update.url
  • webhooks_on_message_remove_url (unicode) – The URL of the webhook to call in response to the on_message_remove event
  • webhooks_on_message_remove_method (unicode) – The HTTP method to use when calling the webhooks.on_message_remove.url
  • webhooks_on_channel_add_url (unicode) – The URL of the webhook to call in response to the on_channel_add event
  • webhooks_on_channel_add_method (unicode) – The HTTP method to use when calling the webhooks.on_channel_add.url
  • webhooks_on_channel_destroy_url (unicode) – The URL of the webhook to call in response to the on_channel_destroy event
  • webhooks_on_channel_destroy_method (unicode) – The HTTP method to use when calling the webhooks.on_channel_destroy.url
  • webhooks_on_channel_update_url (unicode) – The URL of the webhook to call in response to the on_channel_update event
  • webhooks_on_channel_update_method (unicode) – The HTTP method to use when calling the webhooks.on_channel_update.url
  • webhooks_on_member_add_url (unicode) – The URL of the webhook to call in response to the on_member_add event
  • webhooks_on_member_add_method (unicode) – The HTTP method to use when calling the webhooks.on_member_add.url
  • webhooks_on_member_remove_url (unicode) – The URL of the webhook to call in response to the on_member_remove event
  • webhooks_on_member_remove_method (unicode) – The HTTP method to use when calling the webhooks.on_member_remove.url
  • webhooks_on_message_sent_url (unicode) – The URL of the webhook to call in response to the on_message_sent event
  • webhooks_on_message_sent_method (unicode) – The URL of the webhook to call in response to the on_message_sent event
  • webhooks_on_message_updated_url (unicode) – The URL of the webhook to call in response to the on_message_updated event
  • webhooks_on_message_updated_method (unicode) – The HTTP method to use when calling the webhooks.on_message_updated.url
  • webhooks_on_message_removed_url (unicode) – The URL of the webhook to call in response to the on_message_removed event
  • webhooks_on_message_removed_method (unicode) – The HTTP method to use when calling the webhooks.on_message_removed.url
  • webhooks_on_channel_added_url (unicode) – The URL of the webhook to call in response to the on_channel_added event
  • webhooks_on_channel_added_method (unicode) – The URL of the webhook to call in response to the on_channel_added event
  • webhooks_on_channel_destroyed_url (unicode) – The URL of the webhook to call in response to the on_channel_added event
  • webhooks_on_channel_destroyed_method (unicode) – The HTTP method to use when calling the webhooks.on_channel_destroyed.url
  • webhooks_on_channel_updated_url (unicode) – he URL of the webhook to call in response to the on_channel_updated event
  • webhooks_on_channel_updated_method (unicode) – The HTTP method to use when calling the webhooks.on_channel_updated.url
  • webhooks_on_member_added_url (unicode) – The URL of the webhook to call in response to the on_channel_updated event
  • webhooks_on_member_added_method (unicode) – he HTTP method to use when calling the webhooks.on_channel_updated.url
  • webhooks_on_member_removed_url (unicode) – The URL of the webhook to call in response to the on_member_removed event
  • webhooks_on_member_removed_method (unicode) – The HTTP method to use when calling the webhooks.on_member_removed.url
  • limits_channel_members (unicode) – The maximum number of Members that can be added to Channels within this Service
  • limits_user_channels (unicode) – The maximum number of Channels Users can be a Member of within this Service
Returns:

The updated ServiceInstance

Return type:

twilio.rest.chat.v1.service.ServiceInstance

url
Returns:The absolute URL of the Service resource
Return type:unicode
users

Access the users

Returns:twilio.rest.chat.v1.service.user.UserList
Return type:twilio.rest.chat.v1.service.user.UserList
webhook_filters
Returns:The list of WebHook events that are enabled for this Service instance
Return type:list[unicode]
webhook_method
Returns:The HTTP method to use for both PRE and POST webhooks
Return type:unicode
webhooks
Returns:An object that contains information about the webhooks configured for this service
Return type:dict
class twilio.rest.chat.v1.service.ServiceList(version)[source]

Bases: twilio.base.list_resource.ListResource

create(friendly_name)[source]

Create the ServiceInstance

Parameters:friendly_name (unicode) – A string to describe the resource
Returns:The created ServiceInstance
Return type:twilio.rest.chat.v1.service.ServiceInstance
get(sid)[source]

Constructs a ServiceContext

Parameters:sid – The unique string that identifies the resource
Returns:twilio.rest.chat.v1.service.ServiceContext
Return type:twilio.rest.chat.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.chat.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.chat.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.chat.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.chat.v1.service.ServiceInstance]

class twilio.rest.chat.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.chat.v1.service.ServiceInstance
Return type:twilio.rest.chat.v1.service.ServiceInstance