twilio.rest.ip_messaging.v2.service.user package

Submodules

twilio.rest.ip_messaging.v2.service.user.user_binding module

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

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

System Message: WARNING/2 (/twilio/repos/twilio-python/twilio/rest/ip_messaging/v2/service/user/user_binding.py:docstring of twilio.rest.ip_messaging.v2.service.user.user_binding, line 3); backlink

Inline substitution_reference start-string without end-string.
class twilio.rest.ip_messaging.v2.service.user.user_binding.UserBindingContext(version, service_sid, user_sid, sid)[source]

Bases: twilio.base.instance_context.InstanceContext

delete()[source]

Deletes the UserBindingInstance

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

Fetch the UserBindingInstance

Returns:The fetched UserBindingInstance
Return type:twilio.rest.ip_messaging.v2.service.user.user_binding.UserBindingInstance
class twilio.rest.ip_messaging.v2.service.user.user_binding.UserBindingInstance(version, payload, service_sid, user_sid, sid=None)[source]

Bases: twilio.base.instance_resource.InstanceResource

class BindingType[source]

Bases: object

APN = 'apn'
FCM = 'fcm'
GCM = 'gcm'
account_sid
Returns:The account_sid
Return type:unicode
binding_type
Returns:The binding_type
Return type:UserBindingInstance.BindingType
credential_sid
Returns:The credential_sid
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 UserBindingInstance

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

Fetch the UserBindingInstance

Returns:The fetched UserBindingInstance
Return type:twilio.rest.ip_messaging.v2.service.user.user_binding.UserBindingInstance
identity
Returns:The identity
Return type:unicode
message_types
Returns:The message_types
Return type:list[unicode]
service_sid
Returns:The service_sid
Return type:unicode
sid
Returns:The sid
Return type:unicode
url
Returns:The url
Return type:unicode
user_sid
Returns:The user_sid
Return type:unicode
class twilio.rest.ip_messaging.v2.service.user.user_binding.UserBindingList(version, service_sid, user_sid)[source]

Bases: twilio.base.list_resource.ListResource

get(sid)[source]

Constructs a UserBindingContext

Parameters:sid – The sid
Returns:twilio.rest.ip_messaging.v2.service.user.user_binding.UserBindingContext
Return type:twilio.rest.ip_messaging.v2.service.user.user_binding.UserBindingContext
get_page(target_url)[source]

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

Parameters:target_url (str) – API-generated URL for the requested results page
Returns:Page of UserBindingInstance
Return type:twilio.rest.ip_messaging.v2.service.user.user_binding.UserBindingPage
list(binding_type=<object object>, limit=None, page_size=None)[source]

Lists UserBindingInstance records from the API as a list. Unlike stream(), this operation is eager and will load limit records into memory before returning.

Parameters:
  • binding_type (list[UserBindingInstance.BindingType]) – The binding_type
  • 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.v2.service.user.user_binding.UserBindingInstance]

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

Retrieve a single page of UserBindingInstance records from the API. Request is executed immediately

Parameters:
  • binding_type (list[UserBindingInstance.BindingType]) – The binding_type
  • 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 UserBindingInstance

Return type:

twilio.rest.ip_messaging.v2.service.user.user_binding.UserBindingPage

stream(binding_type=<object object>, limit=None, page_size=None)[source]

Streams UserBindingInstance 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:
  • binding_type (list[UserBindingInstance.BindingType]) – The binding_type
  • 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.v2.service.user.user_binding.UserBindingInstance]

class twilio.rest.ip_messaging.v2.service.user.user_binding.UserBindingPage(version, response, solution)[source]

Bases: twilio.base.page.Page

get_instance(payload)[source]

Build an instance of UserBindingInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.ip_messaging.v2.service.user.user_binding.UserBindingInstance
Return type:twilio.rest.ip_messaging.v2.service.user.user_binding.UserBindingInstance

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

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

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

System Message: WARNING/2 (/twilio/repos/twilio-python/twilio/rest/ip_messaging/v2/service/user/user_channel.py:docstring of twilio.rest.ip_messaging.v2.service.user.user_channel, line 3); backlink

Inline substitution_reference start-string without end-string.
class twilio.rest.ip_messaging.v2.service.user.user_channel.UserChannelContext(version, service_sid, user_sid, channel_sid)[source]

Bases: twilio.base.instance_context.InstanceContext

delete()[source]

Deletes the UserChannelInstance

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

Fetch the UserChannelInstance

Returns:The fetched UserChannelInstance
Return type:twilio.rest.ip_messaging.v2.service.user.user_channel.UserChannelInstance
update(notification_level=<object object>, last_consumed_message_index=<object object>, last_consumption_timestamp=<object object>)[source]

Update the UserChannelInstance

Parameters:
  • notification_level (UserChannelInstance.NotificationLevel) – The notification_level
  • last_consumed_message_index (unicode) – The last_consumed_message_index
  • last_consumption_timestamp (datetime) – The last_consumption_timestamp
Returns:

The updated UserChannelInstance

Return type:

twilio.rest.ip_messaging.v2.service.user.user_channel.UserChannelInstance

class twilio.rest.ip_messaging.v2.service.user.user_channel.UserChannelInstance(version, payload, service_sid, user_sid, channel_sid=None)[source]

Bases: twilio.base.instance_resource.InstanceResource

class ChannelStatus[source]

Bases: object

INVITED = 'invited'
JOINED = 'joined'
NOT_PARTICIPATING = 'not_participating'
class NotificationLevel[source]

Bases: object

DEFAULT = 'default'
MUTED = 'muted'
account_sid
Returns:The account_sid
Return type:unicode
channel_sid
Returns:The channel_sid
Return type:unicode
delete()[source]

Deletes the UserChannelInstance

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

Fetch the UserChannelInstance

Returns:The fetched UserChannelInstance
Return type:twilio.rest.ip_messaging.v2.service.user.user_channel.UserChannelInstance
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
notification_level
Returns:The notification_level
Return type:UserChannelInstance.NotificationLevel
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
update(notification_level=<object object>, last_consumed_message_index=<object object>, last_consumption_timestamp=<object object>)[source]

Update the UserChannelInstance

Parameters:
  • notification_level (UserChannelInstance.NotificationLevel) – The notification_level
  • last_consumed_message_index (unicode) – The last_consumed_message_index
  • last_consumption_timestamp (datetime) – The last_consumption_timestamp
Returns:

The updated UserChannelInstance

Return type:

twilio.rest.ip_messaging.v2.service.user.user_channel.UserChannelInstance

url
Returns:The url
Return type:unicode
user_sid
Returns:The user_sid
Return type:unicode
class twilio.rest.ip_messaging.v2.service.user.user_channel.UserChannelList(version, service_sid, user_sid)[source]

Bases: twilio.base.list_resource.ListResource

get(channel_sid)[source]

Constructs a UserChannelContext

Parameters:channel_sid – The channel_sid
Returns:twilio.rest.ip_messaging.v2.service.user.user_channel.UserChannelContext
Return type:twilio.rest.ip_messaging.v2.service.user.user_channel.UserChannelContext
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.v2.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.v2.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.v2.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.v2.service.user.user_channel.UserChannelInstance]

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

Module contents

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

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

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

Inline substitution_reference start-string without end-string.
class twilio.rest.ip_messaging.v2.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.v2.service.user.UserInstance
update(role_sid=<object object>, attributes=<object object>, friendly_name=<object object>, x_twilio_webhook_enabled=<object object>)[source]

Update the UserInstance

Parameters:
  • role_sid (unicode) – The role_sid
  • attributes (unicode) – The attributes
  • friendly_name (unicode) – The friendly_name
  • x_twilio_webhook_enabled (UserInstance.WebhookEnabledType) – The X-Twilio-Webhook-Enabled HTTP request header
Returns:

The updated UserInstance

Return type:

twilio.rest.ip_messaging.v2.service.user.UserInstance

user_bindings

Access the user_bindings

Returns:twilio.rest.ip_messaging.v2.service.user.user_binding.UserBindingList
Return type:twilio.rest.ip_messaging.v2.service.user.user_binding.UserBindingList
user_channels

Access the user_channels

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

Bases: twilio.base.instance_resource.InstanceResource

class WebhookEnabledType[source]

Bases: object

FALSE = 'false'
TRUE = 'true'
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.v2.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>, x_twilio_webhook_enabled=<object object>)[source]

Update the UserInstance

Parameters:
  • role_sid (unicode) – The role_sid
  • attributes (unicode) – The attributes
  • friendly_name (unicode) – The friendly_name
  • x_twilio_webhook_enabled (UserInstance.WebhookEnabledType) – The X-Twilio-Webhook-Enabled HTTP request header
Returns:

The updated UserInstance

Return type:

twilio.rest.ip_messaging.v2.service.user.UserInstance

url
Returns:The url
Return type:unicode
user_bindings

Access the user_bindings

Returns:twilio.rest.ip_messaging.v2.service.user.user_binding.UserBindingList
Return type:twilio.rest.ip_messaging.v2.service.user.user_binding.UserBindingList
user_channels

Access the user_channels

Returns:twilio.rest.ip_messaging.v2.service.user.user_channel.UserChannelList
Return type:twilio.rest.ip_messaging.v2.service.user.user_channel.UserChannelList
class twilio.rest.ip_messaging.v2.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>, x_twilio_webhook_enabled=<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
  • x_twilio_webhook_enabled (UserInstance.WebhookEnabledType) – The X-Twilio-Webhook-Enabled HTTP request header
Returns:

The created UserInstance

Return type:

twilio.rest.ip_messaging.v2.service.user.UserInstance

get(sid)[source]

Constructs a UserContext

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

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