twilio.rest.chat.v1.service.channel package

Submodules

twilio.rest.chat.v1.service.channel.invite module

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

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

System Message: WARNING/2 (/twilio/repos/twilio-python/twilio/rest/chat/v1/service/channel/invite.py:docstring of twilio.rest.chat.v1.service.channel.invite, line 3); backlink

Inline substitution_reference start-string without end-string.
class twilio.rest.chat.v1.service.channel.invite.InviteContext(version, service_sid, channel_sid, sid)[source]

Bases: twilio.base.instance_context.InstanceContext

delete()[source]

Deletes the InviteInstance

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

Fetch the InviteInstance

Returns:The fetched InviteInstance
Return type:twilio.rest.chat.v1.service.channel.invite.InviteInstance
class twilio.rest.chat.v1.service.channel.invite.InviteInstance(version, payload, service_sid, channel_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
channel_sid
Returns:The SID of the Channel the new resource belongs to
Return type:unicode
created_by
Returns:The identity of the User that created the invite
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 InviteInstance

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

Fetch the InviteInstance

Returns:The fetched InviteInstance
Return type:twilio.rest.chat.v1.service.channel.invite.InviteInstance
identity
Returns:The string that identifies the resource’s User
Return type:unicode
role_sid
Returns:The SID of the Role assigned to the member
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
url
Returns:The absolute URL of the Invite resource
Return type:unicode
class twilio.rest.chat.v1.service.channel.invite.InviteList(version, service_sid, channel_sid)[source]

Bases: twilio.base.list_resource.ListResource

create(identity, role_sid=<object object>)[source]

Create the InviteInstance

Parameters:
  • identity (unicode) – The identity value that identifies the new resource’s User
  • role_sid (unicode) – The Role assigned to the new member
Returns:

The created InviteInstance

Return type:

twilio.rest.chat.v1.service.channel.invite.InviteInstance

get(sid)[source]

Constructs a InviteContext

Parameters:sid – The unique string that identifies the resource
Returns:twilio.rest.chat.v1.service.channel.invite.InviteContext
Return type:twilio.rest.chat.v1.service.channel.invite.InviteContext
get_page(target_url)[source]

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

Parameters:target_url (str) – API-generated URL for the requested results page
Returns:Page of InviteInstance
Return type:twilio.rest.chat.v1.service.channel.invite.InvitePage
list(identity=<object object>, limit=None, page_size=None)[source]

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

Parameters:
  • identity (list[unicode]) – The identity value of the resources to read
  • 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.channel.invite.InviteInstance]

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

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

Parameters:
  • identity (list[unicode]) – The identity value of the resources to read
  • 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 InviteInstance

Return type:

twilio.rest.chat.v1.service.channel.invite.InvitePage

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

Streams InviteInstance 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:
  • identity (list[unicode]) – The identity value of the resources to read
  • 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.channel.invite.InviteInstance]

class twilio.rest.chat.v1.service.channel.invite.InvitePage(version, response, solution)[source]

Bases: twilio.base.page.Page

get_instance(payload)[source]

Build an instance of InviteInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.chat.v1.service.channel.invite.InviteInstance
Return type:twilio.rest.chat.v1.service.channel.invite.InviteInstance

twilio.rest.chat.v1.service.channel.member module

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

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

System Message: WARNING/2 (/twilio/repos/twilio-python/twilio/rest/chat/v1/service/channel/member.py:docstring of twilio.rest.chat.v1.service.channel.member, line 3); backlink

Inline substitution_reference start-string without end-string.
class twilio.rest.chat.v1.service.channel.member.MemberContext(version, service_sid, channel_sid, sid)[source]

Bases: twilio.base.instance_context.InstanceContext

delete()[source]

Deletes the MemberInstance

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

Fetch the MemberInstance

Returns:The fetched MemberInstance
Return type:twilio.rest.chat.v1.service.channel.member.MemberInstance
update(role_sid=<object object>, last_consumed_message_index=<object object>)[source]

Update the MemberInstance

Parameters:
  • role_sid (unicode) – The SID of the Role to assign to the member
  • last_consumed_message_index (unicode) – The index of the last consumed Message for the Channel for the Member
Returns:

The updated MemberInstance

Return type:

twilio.rest.chat.v1.service.channel.member.MemberInstance

class twilio.rest.chat.v1.service.channel.member.MemberInstance(version, payload, service_sid, channel_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
channel_sid
Returns:The unique ID of the Channel for the member
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 MemberInstance

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

Fetch the MemberInstance

Returns:The fetched MemberInstance
Return type:twilio.rest.chat.v1.service.channel.member.MemberInstance
identity
Returns:The string that identifies the resource’s User
Return type:unicode
last_consumed_message_index
Returns:The index of the last Message that the Member has read within the Channel
Return type:unicode
last_consumption_timestamp
Returns:The ISO 8601 based timestamp string that represents the date-time of the last Message read event for the Member within the Channel
Return type:datetime
role_sid
Returns:The SID of the Role assigned to the member
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>, last_consumed_message_index=<object object>)[source]

Update the MemberInstance

Parameters:
  • role_sid (unicode) – The SID of the Role to assign to the member
  • last_consumed_message_index (unicode) – The index of the last consumed Message for the Channel for the Member
Returns:

The updated MemberInstance

Return type:

twilio.rest.chat.v1.service.channel.member.MemberInstance

url
Returns:The absolute URL of the Member resource
Return type:unicode
class twilio.rest.chat.v1.service.channel.member.MemberList(version, service_sid, channel_sid)[source]

Bases: twilio.base.list_resource.ListResource

create(identity, role_sid=<object object>)[source]

Create the MemberInstance

Parameters:
  • identity (unicode) – The identity value that identifies the new resource’s User
  • role_sid (unicode) – The SID of the Role to assign to the member
Returns:

The created MemberInstance

Return type:

twilio.rest.chat.v1.service.channel.member.MemberInstance

get(sid)[source]

Constructs a MemberContext

Parameters:sid – The unique string that identifies the resource
Returns:twilio.rest.chat.v1.service.channel.member.MemberContext
Return type:twilio.rest.chat.v1.service.channel.member.MemberContext
get_page(target_url)[source]

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

Parameters:target_url (str) – API-generated URL for the requested results page
Returns:Page of MemberInstance
Return type:twilio.rest.chat.v1.service.channel.member.MemberPage
list(identity=<object object>, limit=None, page_size=None)[source]

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

Parameters:
  • identity (list[unicode]) – The identity value of the resources to read
  • 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.channel.member.MemberInstance]

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

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

Parameters:
  • identity (list[unicode]) – The identity value of the resources to read
  • 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 MemberInstance

Return type:

twilio.rest.chat.v1.service.channel.member.MemberPage

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

Streams MemberInstance 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:
  • identity (list[unicode]) – The identity value of the resources to read
  • 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.channel.member.MemberInstance]

class twilio.rest.chat.v1.service.channel.member.MemberPage(version, response, solution)[source]

Bases: twilio.base.page.Page

get_instance(payload)[source]

Build an instance of MemberInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.chat.v1.service.channel.member.MemberInstance
Return type:twilio.rest.chat.v1.service.channel.member.MemberInstance

twilio.rest.chat.v1.service.channel.message module

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

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

System Message: WARNING/2 (/twilio/repos/twilio-python/twilio/rest/chat/v1/service/channel/message.py:docstring of twilio.rest.chat.v1.service.channel.message, line 3); backlink

Inline substitution_reference start-string without end-string.
class twilio.rest.chat.v1.service.channel.message.MessageContext(version, service_sid, channel_sid, sid)[source]

Bases: twilio.base.instance_context.InstanceContext

delete()[source]

Deletes the MessageInstance

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

Fetch the MessageInstance

Returns:The fetched MessageInstance
Return type:twilio.rest.chat.v1.service.channel.message.MessageInstance
update(body=<object object>, attributes=<object object>)[source]

Update the MessageInstance

Parameters:
  • body (unicode) – The message to send to the channel
  • attributes (unicode) – A valid JSON string that contains application-specific data
Returns:

The updated MessageInstance

Return type:

twilio.rest.chat.v1.service.channel.message.MessageInstance

class twilio.rest.chat.v1.service.channel.message.MessageInstance(version, payload, service_sid, channel_sid, sid=None)[source]

Bases: twilio.base.instance_resource.InstanceResource

class OrderType[source]

Bases: object

ASC = 'asc'
DESC = 'desc'
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
body
Returns:The content of the message
Return type:unicode
channel_sid
Returns:The unique ID of the Channel the Message resource belongs to
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 MessageInstance

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

Fetch the MessageInstance

Returns:The fetched MessageInstance
Return type:twilio.rest.chat.v1.service.channel.message.MessageInstance
from_
Returns:The identity of the message’s author
Return type:unicode
index
Returns:The index of the message within the Channel
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
to
Returns:The SID of the Channel that the message was sent to
Return type:unicode
update(body=<object object>, attributes=<object object>)[source]

Update the MessageInstance

Parameters:
  • body (unicode) – The message to send to the channel
  • attributes (unicode) – A valid JSON string that contains application-specific data
Returns:

The updated MessageInstance

Return type:

twilio.rest.chat.v1.service.channel.message.MessageInstance

url
Returns:The absolute URL of the Message resource
Return type:unicode
was_edited
Returns:Whether the message has been edited since it was created
Return type:bool
class twilio.rest.chat.v1.service.channel.message.MessageList(version, service_sid, channel_sid)[source]

Bases: twilio.base.list_resource.ListResource

create(body, from_=<object object>, attributes=<object object>)[source]

Create the MessageInstance

Parameters:
  • body (unicode) – The message to send to the channel
  • from (unicode) – The identity of the new message’s author
  • attributes (unicode) – A valid JSON string that contains application-specific data
Returns:

The created MessageInstance

Return type:

twilio.rest.chat.v1.service.channel.message.MessageInstance

get(sid)[source]

Constructs a MessageContext

Parameters:sid – The unique string that identifies the resource
Returns:twilio.rest.chat.v1.service.channel.message.MessageContext
Return type:twilio.rest.chat.v1.service.channel.message.MessageContext
get_page(target_url)[source]

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

Parameters:target_url (str) – API-generated URL for the requested results page
Returns:Page of MessageInstance
Return type:twilio.rest.chat.v1.service.channel.message.MessagePage
list(order=<object object>, limit=None, page_size=None)[source]

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

Parameters:
  • order (MessageInstance.OrderType) – The sort order of the returned messages
  • 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.channel.message.MessageInstance]

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

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

Parameters:
  • order (MessageInstance.OrderType) – The sort order of the returned messages
  • 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 MessageInstance

Return type:

twilio.rest.chat.v1.service.channel.message.MessagePage

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

Streams MessageInstance 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:
  • order (MessageInstance.OrderType) – The sort order of the returned messages
  • 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.channel.message.MessageInstance]

class twilio.rest.chat.v1.service.channel.message.MessagePage(version, response, solution)[source]

Bases: twilio.base.page.Page

get_instance(payload)[source]

Build an instance of MessageInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.chat.v1.service.channel.message.MessageInstance
Return type:twilio.rest.chat.v1.service.channel.message.MessageInstance

Module contents

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

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

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

Inline substitution_reference start-string without end-string.
class twilio.rest.chat.v1.service.channel.ChannelContext(version, service_sid, sid)[source]

Bases: twilio.base.instance_context.InstanceContext

delete()[source]

Deletes the ChannelInstance

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

Fetch the ChannelInstance

Returns:The fetched ChannelInstance
Return type:twilio.rest.chat.v1.service.channel.ChannelInstance
invites

Access the invites

Returns:twilio.rest.chat.v1.service.channel.invite.InviteList
Return type:twilio.rest.chat.v1.service.channel.invite.InviteList
members

Access the members

Returns:twilio.rest.chat.v1.service.channel.member.MemberList
Return type:twilio.rest.chat.v1.service.channel.member.MemberList
messages

Access the messages

Returns:twilio.rest.chat.v1.service.channel.message.MessageList
Return type:twilio.rest.chat.v1.service.channel.message.MessageList
update(friendly_name=<object object>, unique_name=<object object>, attributes=<object object>)[source]

Update the ChannelInstance

Parameters:
  • friendly_name (unicode) – A string to describe the resource
  • unique_name (unicode) – An application-defined string that uniquely identifies the resource
  • attributes (unicode) – A valid JSON string that contains application-specific data
Returns:

The updated ChannelInstance

Return type:

twilio.rest.chat.v1.service.channel.ChannelInstance

class twilio.rest.chat.v1.service.channel.ChannelInstance(version, payload, service_sid, sid=None)[source]

Bases: twilio.base.instance_resource.InstanceResource

class ChannelType[source]

Bases: object

PRIVATE = 'private'
PUBLIC = 'public'
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
created_by
Returns:The identity of the User that created the channel
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 ChannelInstance

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

Fetch the ChannelInstance

Returns:The fetched ChannelInstance
Return type:twilio.rest.chat.v1.service.channel.ChannelInstance
friendly_name
Returns:The string that you assigned to describe the resource
Return type:unicode
invites

Access the invites

Returns:twilio.rest.chat.v1.service.channel.invite.InviteList
Return type:twilio.rest.chat.v1.service.channel.invite.InviteList
Returns:Absolute URLs to access the Members, Messages , Invites and, if it exists, the last Message for the Channel
Return type:unicode
members

Access the members

Returns:twilio.rest.chat.v1.service.channel.member.MemberList
Return type:twilio.rest.chat.v1.service.channel.member.MemberList
members_count
Returns:The number of Members in the Channel
Return type:unicode
messages

Access the messages

Returns:twilio.rest.chat.v1.service.channel.message.MessageList
Return type:twilio.rest.chat.v1.service.channel.message.MessageList
messages_count
Returns:The number of Messages in the Channel
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
type
Returns:The visibility of the channel. Can be: public or private
Return type:ChannelInstance.ChannelType
unique_name
Returns:An application-defined string that uniquely identifies the resource
Return type:unicode
update(friendly_name=<object object>, unique_name=<object object>, attributes=<object object>)[source]

Update the ChannelInstance

Parameters:
  • friendly_name (unicode) – A string to describe the resource
  • unique_name (unicode) – An application-defined string that uniquely identifies the resource
  • attributes (unicode) – A valid JSON string that contains application-specific data
Returns:

The updated ChannelInstance

Return type:

twilio.rest.chat.v1.service.channel.ChannelInstance

url
Returns:The absolute URL of the Channel resource
Return type:unicode
class twilio.rest.chat.v1.service.channel.ChannelList(version, service_sid)[source]

Bases: twilio.base.list_resource.ListResource

create(friendly_name=<object object>, unique_name=<object object>, attributes=<object object>, type=<object object>)[source]

Create the ChannelInstance

Parameters:
  • friendly_name (unicode) – A string to describe the new resource
  • unique_name (unicode) – An application-defined string that uniquely identifies the resource
  • attributes (unicode) – A valid JSON string that contains application-specific data
  • type (ChannelInstance.ChannelType) – The visibility of the channel
Returns:

The created ChannelInstance

Return type:

twilio.rest.chat.v1.service.channel.ChannelInstance

get(sid)[source]

Constructs a ChannelContext

Parameters:sid – The unique string that identifies the resource
Returns:twilio.rest.chat.v1.service.channel.ChannelContext
Return type:twilio.rest.chat.v1.service.channel.ChannelContext
get_page(target_url)[source]

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

Parameters:target_url (str) – API-generated URL for the requested results page
Returns:Page of ChannelInstance
Return type:twilio.rest.chat.v1.service.channel.ChannelPage
list(type=<object object>, limit=None, page_size=None)[source]

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

Parameters:
  • type (list[ChannelInstance.ChannelType]) – The visibility of the channel to read
  • 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.channel.ChannelInstance]

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

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

Parameters:
  • type (list[ChannelInstance.ChannelType]) – The visibility of the channel to read
  • 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 ChannelInstance

Return type:

twilio.rest.chat.v1.service.channel.ChannelPage

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

Streams ChannelInstance 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:
  • type (list[ChannelInstance.ChannelType]) – The visibility of the channel to read
  • 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.channel.ChannelInstance]

class twilio.rest.chat.v1.service.channel.ChannelPage(version, response, solution)[source]

Bases: twilio.base.page.Page

get_instance(payload)[source]

Build an instance of ChannelInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.chat.v1.service.channel.ChannelInstance
Return type:twilio.rest.chat.v1.service.channel.ChannelInstance