twilio.rest.chat.v1 package¶
Subpackages¶
Submodules¶
twilio.rest.chat.v1.credential module¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.chat.v1.credential.
CredentialContext
(version, sid)[source]¶ Bases:
twilio.base.instance_context.InstanceContext
-
delete
()[source]¶ Deletes the CredentialInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch
()[source]¶ Fetch the CredentialInstance
Returns: The fetched CredentialInstance Return type: twilio.rest.chat.v1.credential.CredentialInstance
-
update
(friendly_name=<object object>, certificate=<object object>, private_key=<object object>, sandbox=<object object>, api_key=<object object>, secret=<object object>)[source]¶ Update the CredentialInstance
Parameters: - friendly_name (unicode) – A string to describe the resource
- certificate (unicode) – [APN only] The URL encoded representation of the certificate
- private_key (unicode) – [APN only] The URL encoded representation of the private key
- sandbox (bool) – [APN only] Whether to send the credential to sandbox APNs
- api_key (unicode) – [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential
- secret (unicode) – [FCM only] The Server key of your project from Firebase console
Returns: The updated CredentialInstance
Return type:
-
-
class
twilio.rest.chat.v1.credential.
CredentialInstance
(version, payload, sid=None)[source]¶ Bases:
twilio.base.instance_resource.InstanceResource
-
account_sid
¶ Returns: The SID of the Account that created the resource 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 CredentialInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch
()[source]¶ Fetch the CredentialInstance
Returns: The fetched CredentialInstance Return type: twilio.rest.chat.v1.credential.CredentialInstance
-
friendly_name
¶ Returns: The string that you assigned to describe the resource Return type: unicode
-
sandbox
¶ Returns: [APN only] Whether to send the credential to sandbox APNs Return type: unicode
-
sid
¶ Returns: The unique string that identifies the resource Return type: unicode
-
type
¶ Returns: The type of push-notification service the credential is for Return type: CredentialInstance.PushService
-
update
(friendly_name=<object object>, certificate=<object object>, private_key=<object object>, sandbox=<object object>, api_key=<object object>, secret=<object object>)[source]¶ Update the CredentialInstance
Parameters: - friendly_name (unicode) – A string to describe the resource
- certificate (unicode) – [APN only] The URL encoded representation of the certificate
- private_key (unicode) – [APN only] The URL encoded representation of the private key
- sandbox (bool) – [APN only] Whether to send the credential to sandbox APNs
- api_key (unicode) – [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential
- secret (unicode) – [FCM only] The Server key of your project from Firebase console
Returns: The updated CredentialInstance
Return type:
-
url
¶ Returns: The absolute URL of the Credential resource Return type: unicode
-
-
class
twilio.rest.chat.v1.credential.
CredentialList
(version)[source]¶ Bases:
twilio.base.list_resource.ListResource
-
create
(type, friendly_name=<object object>, certificate=<object object>, private_key=<object object>, sandbox=<object object>, api_key=<object object>, secret=<object object>)[source]¶ Create the CredentialInstance
Parameters: - type (CredentialInstance.PushService) – The type of push-notification service the credential is for
- friendly_name (unicode) – A string to describe the resource
- certificate (unicode) – [APN only] The URL encoded representation of the certificate
- private_key (unicode) – [APN only] The URL encoded representation of the private key
- sandbox (bool) – [APN only] Whether to send the credential to sandbox APNs
- api_key (unicode) – [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential
- secret (unicode) – [FCM only] The Server key of your project from Firebase console
Returns: The created CredentialInstance
Return type:
-
get
(sid)[source]¶ Constructs a CredentialContext
Parameters: sid – The unique string that identifies the resource Returns: twilio.rest.chat.v1.credential.CredentialContext Return type: twilio.rest.chat.v1.credential.CredentialContext
-
get_page
(target_url)[source]¶ Retrieve a specific page of CredentialInstance records from the API. Request is executed immediately
Parameters: target_url (str) – API-generated URL for the requested results page Returns: Page of CredentialInstance Return type: twilio.rest.chat.v1.credential.CredentialPage
-
list
(limit=None, page_size=None)[source]¶ Lists CredentialInstance 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:
-
page
(page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]¶ Retrieve a single page of CredentialInstance records from the API. Request is executed immediately
Parameters: Returns: Page of CredentialInstance
Return type:
-
stream
(limit=None, page_size=None)[source]¶ Streams CredentialInstance 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:
-
-
class
twilio.rest.chat.v1.credential.
CredentialPage
(version, response, solution)[source]¶ Bases:
twilio.base.page.Page
-
get_instance
(payload)[source]¶ Build an instance of CredentialInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.chat.v1.credential.CredentialInstance Return type: twilio.rest.chat.v1.credential.CredentialInstance
-
Module contents¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.chat.v1.
V1
(domain)[source]¶ Bases:
twilio.base.version.Version
-
credentials
¶ Return type: twilio.rest.chat.v1.credential.CredentialList
-
services
¶ Return type: twilio.rest.chat.v1.service.ServiceList
-