twilio.rest.content.v1.content package

Submodules

twilio.rest.content.v1.content.approval_fetch module

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

(_)/(_)(_|/| |(/_ v1.0.0 / /
class twilio.rest.content.v1.content.approval_fetch.ApprovalFetchContext(version, sid)[source]

Bases: twilio.base.instance_context.InstanceContext

PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.

fetch()[source]

Fetch the ApprovalFetchInstance

Returns:The fetched ApprovalFetchInstance
Return type:twilio.rest.content.v1.content.approval_fetch.ApprovalFetchInstance
class twilio.rest.content.v1.content.approval_fetch.ApprovalFetchInstance(version, payload, sid)[source]

Bases: twilio.base.instance_resource.InstanceResource

PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.

account_sid
Returns:The SID of the Account that created the Content resource
Return type:unicode
fetch()[source]

Fetch the ApprovalFetchInstance

Returns:The fetched ApprovalFetchInstance
Return type:twilio.rest.content.v1.content.approval_fetch.ApprovalFetchInstance
sid
Returns:The unique string that identifies the Content resource
Return type:unicode
url
Returns:The URL of the resource, relative to https://content.twilio.com
Return type:unicode
whatsapp
Returns:Contains the whatsapp approval information for the Content resource
Return type:dict
class twilio.rest.content.v1.content.approval_fetch.ApprovalFetchList(version, sid)[source]

Bases: twilio.base.list_resource.ListResource

PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.

get()[source]

Constructs a ApprovalFetchContext

Returns:twilio.rest.content.v1.content.approval_fetch.ApprovalFetchContext
Return type:twilio.rest.content.v1.content.approval_fetch.ApprovalFetchContext
class twilio.rest.content.v1.content.approval_fetch.ApprovalFetchPage(version, response, solution)[source]

Bases: twilio.base.page.Page

PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.

get_instance(payload)[source]

Build an instance of ApprovalFetchInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.content.v1.content.approval_fetch.ApprovalFetchInstance
Return type:twilio.rest.content.v1.content.approval_fetch.ApprovalFetchInstance

Module contents

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

(_)/(_)(_|/| |(/_ v1.0.0 / /
class twilio.rest.content.v1.content.ContentContext(version, sid)[source]

Bases: twilio.base.instance_context.InstanceContext

PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.

approval_fetch

Access the approval_fetch

Returns:twilio.rest.content.v1.content.approval_fetch.ApprovalFetchList
Return type:twilio.rest.content.v1.content.approval_fetch.ApprovalFetchList
delete()[source]

Deletes the ContentInstance

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

Fetch the ContentInstance

Returns:The fetched ContentInstance
Return type:twilio.rest.content.v1.content.ContentInstance
class twilio.rest.content.v1.content.ContentInstance(version, payload, sid=None)[source]

Bases: twilio.base.instance_resource.InstanceResource

PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.

account_sid
Returns:The SID of the Account that created the resource
Return type:unicode
approval_fetch

Access the approval_fetch

Returns:twilio.rest.content.v1.content.approval_fetch.ApprovalFetchList
Return type:twilio.rest.content.v1.content.approval_fetch.ApprovalFetchList
date_created
Returns:The RFC 2822 date and time in GMT that the resource was created
Return type:datetime
date_updated
Returns:The RFC 2822 date and time in GMT that the resource was last updated
Return type:datetime
delete()[source]

Deletes the ContentInstance

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

Fetch the ContentInstance

Returns:The fetched ContentInstance
Return type:twilio.rest.content.v1.content.ContentInstance
friendly_name
Returns:A string name used to describe the Content resource
Return type:unicode
language
Returns:Two-letter language code identifying the language the Content resource is in.
Return type:unicode
Returns:A list of links related to the Content resource
Return type:unicode
sid
Returns:The unique string that identifies the resource
Return type:unicode
types
Returns:The Content types (e.g. twilio/text) for this Content resource
Return type:dict
url
Returns:The URL of the resource, relative to https://content.twilio.com
Return type:unicode
variables
Returns:Defines the default placeholder values for variables included in the Content resource
Return type:dict
class twilio.rest.content.v1.content.ContentList(version)[source]

Bases: twilio.base.list_resource.ListResource

PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.

get(sid)[source]

Constructs a ContentContext

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

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

Parameters:target_url (str) – API-generated URL for the requested results page
Returns:Page of ContentInstance
Return type:twilio.rest.content.v1.content.ContentPage
list(limit=None, page_size=None)[source]

Lists ContentInstance 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.content.v1.content.ContentInstance]

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

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

Return type:

twilio.rest.content.v1.content.ContentPage

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

Streams ContentInstance 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.content.v1.content.ContentInstance]

class twilio.rest.content.v1.content.ContentPage(version, response, solution)[source]

Bases: twilio.base.page.Page

PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.

get_instance(payload)[source]

Build an instance of ContentInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.content.v1.content.ContentInstance
Return type:twilio.rest.content.v1.content.ContentInstance