twilio.rest.conversations.v1.conversation package

Submodules

twilio.rest.conversations.v1.conversation.participant module

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

(_)/(_)(_|/| |(/_ v1.0.0 / /
class twilio.rest.conversations.v1.conversation.participant.ParticipantContext(version, conversation_sid, sid)[source]

Bases: twilio.base.instance_context.InstanceContext

delete(x_twilio_webhook_enabled=<object object>)[source]

Deletes the ParticipantInstance

Parameters:x_twilio_webhook_enabled (ParticipantInstance.WebhookEnabledType) – The X-Twilio-Webhook-Enabled HTTP request header
Returns:True if delete succeeds, False otherwise
Return type:bool
fetch()[source]

Fetch the ParticipantInstance

Returns:The fetched ParticipantInstance
Return type:twilio.rest.conversations.v1.conversation.participant.ParticipantInstance
update(date_created=<object object>, date_updated=<object object>, attributes=<object object>, role_sid=<object object>, messaging_binding_proxy_address=<object object>, messaging_binding_projected_address=<object object>, identity=<object object>, last_read_message_index=<object object>, last_read_timestamp=<object object>, x_twilio_webhook_enabled=<object object>)[source]

Update the ParticipantInstance

Parameters:
  • date_created (datetime) – The date that this resource was created.
  • date_updated (datetime) – The date that this resource was last updated.
  • attributes (unicode) – An optional string metadata field you can use to store any data you wish.
  • role_sid (unicode) – The SID of a conversation-level Role to assign to the participant
  • messaging_binding_proxy_address (unicode) – The address of the Twilio phone number that the participant is in contact with.
  • messaging_binding_projected_address (unicode) – The address of the Twilio phone number that is used in Group MMS.
  • identity (unicode) – A unique string identifier for the conversation participant as Conversation User.
  • last_read_message_index (unicode) – Index of last “read” message in the Conversation for the Participant.
  • last_read_timestamp (unicode) – Timestamp of last “read” message in the Conversation for the Participant.
  • x_twilio_webhook_enabled (ParticipantInstance.WebhookEnabledType) – The X-Twilio-Webhook-Enabled HTTP request header
Returns:

The updated ParticipantInstance

Return type:

twilio.rest.conversations.v1.conversation.participant.ParticipantInstance

class twilio.rest.conversations.v1.conversation.participant.ParticipantInstance(version, payload, conversation_sid, sid=None)[source]

Bases: twilio.base.instance_resource.InstanceResource

class WebhookEnabledType[source]

Bases: object

FALSE = 'false'
TRUE = 'true'
account_sid
Returns:The unique ID of the Account responsible for this participant.
Return type:unicode
attributes
Returns:An optional string metadata field you can use to store any data you wish.
Return type:unicode
conversation_sid
Returns:The unique ID of the Conversation for this participant.
Return type:unicode
date_created
Returns:The date that this resource was created.
Return type:datetime
date_updated
Returns:The date that this resource was last updated.
Return type:datetime
delete(x_twilio_webhook_enabled=<object object>)[source]

Deletes the ParticipantInstance

Parameters:x_twilio_webhook_enabled (ParticipantInstance.WebhookEnabledType) – The X-Twilio-Webhook-Enabled HTTP request header
Returns:True if delete succeeds, False otherwise
Return type:bool
fetch()[source]

Fetch the ParticipantInstance

Returns:The fetched ParticipantInstance
Return type:twilio.rest.conversations.v1.conversation.participant.ParticipantInstance
identity
Returns:A unique string identifier for the conversation participant as Conversation User.
Return type:unicode
last_read_message_index
Returns:Index of last “read” message in the Conversation for the Participant.
Return type:unicode
last_read_timestamp
Returns:Timestamp of last “read” message in the Conversation for the Participant.
Return type:unicode
messaging_binding
Returns:Information about how this participant exchanges messages with the conversation.
Return type:dict
role_sid
Returns:The SID of a conversation-level Role to assign to the participant
Return type:unicode
sid
Returns:A 34 character string that uniquely identifies this resource.
Return type:unicode
update(date_created=<object object>, date_updated=<object object>, attributes=<object object>, role_sid=<object object>, messaging_binding_proxy_address=<object object>, messaging_binding_projected_address=<object object>, identity=<object object>, last_read_message_index=<object object>, last_read_timestamp=<object object>, x_twilio_webhook_enabled=<object object>)[source]

Update the ParticipantInstance

Parameters:
  • date_created (datetime) – The date that this resource was created.
  • date_updated (datetime) – The date that this resource was last updated.
  • attributes (unicode) – An optional string metadata field you can use to store any data you wish.
  • role_sid (unicode) – The SID of a conversation-level Role to assign to the participant
  • messaging_binding_proxy_address (unicode) – The address of the Twilio phone number that the participant is in contact with.
  • messaging_binding_projected_address (unicode) – The address of the Twilio phone number that is used in Group MMS.
  • identity (unicode) – A unique string identifier for the conversation participant as Conversation User.
  • last_read_message_index (unicode) – Index of last “read” message in the Conversation for the Participant.
  • last_read_timestamp (unicode) – Timestamp of last “read” message in the Conversation for the Participant.
  • x_twilio_webhook_enabled (ParticipantInstance.WebhookEnabledType) – The X-Twilio-Webhook-Enabled HTTP request header
Returns:

The updated ParticipantInstance

Return type:

twilio.rest.conversations.v1.conversation.participant.ParticipantInstance

url
Returns:An absolute URL for this participant.
Return type:unicode
class twilio.rest.conversations.v1.conversation.participant.ParticipantList(version, conversation_sid)[source]

Bases: twilio.base.list_resource.ListResource

create(identity=<object object>, messaging_binding_address=<object object>, messaging_binding_proxy_address=<object object>, date_created=<object object>, date_updated=<object object>, attributes=<object object>, messaging_binding_projected_address=<object object>, role_sid=<object object>, x_twilio_webhook_enabled=<object object>)[source]

Create the ParticipantInstance

Parameters:
  • identity (unicode) – A unique string identifier for the conversation participant as Conversation User.
  • messaging_binding_address (unicode) – The address of the participant’s device.
  • messaging_binding_proxy_address (unicode) – The address of the Twilio phone number that the participant is in contact with.
  • date_created (datetime) – The date that this resource was created.
  • date_updated (datetime) – The date that this resource was last updated.
  • attributes (unicode) – An optional string metadata field you can use to store any data you wish.
  • messaging_binding_projected_address (unicode) – The address of the Twilio phone number that is used in Group MMS.
  • role_sid (unicode) – The SID of a conversation-level Role to assign to the participant
  • x_twilio_webhook_enabled (ParticipantInstance.WebhookEnabledType) – The X-Twilio-Webhook-Enabled HTTP request header
Returns:

The created ParticipantInstance

Return type:

twilio.rest.conversations.v1.conversation.participant.ParticipantInstance

get(sid)[source]

Constructs a ParticipantContext

Parameters:sid – A 34 character string that uniquely identifies this resource.
Returns:twilio.rest.conversations.v1.conversation.participant.ParticipantContext
Return type:twilio.rest.conversations.v1.conversation.participant.ParticipantContext
get_page(target_url)[source]

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

Parameters:target_url (str) – API-generated URL for the requested results page
Returns:Page of ParticipantInstance
Return type:twilio.rest.conversations.v1.conversation.participant.ParticipantPage
list(limit=None, page_size=None)[source]

Lists ParticipantInstance 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.conversations.v1.conversation.participant.ParticipantInstance]

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

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

Return type:

twilio.rest.conversations.v1.conversation.participant.ParticipantPage

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

Streams ParticipantInstance 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.conversations.v1.conversation.participant.ParticipantInstance]

class twilio.rest.conversations.v1.conversation.participant.ParticipantPage(version, response, solution)[source]

Bases: twilio.base.page.Page

get_instance(payload)[source]

Build an instance of ParticipantInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.conversations.v1.conversation.participant.ParticipantInstance
Return type:twilio.rest.conversations.v1.conversation.participant.ParticipantInstance

twilio.rest.conversations.v1.conversation.webhook module

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

(_)/(_)(_|/| |(/_ v1.0.0 / /
class twilio.rest.conversations.v1.conversation.webhook.WebhookContext(version, conversation_sid, sid)[source]

Bases: twilio.base.instance_context.InstanceContext

delete()[source]

Deletes the WebhookInstance

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

Fetch the WebhookInstance

Returns:The fetched WebhookInstance
Return type:twilio.rest.conversations.v1.conversation.webhook.WebhookInstance
update(configuration_url=<object object>, configuration_method=<object object>, configuration_filters=<object object>, configuration_triggers=<object object>, configuration_flow_sid=<object object>)[source]

Update the WebhookInstance

Parameters:
  • configuration_url (unicode) – The absolute url the webhook request should be sent to.
  • configuration_method (WebhookInstance.Method) – The HTTP method to be used when sending a webhook request.
  • configuration_filters (list[unicode]) – The list of events, firing webhook event for this Conversation.
  • configuration_triggers (list[unicode]) – The list of keywords, firing webhook event for this Conversation.
  • configuration_flow_sid (unicode) – The studio flow SID, where the webhook should be sent to.
Returns:

The updated WebhookInstance

Return type:

twilio.rest.conversations.v1.conversation.webhook.WebhookInstance

class twilio.rest.conversations.v1.conversation.webhook.WebhookInstance(version, payload, conversation_sid, sid=None)[source]

Bases: twilio.base.instance_resource.InstanceResource

class Method[source]

Bases: object

GET = 'GET'
POST = 'POST'
class Target[source]

Bases: object

STUDIO = 'studio'
TRIGGER = 'trigger'
WEBHOOK = 'webhook'
account_sid
Returns:The unique ID of the Account responsible for this conversation.
Return type:unicode
configuration
Returns:The configuration of this webhook.
Return type:dict
conversation_sid
Returns:The unique ID of the Conversation for this webhook.
Return type:unicode
date_created
Returns:The date that this resource was created.
Return type:datetime
date_updated
Returns:The date that this resource was last updated.
Return type:datetime
delete()[source]

Deletes the WebhookInstance

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

Fetch the WebhookInstance

Returns:The fetched WebhookInstance
Return type:twilio.rest.conversations.v1.conversation.webhook.WebhookInstance
sid
Returns:A 34 character string that uniquely identifies this resource.
Return type:unicode
target
Returns:The target of this webhook.
Return type:unicode
update(configuration_url=<object object>, configuration_method=<object object>, configuration_filters=<object object>, configuration_triggers=<object object>, configuration_flow_sid=<object object>)[source]

Update the WebhookInstance

Parameters:
  • configuration_url (unicode) – The absolute url the webhook request should be sent to.
  • configuration_method (WebhookInstance.Method) – The HTTP method to be used when sending a webhook request.
  • configuration_filters (list[unicode]) – The list of events, firing webhook event for this Conversation.
  • configuration_triggers (list[unicode]) – The list of keywords, firing webhook event for this Conversation.
  • configuration_flow_sid (unicode) – The studio flow SID, where the webhook should be sent to.
Returns:

The updated WebhookInstance

Return type:

twilio.rest.conversations.v1.conversation.webhook.WebhookInstance

url
Returns:An absolute URL for this webhook.
Return type:unicode
class twilio.rest.conversations.v1.conversation.webhook.WebhookList(version, conversation_sid)[source]

Bases: twilio.base.list_resource.ListResource

create(target, configuration_url=<object object>, configuration_method=<object object>, configuration_filters=<object object>, configuration_triggers=<object object>, configuration_flow_sid=<object object>, configuration_replay_after=<object object>)[source]

Create the WebhookInstance

Parameters:
  • target (WebhookInstance.Target) – The target of this webhook.
  • configuration_url (unicode) – The absolute url the webhook request should be sent to.
  • configuration_method (WebhookInstance.Method) – The HTTP method to be used when sending a webhook request.
  • configuration_filters (list[unicode]) – The list of events, firing webhook event for this Conversation.
  • configuration_triggers (list[unicode]) – The list of keywords, firing webhook event for this Conversation.
  • configuration_flow_sid (unicode) – The studio flow SID, where the webhook should be sent to.
  • configuration_replay_after (unicode) – The message index for which and it’s successors the webhook will be replayed.
Returns:

The created WebhookInstance

Return type:

twilio.rest.conversations.v1.conversation.webhook.WebhookInstance

get(sid)[source]

Constructs a WebhookContext

Parameters:sid – A 34 character string that uniquely identifies this resource.
Returns:twilio.rest.conversations.v1.conversation.webhook.WebhookContext
Return type:twilio.rest.conversations.v1.conversation.webhook.WebhookContext
get_page(target_url)[source]

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

Parameters:target_url (str) – API-generated URL for the requested results page
Returns:Page of WebhookInstance
Return type:twilio.rest.conversations.v1.conversation.webhook.WebhookPage
list(limit=None, page_size=None)[source]

Lists WebhookInstance 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.conversations.v1.conversation.webhook.WebhookInstance]

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

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

Return type:

twilio.rest.conversations.v1.conversation.webhook.WebhookPage

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

Streams WebhookInstance 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.conversations.v1.conversation.webhook.WebhookInstance]

class twilio.rest.conversations.v1.conversation.webhook.WebhookPage(version, response, solution)[source]

Bases: twilio.base.page.Page

get_instance(payload)[source]

Build an instance of WebhookInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.conversations.v1.conversation.webhook.WebhookInstance
Return type:twilio.rest.conversations.v1.conversation.webhook.WebhookInstance

Module contents

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

(_)/(_)(_|/| |(/_ v1.0.0 / /
class twilio.rest.conversations.v1.conversation.ConversationContext(version, sid)[source]

Bases: twilio.base.instance_context.InstanceContext

delete(x_twilio_webhook_enabled=<object object>)[source]

Deletes the ConversationInstance

Parameters:x_twilio_webhook_enabled (ConversationInstance.WebhookEnabledType) – The X-Twilio-Webhook-Enabled HTTP request header
Returns:True if delete succeeds, False otherwise
Return type:bool
fetch()[source]

Fetch the ConversationInstance

Returns:The fetched ConversationInstance
Return type:twilio.rest.conversations.v1.conversation.ConversationInstance
messages

Access the messages

Returns:twilio.rest.conversations.v1.conversation.message.MessageList
Return type:twilio.rest.conversations.v1.conversation.message.MessageList
participants

Access the participants

Returns:twilio.rest.conversations.v1.conversation.participant.ParticipantList
Return type:twilio.rest.conversations.v1.conversation.participant.ParticipantList
update(friendly_name=<object object>, date_created=<object object>, date_updated=<object object>, attributes=<object object>, messaging_service_sid=<object object>, state=<object object>, timers_inactive=<object object>, timers_closed=<object object>, unique_name=<object object>, x_twilio_webhook_enabled=<object object>)[source]

Update the ConversationInstance

Parameters:
  • friendly_name (unicode) – The human-readable name of this conversation.
  • date_created (datetime) – The date that this resource was created.
  • date_updated (datetime) – The date that this resource was last updated.
  • attributes (unicode) – An optional string metadata field you can use to store any data you wish.
  • messaging_service_sid (unicode) – The unique ID of the Messaging Service this conversation belongs to.
  • state (ConversationInstance.State) – Current state of this conversation.
  • timers_inactive (unicode) – ISO8601 duration when conversation will be switched to inactive state.
  • timers_closed (unicode) – ISO8601 duration when conversation will be switched to closed state.
  • unique_name (unicode) – An application-defined string that uniquely identifies the resource
  • x_twilio_webhook_enabled (ConversationInstance.WebhookEnabledType) – The X-Twilio-Webhook-Enabled HTTP request header
Returns:

The updated ConversationInstance

Return type:

twilio.rest.conversations.v1.conversation.ConversationInstance

webhooks

Access the webhooks

Returns:twilio.rest.conversations.v1.conversation.webhook.WebhookList
Return type:twilio.rest.conversations.v1.conversation.webhook.WebhookList
class twilio.rest.conversations.v1.conversation.ConversationInstance(version, payload, sid=None)[source]

Bases: twilio.base.instance_resource.InstanceResource

class State[source]

Bases: object

ACTIVE = 'active'
CLOSED = 'closed'
INACTIVE = 'inactive'
class WebhookEnabledType[source]

Bases: object

FALSE = 'false'
TRUE = 'true'
account_sid
Returns:The unique ID of the Account responsible for this conversation.
Return type:unicode
attributes
Returns:An optional string metadata field you can use to store any data you wish.
Return type:unicode
bindings
Returns:The bindings
Return type:dict
chat_service_sid
Returns:The unique ID of the Conversation Service this conversation belongs to.
Return type:unicode
date_created
Returns:The date that this resource was created.
Return type:datetime
date_updated
Returns:The date that this resource was last updated.
Return type:datetime
delete(x_twilio_webhook_enabled=<object object>)[source]

Deletes the ConversationInstance

Parameters:x_twilio_webhook_enabled (ConversationInstance.WebhookEnabledType) – The X-Twilio-Webhook-Enabled HTTP request header
Returns:True if delete succeeds, False otherwise
Return type:bool
fetch()[source]

Fetch the ConversationInstance

Returns:The fetched ConversationInstance
Return type:twilio.rest.conversations.v1.conversation.ConversationInstance
friendly_name
Returns:The human-readable name of this conversation.
Return type:unicode
Returns:Absolute URLs to access the participants, messages and webhooks of this conversation.
Return type:unicode
messages

Access the messages

Returns:twilio.rest.conversations.v1.conversation.message.MessageList
Return type:twilio.rest.conversations.v1.conversation.message.MessageList
messaging_service_sid
Returns:The unique ID of the Messaging Service this conversation belongs to.
Return type:unicode
participants

Access the participants

Returns:twilio.rest.conversations.v1.conversation.participant.ParticipantList
Return type:twilio.rest.conversations.v1.conversation.participant.ParticipantList
sid
Returns:A 34 character string that uniquely identifies this resource.
Return type:unicode
state
Returns:Current state of this conversation.
Return type:ConversationInstance.State
timers
Returns:Timer date values for this conversation.
Return type:dict
unique_name
Returns:An application-defined string that uniquely identifies the resource
Return type:unicode
update(friendly_name=<object object>, date_created=<object object>, date_updated=<object object>, attributes=<object object>, messaging_service_sid=<object object>, state=<object object>, timers_inactive=<object object>, timers_closed=<object object>, unique_name=<object object>, x_twilio_webhook_enabled=<object object>)[source]

Update the ConversationInstance

Parameters:
  • friendly_name (unicode) – The human-readable name of this conversation.
  • date_created (datetime) – The date that this resource was created.
  • date_updated (datetime) – The date that this resource was last updated.
  • attributes (unicode) – An optional string metadata field you can use to store any data you wish.
  • messaging_service_sid (unicode) – The unique ID of the Messaging Service this conversation belongs to.
  • state (ConversationInstance.State) – Current state of this conversation.
  • timers_inactive (unicode) – ISO8601 duration when conversation will be switched to inactive state.
  • timers_closed (unicode) – ISO8601 duration when conversation will be switched to closed state.
  • unique_name (unicode) – An application-defined string that uniquely identifies the resource
  • x_twilio_webhook_enabled (ConversationInstance.WebhookEnabledType) – The X-Twilio-Webhook-Enabled HTTP request header
Returns:

The updated ConversationInstance

Return type:

twilio.rest.conversations.v1.conversation.ConversationInstance

url
Returns:An absolute URL for this conversation.
Return type:unicode
webhooks

Access the webhooks

Returns:twilio.rest.conversations.v1.conversation.webhook.WebhookList
Return type:twilio.rest.conversations.v1.conversation.webhook.WebhookList
class twilio.rest.conversations.v1.conversation.ConversationList(version)[source]

Bases: twilio.base.list_resource.ListResource

create(friendly_name=<object object>, unique_name=<object object>, date_created=<object object>, date_updated=<object object>, messaging_service_sid=<object object>, attributes=<object object>, state=<object object>, timers_inactive=<object object>, timers_closed=<object object>, x_twilio_webhook_enabled=<object object>)[source]

Create the ConversationInstance

Parameters:
  • friendly_name (unicode) – The human-readable name of this conversation.
  • unique_name (unicode) – An application-defined string that uniquely identifies the resource
  • date_created (datetime) – The date that this resource was created.
  • date_updated (datetime) – The date that this resource was last updated.
  • messaging_service_sid (unicode) – The unique ID of the Messaging Service this conversation belongs to.
  • attributes (unicode) – An optional string metadata field you can use to store any data you wish.
  • state (ConversationInstance.State) – Current state of this conversation.
  • timers_inactive (unicode) – ISO8601 duration when conversation will be switched to inactive state.
  • timers_closed (unicode) – ISO8601 duration when conversation will be switched to closed state.
  • x_twilio_webhook_enabled (ConversationInstance.WebhookEnabledType) – The X-Twilio-Webhook-Enabled HTTP request header
Returns:

The created ConversationInstance

Return type:

twilio.rest.conversations.v1.conversation.ConversationInstance

get(sid)[source]

Constructs a ConversationContext

Parameters:sid – A 34 character string that uniquely identifies this resource.
Returns:twilio.rest.conversations.v1.conversation.ConversationContext
Return type:twilio.rest.conversations.v1.conversation.ConversationContext
get_page(target_url)[source]

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

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

Lists ConversationInstance 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.conversations.v1.conversation.ConversationInstance]

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

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

Return type:

twilio.rest.conversations.v1.conversation.ConversationPage

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

Streams ConversationInstance 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.conversations.v1.conversation.ConversationInstance]

class twilio.rest.conversations.v1.conversation.ConversationPage(version, response, solution)[source]

Bases: twilio.base.page.Page

get_instance(payload)[source]

Build an instance of ConversationInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.conversations.v1.conversation.ConversationInstance
Return type:twilio.rest.conversations.v1.conversation.ConversationInstance