twilio.rest.chat.v1.service.user package¶
Submodules¶
twilio.rest.chat.v1.service.user.user_channel module¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.chat.v1.service.user.user_channel.
UserChannelInstance
(version, payload, service_sid, user_sid)[source]¶ Bases:
twilio.base.instance_resource.InstanceResource
-
class
ChannelStatus
[source]¶ Bases:
object
-
INVITED
= 'invited'¶
-
JOINED
= 'joined'¶
-
NOT_PARTICIPATING
= 'not_participating'¶
-
-
account_sid
¶ Returns: The SID of the Account that created the resource Return type: unicode
-
channel_sid
¶ Returns: The SID of the Channel the resource belongs to Return type: unicode
-
last_consumed_message_index
¶ Returns: The index of the last Message in the Channel the Member has read Return type: unicode
-
links
¶ Returns: Absolute URLs to access the Members, Messages , Invites and, if it exists, the last Message for the Channel Return type: unicode
-
member_sid
¶ Returns: The SID of the User as a Member in the Channel Return type: unicode
-
service_sid
¶ Returns: The SID of the Service that the resource is associated with Return type: unicode
-
status
¶ Returns: The status of the User on the Channel Return type: UserChannelInstance.ChannelStatus
-
unread_messages_count
¶ Returns: The number of unread Messages in the Channel for the User Return type: unicode
-
class
-
class
twilio.rest.chat.v1.service.user.user_channel.
UserChannelList
(version, service_sid, user_sid)[source]¶ Bases:
twilio.base.list_resource.ListResource
-
get_page
(target_url)[source]¶ Retrieve a specific page of UserChannelInstance records from the API. Request is executed immediately
Parameters: target_url (str) – API-generated URL for the requested results page Returns: Page of UserChannelInstance Return type: twilio.rest.chat.v1.service.user.user_channel.UserChannelPage
-
list
(limit=None, page_size=None)[source]¶ Lists UserChannelInstance 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.user.user_channel.UserChannelInstance]
-
page
(page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]¶ Retrieve a single page of UserChannelInstance records from the API. Request is executed immediately
Parameters: Returns: Page of UserChannelInstance
Return type: twilio.rest.chat.v1.service.user.user_channel.UserChannelPage
-
stream
(limit=None, page_size=None)[source]¶ Streams UserChannelInstance 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.user.user_channel.UserChannelInstance]
-
-
class
twilio.rest.chat.v1.service.user.user_channel.
UserChannelPage
(version, response, solution)[source]¶ Bases:
twilio.base.page.Page
-
get_instance
(payload)[source]¶ Build an instance of UserChannelInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.chat.v1.service.user.user_channel.UserChannelInstance Return type: twilio.rest.chat.v1.service.user.user_channel.UserChannelInstance
-
Module contents¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.chat.v1.service.user.
UserContext
(version, service_sid, sid)[source]¶ Bases:
twilio.base.instance_context.InstanceContext
-
delete
()[source]¶ Deletes the UserInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch
()[source]¶ Fetch the UserInstance
Returns: The fetched UserInstance Return type: twilio.rest.chat.v1.service.user.UserInstance
-
update
(role_sid=<object object>, attributes=<object object>, friendly_name=<object object>)[source]¶ Update the UserInstance
Parameters: - role_sid (unicode) – The SID id of the Role assigned to this user
- attributes (unicode) – A valid JSON string that contains application-specific data
- friendly_name (unicode) – A string to describe the resource
Returns: The updated UserInstance
Return type:
-
user_channels
¶ Access the user_channels
Returns: twilio.rest.chat.v1.service.user.user_channel.UserChannelList Return type: twilio.rest.chat.v1.service.user.user_channel.UserChannelList
-
-
class
twilio.rest.chat.v1.service.user.
UserInstance
(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
-
attributes
¶ Returns: The JSON string that stores application-specific data 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 UserInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch
()[source]¶ Fetch the UserInstance
Returns: The fetched UserInstance Return type: twilio.rest.chat.v1.service.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 the Service instance Return type: bool
-
is_online
¶ Returns: Whether the User is actively connected to the Service instance and online Return type: bool
-
joined_channels_count
¶ Returns: The number of Channels this User is a Member of Return type: unicode
-
links
¶ Returns: The absolute URLs of the Channel and Binding resources related to the user Return type: unicode
-
role_sid
¶ Returns: The SID of the assigned to the user Return type: 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
-
update
(role_sid=<object object>, attributes=<object object>, friendly_name=<object object>)[source]¶ Update the UserInstance
Parameters: - role_sid (unicode) – The SID id of the Role assigned to this user
- attributes (unicode) – A valid JSON string that contains application-specific data
- friendly_name (unicode) – A string to describe the resource
Returns: The updated UserInstance
Return type:
-
url
¶ Returns: The absolute URL of the User resource Return type: unicode
-
user_channels
¶ Access the user_channels
Returns: twilio.rest.chat.v1.service.user.user_channel.UserChannelList Return type: twilio.rest.chat.v1.service.user.user_channel.UserChannelList
-
-
class
twilio.rest.chat.v1.service.user.
UserList
(version, service_sid)[source]¶ Bases:
twilio.base.list_resource.ListResource
-
create
(identity, role_sid=<object object>, attributes=<object object>, friendly_name=<object object>)[source]¶ Create the UserInstance
Parameters: - identity (unicode) – The identity value that identifies the new resource’s User
- role_sid (unicode) – The SID of the Role assigned to this user
- attributes (unicode) – A valid JSON string that contains application-specific data
- friendly_name (unicode) – A string to describe the new resource
Returns: The created UserInstance
Return type:
-
get
(sid)[source]¶ Constructs a UserContext
Parameters: sid – The unique string that identifies the resource Returns: twilio.rest.chat.v1.service.user.UserContext Return type: twilio.rest.chat.v1.service.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.chat.v1.service.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.chat.v1.service.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.chat.v1.service.user.UserInstance Return type: twilio.rest.chat.v1.service.user.UserInstance
-