twilio.rest.api.v2010.account.queue package

Submodules

twilio.rest.api.v2010.account.queue.member module

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

(_)/(_)(_|/| |(/_ v1.0.0 / /
class twilio.rest.api.v2010.account.queue.member.MemberContext(version, account_sid, queue_sid, call_sid)[source]

Bases: twilio.base.instance_context.InstanceContext

fetch()[source]

Fetch the MemberInstance

Returns:The fetched MemberInstance
Return type:twilio.rest.api.v2010.account.queue.member.MemberInstance
update(url, method=<object object>)[source]

Update the MemberInstance

Parameters:
  • url (unicode) – The absolute URL of the Queue resource
  • method (unicode) – How to pass the update request data
Returns:

The updated MemberInstance

Return type:

twilio.rest.api.v2010.account.queue.member.MemberInstance

class twilio.rest.api.v2010.account.queue.member.MemberInstance(version, payload, account_sid, queue_sid, call_sid=None)[source]

Bases: twilio.base.instance_resource.InstanceResource

call_sid
Returns:The SID of the Call the resource is associated with
Return type:unicode
date_enqueued
Returns:The date the member was enqueued
Return type:datetime
fetch()[source]

Fetch the MemberInstance

Returns:The fetched MemberInstance
Return type:twilio.rest.api.v2010.account.queue.member.MemberInstance
position
Returns:This member’s current position in the queue.
Return type:unicode
queue_sid
Returns:The SID of the Queue the member is in
Return type:unicode
update(url, method=<object object>)[source]

Update the MemberInstance

Parameters:
  • url (unicode) – The absolute URL of the Queue resource
  • method (unicode) – How to pass the update request data
Returns:

The updated MemberInstance

Return type:

twilio.rest.api.v2010.account.queue.member.MemberInstance

uri
Returns:The URI of the resource, relative to https://api.twilio.com
Return type:unicode
wait_time
Returns:The number of seconds the member has been in the queue.
Return type:unicode
class twilio.rest.api.v2010.account.queue.member.MemberList(version, account_sid, queue_sid)[source]

Bases: twilio.base.list_resource.ListResource

get(call_sid)[source]

Constructs a MemberContext

Parameters:call_sid – The Call SID of the resource(s) to fetch
Returns:twilio.rest.api.v2010.account.queue.member.MemberContext
Return type:twilio.rest.api.v2010.account.queue.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.api.v2010.account.queue.member.MemberPage
list(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:
  • 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.api.v2010.account.queue.member.MemberInstance]

page(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:
  • 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.api.v2010.account.queue.member.MemberPage

stream(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:
  • 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.api.v2010.account.queue.member.MemberInstance]

class twilio.rest.api.v2010.account.queue.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.api.v2010.account.queue.member.MemberInstance
Return type:twilio.rest.api.v2010.account.queue.member.MemberInstance

Module contents

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

(_)/(_)(_|/| |(/_ v1.0.0 / /
class twilio.rest.api.v2010.account.queue.QueueContext(version, account_sid, sid)[source]

Bases: twilio.base.instance_context.InstanceContext

delete()[source]

Deletes the QueueInstance

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

Fetch the QueueInstance

Returns:The fetched QueueInstance
Return type:twilio.rest.api.v2010.account.queue.QueueInstance
members

Access the members

Returns:twilio.rest.api.v2010.account.queue.member.MemberList
Return type:twilio.rest.api.v2010.account.queue.member.MemberList
update(friendly_name=<object object>, max_size=<object object>)[source]

Update the QueueInstance

Parameters:
  • friendly_name (unicode) – A string to describe this resource
  • max_size (unicode) – The max number of calls allowed in the queue
Returns:

The updated QueueInstance

Return type:

twilio.rest.api.v2010.account.queue.QueueInstance

class twilio.rest.api.v2010.account.queue.QueueInstance(version, payload, account_sid, sid=None)[source]

Bases: twilio.base.instance_resource.InstanceResource

account_sid
Returns:The SID of the Account that created this resource
Return type:unicode
average_wait_time
Returns:Average wait time of members in the queue
Return type:unicode
current_size
Returns:The number of calls currently in the queue.
Return type:unicode
date_created
Returns:The RFC 2822 date and time in GMT that this resource was created
Return type:datetime
date_updated
Returns:The RFC 2822 date and time in GMT that this resource was last updated
Return type:datetime
delete()[source]

Deletes the QueueInstance

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

Fetch the QueueInstance

Returns:The fetched QueueInstance
Return type:twilio.rest.api.v2010.account.queue.QueueInstance
friendly_name
Returns:A string that you assigned to describe this resource
Return type:unicode
max_size
Returns:The max number of calls allowed in the queue
Return type:unicode
members

Access the members

Returns:twilio.rest.api.v2010.account.queue.member.MemberList
Return type:twilio.rest.api.v2010.account.queue.member.MemberList
sid
Returns:The unique string that identifies this resource
Return type:unicode
update(friendly_name=<object object>, max_size=<object object>)[source]

Update the QueueInstance

Parameters:
  • friendly_name (unicode) – A string to describe this resource
  • max_size (unicode) – The max number of calls allowed in the queue
Returns:

The updated QueueInstance

Return type:

twilio.rest.api.v2010.account.queue.QueueInstance

uri
Returns:The URI of this resource, relative to https://api.twilio.com
Return type:unicode
class twilio.rest.api.v2010.account.queue.QueueList(version, account_sid)[source]

Bases: twilio.base.list_resource.ListResource

create(friendly_name, max_size=<object object>)[source]

Create the QueueInstance

Parameters:
  • friendly_name (unicode) – A string to describe this resource
  • max_size (unicode) – The max number of calls allowed in the queue
Returns:

The created QueueInstance

Return type:

twilio.rest.api.v2010.account.queue.QueueInstance

get(sid)[source]

Constructs a QueueContext

Parameters:sid – The unique string that identifies this resource
Returns:twilio.rest.api.v2010.account.queue.QueueContext
Return type:twilio.rest.api.v2010.account.queue.QueueContext
get_page(target_url)[source]

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

Parameters:target_url (str) – API-generated URL for the requested results page
Returns:Page of QueueInstance
Return type:twilio.rest.api.v2010.account.queue.QueuePage
list(limit=None, page_size=None)[source]

Lists QueueInstance 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.api.v2010.account.queue.QueueInstance]

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

Retrieve a single page of QueueInstance 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 QueueInstance

Return type:

twilio.rest.api.v2010.account.queue.QueuePage

stream(limit=None, page_size=None)[source]

Streams QueueInstance 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.api.v2010.account.queue.QueueInstance]

class twilio.rest.api.v2010.account.queue.QueuePage(version, response, solution)[source]

Bases: twilio.base.page.Page

get_instance(payload)[source]

Build an instance of QueueInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.api.v2010.account.queue.QueueInstance
Return type:twilio.rest.api.v2010.account.queue.QueueInstance