twilio.rest.ip_messaging.v1.service.user package

Submodules

twilio.rest.ip_messaging.v1.service.user.user_channel module

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

(_)/(_)(_|/| |(/_ v1.0.0 / /
class twilio.rest.ip_messaging.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 account_sid
Return type:unicode
channel_sid
Returns:The channel_sid
Return type:unicode
last_consumed_message_index
Returns:The last_consumed_message_index
Return type:unicode
Returns:The links
Return type:unicode
member_sid
Returns:The member_sid
Return type:unicode
service_sid
Returns:The service_sid
Return type:unicode
status
Returns:The status
Return type:UserChannelInstance.ChannelStatus
unread_messages_count
Returns:The unread_messages_count
Return type:unicode
class twilio.rest.ip_messaging.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.ip_messaging.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.ip_messaging.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:
  • 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 UserChannelInstance

Return type:

twilio.rest.ip_messaging.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.ip_messaging.v1.service.user.user_channel.UserChannelInstance]

class twilio.rest.ip_messaging.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.ip_messaging.v1.service.user.user_channel.UserChannelInstance
Return type:twilio.rest.ip_messaging.v1.service.user.user_channel.UserChannelInstance

Module contents

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

(_)/(_)(_|/| |(/_ v1.0.0 / /
class twilio.rest.ip_messaging.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.ip_messaging.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 role_sid
  • attributes (unicode) – The attributes
  • friendly_name (unicode) – The friendly_name
Returns:

The updated UserInstance

Return type:

twilio.rest.ip_messaging.v1.service.user.UserInstance

user_channels

Access the user_channels

Returns:twilio.rest.ip_messaging.v1.service.user.user_channel.UserChannelList
Return type:twilio.rest.ip_messaging.v1.service.user.user_channel.UserChannelList
class twilio.rest.ip_messaging.v1.service.user.UserInstance(version, payload, service_sid, sid=None)[source]

Bases: twilio.base.instance_resource.InstanceResource

account_sid
Returns:The account_sid
Return type:unicode
attributes
Returns:The attributes
Return type:unicode
date_created
Returns:The date_created
Return type:datetime
date_updated
Returns:The date_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.ip_messaging.v1.service.user.UserInstance
friendly_name
Returns:The friendly_name
Return type:unicode
identity
Returns:The identity
Return type:unicode
is_notifiable
Returns:The is_notifiable
Return type:bool
is_online
Returns:The is_online
Return type:bool
joined_channels_count
Returns:The joined_channels_count
Return type:unicode
Returns:The links
Return type:unicode
role_sid
Returns:The role_sid
Return type:unicode
service_sid
Returns:The service_sid
Return type:unicode
sid
Returns:The sid
Return type:unicode
update(role_sid=<object object>, attributes=<object object>, friendly_name=<object object>)[source]

Update the UserInstance

Parameters:
  • role_sid (unicode) – The role_sid
  • attributes (unicode) – The attributes
  • friendly_name (unicode) – The friendly_name
Returns:

The updated UserInstance

Return type:

twilio.rest.ip_messaging.v1.service.user.UserInstance

url
Returns:The url
Return type:unicode
user_channels

Access the user_channels

Returns:twilio.rest.ip_messaging.v1.service.user.user_channel.UserChannelList
Return type:twilio.rest.ip_messaging.v1.service.user.user_channel.UserChannelList
class twilio.rest.ip_messaging.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
  • role_sid (unicode) – The role_sid
  • attributes (unicode) – The attributes
  • friendly_name (unicode) – The friendly_name
Returns:

The created UserInstance

Return type:

twilio.rest.ip_messaging.v1.service.user.UserInstance

get(sid)[source]

Constructs a UserContext

Parameters:sid – The sid
Returns:twilio.rest.ip_messaging.v1.service.user.UserContext
Return type:twilio.rest.ip_messaging.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.ip_messaging.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:

list[twilio.rest.ip_messaging.v1.service.user.UserInstance]

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:
  • 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 UserInstance

Return type:

twilio.rest.ip_messaging.v1.service.user.UserPage

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:

list[twilio.rest.ip_messaging.v1.service.user.UserInstance]

class twilio.rest.ip_messaging.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.ip_messaging.v1.service.user.UserInstance
Return type:twilio.rest.ip_messaging.v1.service.user.UserInstance