twilio.rest.conversations.v1.user package¶
Submodules¶
twilio.rest.conversations.v1.user.user_conversation module¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.conversations.v1.user.user_conversation.
UserConversationContext
(version, user_sid, conversation_sid)[source]¶ Bases:
twilio.base.instance_context.InstanceContext
-
delete
()[source]¶ Deletes the UserConversationInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch
()[source]¶ Fetch the UserConversationInstance
Returns: The fetched UserConversationInstance Return type: twilio.rest.conversations.v1.user.user_conversation.UserConversationInstance
-
update
(notification_level=<object object>, last_read_timestamp=<object object>, last_read_message_index=<object object>)[source]¶ Update the UserConversationInstance
Parameters: - notification_level (UserConversationInstance.NotificationLevel) – The Notification Level of this User Conversation.
- last_read_timestamp (datetime) – The date of the last message read in conversation by the user.
- last_read_message_index (unicode) – The index of the last read Message.
Returns: The updated UserConversationInstance
Return type: twilio.rest.conversations.v1.user.user_conversation.UserConversationInstance
-
-
class
twilio.rest.conversations.v1.user.user_conversation.
UserConversationInstance
(version, payload, user_sid, conversation_sid=None)[source]¶ Bases:
twilio.base.instance_resource.InstanceResource
-
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
-
chat_service_sid
¶ Returns: The unique ID of the Conversation Service this conversation belongs to. Return type: unicode
-
conversation_sid
¶ Returns: The unique ID of the Conversation for this User Conversation. Return type: unicode
-
conversation_state
¶ Returns: The current state of this User Conversation Return type: UserConversationInstance.State
-
created_by
¶ Returns: Creator of this conversation. Return type: unicode
-
date_created
¶ Returns: The date that this conversation was created. Return type: datetime
-
date_updated
¶ Returns: The date that this conversation was last updated. Return type: datetime
-
delete
()[source]¶ Deletes the UserConversationInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch
()[source]¶ Fetch the UserConversationInstance
Returns: The fetched UserConversationInstance Return type: twilio.rest.conversations.v1.user.user_conversation.UserConversationInstance
-
friendly_name
¶ Returns: The human-readable name of this conversation. Return type: unicode
-
last_read_message_index
¶ Returns: The index of the last read Message . Return type: unicode
-
links
¶ Returns: Absolute URLs to access the participant and conversation of this user conversation. Return type: unicode
-
notification_level
¶ Returns: The Notification Level of this User Conversation. Return type: UserConversationInstance.NotificationLevel
-
participant_sid
¶ Returns: Participant Sid. Return type: unicode
-
unique_name
¶ Returns: An application-defined string that uniquely identifies the Conversation resource. Return type: unicode
-
unread_messages_count
¶ Returns: The number of unread Messages in the Conversation. Return type: unicode
-
update
(notification_level=<object object>, last_read_timestamp=<object object>, last_read_message_index=<object object>)[source]¶ Update the UserConversationInstance
Parameters: - notification_level (UserConversationInstance.NotificationLevel) – The Notification Level of this User Conversation.
- last_read_timestamp (datetime) – The date of the last message read in conversation by the user.
- last_read_message_index (unicode) – The index of the last read Message.
Returns: The updated UserConversationInstance
Return type: twilio.rest.conversations.v1.user.user_conversation.UserConversationInstance
-
url
¶ Returns: The url Return type: unicode
-
user_sid
¶ Returns: The unique ID for the User. Return type: unicode
-
-
class
twilio.rest.conversations.v1.user.user_conversation.
UserConversationList
(version, user_sid)[source]¶ Bases:
twilio.base.list_resource.ListResource
-
get
(conversation_sid)[source]¶ Constructs a UserConversationContext
Parameters: conversation_sid – The unique SID identifier of the Conversation. Returns: twilio.rest.conversations.v1.user.user_conversation.UserConversationContext Return type: twilio.rest.conversations.v1.user.user_conversation.UserConversationContext
-
get_page
(target_url)[source]¶ Retrieve a specific page of UserConversationInstance records from the API. Request is executed immediately
Parameters: target_url (str) – API-generated URL for the requested results page Returns: Page of UserConversationInstance Return type: twilio.rest.conversations.v1.user.user_conversation.UserConversationPage
-
list
(limit=None, page_size=None)[source]¶ Lists UserConversationInstance 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.user.user_conversation.UserConversationInstance]
-
page
(page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]¶ Retrieve a single page of UserConversationInstance records from the API. Request is executed immediately
Parameters: Returns: Page of UserConversationInstance
Return type: twilio.rest.conversations.v1.user.user_conversation.UserConversationPage
-
stream
(limit=None, page_size=None)[source]¶ Streams UserConversationInstance 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.user.user_conversation.UserConversationInstance]
-
-
class
twilio.rest.conversations.v1.user.user_conversation.
UserConversationPage
(version, response, solution)[source]¶ Bases:
twilio.base.page.Page
-
get_instance
(payload)[source]¶ Build an instance of UserConversationInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.conversations.v1.user.user_conversation.UserConversationInstance Return type: twilio.rest.conversations.v1.user.user_conversation.UserConversationInstance
-
Module contents¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.conversations.v1.user.
UserContext
(version, sid)[source]¶ Bases:
twilio.base.instance_context.InstanceContext
-
delete
(x_twilio_webhook_enabled=<object object>)[source]¶ Deletes the UserInstance
Parameters: x_twilio_webhook_enabled (UserInstance.WebhookEnabledType) – The X-Twilio-Webhook-Enabled HTTP request header Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch
()[source]¶ Fetch the UserInstance
Returns: The fetched UserInstance Return type: twilio.rest.conversations.v1.user.UserInstance
-
update
(friendly_name=<object object>, attributes=<object object>, role_sid=<object object>, x_twilio_webhook_enabled=<object object>)[source]¶ Update the UserInstance
Parameters: - friendly_name (unicode) – The string that you assigned to describe the resource
- attributes (unicode) – The JSON Object string that stores application-specific data
- role_sid (unicode) – The SID of a service-level Role to assign to the user
- x_twilio_webhook_enabled (UserInstance.WebhookEnabledType) – The X-Twilio-Webhook-Enabled HTTP request header
Returns: The updated UserInstance
Return type:
-
user_conversations
¶ Access the user_conversations
Returns: twilio.rest.conversations.v1.user.user_conversation.UserConversationList Return type: twilio.rest.conversations.v1.user.user_conversation.UserConversationList
-
-
class
twilio.rest.conversations.v1.user.
UserInstance
(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
-
attributes
¶ Returns: The JSON Object string that stores application-specific data Return type: unicode
-
chat_service_sid
¶ Returns: The SID of the Conversation Service that the resource is associated with Return type: unicode
-
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
(x_twilio_webhook_enabled=<object object>)[source]¶ Deletes the UserInstance
Parameters: x_twilio_webhook_enabled (UserInstance.WebhookEnabledType) – The X-Twilio-Webhook-Enabled HTTP request header Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch
()[source]¶ Fetch the UserInstance
Returns: The fetched UserInstance Return type: twilio.rest.conversations.v1.user.UserInstance
-
friendly_name
¶ Returns: The string that you assigned to describe the resource Return type: unicode
-
identity
¶ Returns: The string that identifies the resource’s User Return type: unicode
-
is_notifiable
¶ Returns: Whether the User has a potentially valid Push Notification registration for this Conversations Service Return type: bool
-
is_online
¶ Returns: Whether the User is actively connected to this Conversations Service and online Return type: bool
-
links
¶ Returns: The links Return type: unicode
-
role_sid
¶ Returns: The SID of a service-level Role assigned to the user Return type: unicode
-
sid
¶ Returns: The unique string that identifies the resource Return type: unicode
-
update
(friendly_name=<object object>, attributes=<object object>, role_sid=<object object>, x_twilio_webhook_enabled=<object object>)[source]¶ Update the UserInstance
Parameters: - friendly_name (unicode) – The string that you assigned to describe the resource
- attributes (unicode) – The JSON Object string that stores application-specific data
- role_sid (unicode) – The SID of a service-level Role to assign to the user
- x_twilio_webhook_enabled (UserInstance.WebhookEnabledType) – The X-Twilio-Webhook-Enabled HTTP request header
Returns: The updated UserInstance
Return type:
-
url
¶ Returns: An absolute URL for this user. Return type: unicode
-
user_conversations
¶ Access the user_conversations
Returns: twilio.rest.conversations.v1.user.user_conversation.UserConversationList Return type: twilio.rest.conversations.v1.user.user_conversation.UserConversationList
-
-
class
twilio.rest.conversations.v1.user.
UserList
(version)[source]¶ Bases:
twilio.base.list_resource.ListResource
-
create
(identity, friendly_name=<object object>, attributes=<object object>, role_sid=<object object>, x_twilio_webhook_enabled=<object object>)[source]¶ Create the UserInstance
Parameters: - identity (unicode) – The string that identifies the resource’s User
- friendly_name (unicode) – The string that you assigned to describe the resource
- attributes (unicode) – The JSON Object string that stores application-specific data
- role_sid (unicode) – The SID of a service-level Role to assign to the user
- x_twilio_webhook_enabled (UserInstance.WebhookEnabledType) – The X-Twilio-Webhook-Enabled HTTP request header
Returns: The created UserInstance
Return type:
-
get
(sid)[source]¶ Constructs a UserContext
Parameters: sid – The SID of the User resource to fetch Returns: twilio.rest.conversations.v1.user.UserContext Return type: twilio.rest.conversations.v1.user.UserContext
-
get_page
(target_url)[source]¶ Retrieve a specific page of UserInstance records from the API. Request is executed immediately
Parameters: target_url (str) – API-generated URL for the requested results page Returns: Page of UserInstance Return type: twilio.rest.conversations.v1.user.UserPage
-
list
(limit=None, page_size=None)[source]¶ Lists UserInstance 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:
-
page
(page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]¶ Retrieve a single page of UserInstance records from the API. Request is executed immediately
Parameters: Returns: Page of UserInstance
Return type:
-
stream
(limit=None, page_size=None)[source]¶ Streams UserInstance 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:
-
-
class
twilio.rest.conversations.v1.user.
UserPage
(version, response, solution)[source]¶ Bases:
twilio.base.page.Page
-
get_instance
(payload)[source]¶ Build an instance of UserInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.conversations.v1.user.UserInstance Return type: twilio.rest.conversations.v1.user.UserInstance
-