Source code for twilio.base.domain
[docs]class Domain(object):
- """
+ """
This represents at Twilio API subdomain.
Like, `api.twilio.com` or `lookups.twilio.com'.
"""
def __init__(self, twilio):
- """
+ """
:param Twilio twilio:
:return:
"""
@@ -44,7 +44,7 @@ Source code for twilio.base.domain
self.base_url = None
[docs] def absolute_url(self, uri):
- """
+ """
Converts a relative `uri` to an absolute url.
:param string uri: The relative uri to make absolute.
:return: An absolute url (based off this domain)
@@ -53,7 +53,7 @@ Source code for twilio.base.domain
[docs] def request(self, method, uri, params=None, data=None, headers=None,
auth=None, timeout=None, allow_redirects=False):
- """
+ """
Makes an HTTP request to this domain.
:param string method: The HTTP method.
:param string uri: The HTTP uri.
diff --git a/docs/build/html/_modules/twilio/base/exceptions.html b/docs/build/html/_modules/twilio/base/exceptions.html
index 374c402eb6..677973cafa 100644
--- a/docs/build/html/_modules/twilio/base/exceptions.html
+++ b/docs/build/html/_modules/twilio/base/exceptions.html
@@ -10,7 +10,7 @@
})(window,document,'script','dataLayer','GTM-MWRD6S');
-twilio.base.exceptions — twilio-python 7.16.0 documentation
+twilio.base.exceptions — twilio-python 7.16.1 documentation
@@ -37,7 +37,7 @@ Source code for twilio.base.exceptions
[docs]class TwilioRestException(TwilioException):
- """ A generic 400 or 500 level exception from the Twilio API
+ """ A generic 400 or 500 level exception from the Twilio API
:param int status: the HTTP status that was returned for the exception
:param str uri: The URI that caused the exception
@@ -57,7 +57,7 @@ Source code for twilio.base.exceptions
self.details = details
def __str__(self):
- """ Try to pretty-print the exception, if this is going on screen. """
+ """ Try to pretty-print the exception, if this is going on screen. """
def red(words):
return "\033[31m\033[49m%s\033[0m" % words
diff --git a/docs/build/html/_modules/twilio/base/instance_context.html b/docs/build/html/_modules/twilio/base/instance_context.html
index babf217888..3f05ea2350 100644
--- a/docs/build/html/_modules/twilio/base/instance_context.html
+++ b/docs/build/html/_modules/twilio/base/instance_context.html
@@ -10,7 +10,7 @@
})(window,document,'script','dataLayer','GTM-MWRD6S');
-twilio.base.instance_context — twilio-python 7.16.0 documentation
+twilio.base.instance_context — twilio-python 7.16.1 documentation
@@ -30,11 +30,11 @@
Source code for twilio.base.instance_context
[docs]class InstanceContext(object):
def __init__(self, version):
- """
+ """
:param Version version:
"""
self._version = version
- """ :type: Version """
+ """ :type: Version """
diff --git a/docs/build/html/_modules/twilio/base/instance_resource.html b/docs/build/html/_modules/twilio/base/instance_resource.html
index 8afd694ccf..22b5c12861 100644
--- a/docs/build/html/_modules/twilio/base/instance_resource.html
+++ b/docs/build/html/_modules/twilio/base/instance_resource.html
@@ -10,7 +10,7 @@
})(window,document,'script','dataLayer','GTM-MWRD6S');
-twilio.base.instance_resource — twilio-python 7.16.0 documentation
+twilio.base.instance_resource — twilio-python 7.16.1 documentation
@@ -30,11 +30,11 @@
Source code for twilio.base.instance_resource
[docs]class InstanceResource(object):
def __init__(self, version):
- """
+ """
:param Version version:
"""
self._version = version
- """ :type: Version """
+ """ :type: Version """
diff --git a/docs/build/html/_modules/twilio/base/list_resource.html b/docs/build/html/_modules/twilio/base/list_resource.html
index 7ce7f1bd2a..156ad8c6c0 100644
--- a/docs/build/html/_modules/twilio/base/list_resource.html
+++ b/docs/build/html/_modules/twilio/base/list_resource.html
@@ -10,7 +10,7 @@
})(window,document,'script','dataLayer','GTM-MWRD6S');
-twilio.base.list_resource — twilio-python 7.16.0 documentation
+twilio.base.list_resource — twilio-python 7.16.1 documentation
@@ -30,11 +30,11 @@
Source code for twilio.base.list_resource
[docs]class ListResource(object):
def __init__(self, version):
- """
+ """
:param Version version:
"""
self._version = version
- """ :type: Version """
+ """ :type: Version """
diff --git a/docs/build/html/_modules/twilio/base/obsolete.html b/docs/build/html/_modules/twilio/base/obsolete.html
index 8b87bcbd3f..b7c9508dbd 100644
--- a/docs/build/html/_modules/twilio/base/obsolete.html
+++ b/docs/build/html/_modules/twilio/base/obsolete.html
@@ -10,7 +10,7 @@
})(window,document,'script','dataLayer','GTM-MWRD6S');
-twilio.base.obsolete — twilio-python 7.16.0 documentation
+twilio.base.obsolete — twilio-python 7.16.1 documentation
@@ -33,12 +33,12 @@ Source code for twilio.base.obsolete
[docs]class ObsoleteException(Exception):
- """ Base class for warnings about obsolete features. """
+ """ Base class for warnings about obsolete features. """
pass
[docs]def obsolete_client(func):
- """This is a decorator which can be used to mark Client classes as
+ """This is a decorator which can be used to mark Client classes as
obsolete. It will result in an error being emitted when the class is
instantiated."""
@@ -54,7 +54,7 @@ Source code for twilio.base.obsolete
[docs]def deprecated_method(new_func=None):
- """
+ """
This is a decorator which can be used to mark deprecated methods.
It will report in a DeprecationWarning being emitted to stderr when the deprecated method is used.
"""
diff --git a/docs/build/html/_modules/twilio/base/page.html b/docs/build/html/_modules/twilio/base/page.html
index b8d8183c98..ce722c3899 100644
--- a/docs/build/html/_modules/twilio/base/page.html
+++ b/docs/build/html/_modules/twilio/base/page.html
@@ -10,7 +10,7 @@
})(window,document,'script','dataLayer','GTM-MWRD6S');
-twilio.base.page — twilio-python 7.16.0 documentation
+twilio.base.page — twilio-python 7.16.1 documentation
@@ -34,7 +34,7 @@ Source code for twilio.base.page
[docs]class Page(object):
- """
+ """
Represents a page of records in a collection.
A `Page` lets you iterate over its records and fetch the next and previous
@@ -63,7 +63,7 @@ Source code for twilio.base.page
self._records = iter(self.load_page(payload))
def __iter__(self):
- """
+ """
A `Page` is a valid iterator.
"""
return self
@@ -72,14 +72,14 @@ Source code for twilio.base.page
return self.next()
[docs] def next(self):
- """
+ """
Returns the next record in the `Page`.
"""
return self.get_instance(next(self._records))
[docs] @classmethod
def process_response(cls, response):
- """
+ """
Load a JSON response.
:param Response response: The HTTP response.
@@ -91,7 +91,7 @@ Source code for twilio.base.page
return json.loads(response.text)
[docs] def load_page(self, payload):
- """
+ """
Parses the collection of records out of a list payload.
:param dict payload: The JSON-loaded content.
@@ -109,7 +109,7 @@ Source code for twilio.base.page
@property
def previous_page_url(self):
- """
+ """
:return str: Returns a link to the previous_page_url or None if doesn't exist.
"""
if 'meta' in self._payload and 'previous_page_url' in self._payload['meta']:
@@ -121,7 +121,7 @@ Source code for twilio.base.page
@property
def next_page_url(self):
- """
+ """
:return str: Returns a link to the next_page_url or None if doesn't exist.
"""
if 'meta' in self._payload and 'next_page_url' in self._payload['meta']:
@@ -132,14 +132,14 @@ Source code for twilio.base.page
return None
[docs] def get_instance(self, payload):
- """
+ """
:param dict payload: A JSON-loaded representation of an instance record.
:return: A rich, resource-dependent object.
"""
raise TwilioException('Page.get_instance() must be implemented in the derived class')
[docs] def next_page(self):
- """
+ """
Return the `Page` after this one.
:return Page: The next page.
"""
@@ -151,7 +151,7 @@ Source code for twilio.base.page
return cls(self._version, response, self._solution)
[docs] def previous_page(self):
- """
+ """
Return the `Page` before this one.
:return Page: The previous page.
"""
diff --git a/docs/build/html/_modules/twilio/base/serialize.html b/docs/build/html/_modules/twilio/base/serialize.html
index 4fc5f53aa3..6c72c6cb9a 100644
--- a/docs/build/html/_modules/twilio/base/serialize.html
+++ b/docs/build/html/_modules/twilio/base/serialize.html
@@ -10,7 +10,7 @@
})(window,document,'script','dataLayer','GTM-MWRD6S');
-twilio.base.serialize — twilio-python 7.16.0 documentation
+twilio.base.serialize — twilio-python 7.16.1 documentation
@@ -35,7 +35,7 @@ Source code for twilio.base.serialize
[docs]def iso8601_date(d):
- """
+ """
Return a string representation of a date that the Twilio API understands
Format is YYYY-MM-DD. Returns None if d is not a string, datetime, or date
"""
@@ -50,7 +50,7 @@ Source code for twilio.base.serialize
[docs]def iso8601_datetime(d):
- """
+ """
Return a string representation of a date that the Twilio API understands
Format is YYYY-MM-DD. Returns None if d is not a string, datetime, or date
"""
@@ -63,7 +63,7 @@ Source code for twilio.base.serialize
[docs]def prefixed_collapsible_map(m, prefix):
- """
+ """
Return a dict of params corresponding to those in m with the added prefix
"""
if m == values.unset:
@@ -93,7 +93,7 @@ Source code for twilio.base.serialize
[docs]def object(obj):
- """
+ """
Return a jsonified string represenation of obj if obj is jsonifiable else
return obj untouched
"""
@@ -103,7 +103,7 @@ Source code for twilio.base.serialize
[docs]def map(lst, serialize_func):
- """
+ """
Applies serialize_func to every element in lst
"""
if not isinstance(lst, list):
diff --git a/docs/build/html/_modules/twilio/base/values.html b/docs/build/html/_modules/twilio/base/values.html
index b082c0aacc..155147ace4 100644
--- a/docs/build/html/_modules/twilio/base/values.html
+++ b/docs/build/html/_modules/twilio/base/values.html
@@ -10,7 +10,7 @@
})(window,document,'script','dataLayer','GTM-MWRD6S');
-twilio.base.values — twilio-python 7.16.0 documentation
+twilio.base.values — twilio-python 7.16.1 documentation
@@ -32,7 +32,7 @@ Source code for twilio.base.values
[docs]def of(d):
- """
+ """
Remove unset values from a dict.
:param dict d: A dict to strip.
diff --git a/docs/build/html/_modules/twilio/base/version.html b/docs/build/html/_modules/twilio/base/version.html
index 2307ec9482..55880b9060 100644
--- a/docs/build/html/_modules/twilio/base/version.html
+++ b/docs/build/html/_modules/twilio/base/version.html
@@ -10,7 +10,7 @@
})(window,document,'script','dataLayer','GTM-MWRD6S');
-twilio.base.version — twilio-python 7.16.0 documentation
+twilio.base.version — twilio-python 7.16.1 documentation
@@ -36,12 +36,12 @@ Source code for twilio.base.version
[docs]class Version(object):
- """
+ """
Represents an API version.
"""
def __init__(self, domain):
- """
+ """
:param Domain domain:
:return:
"""
@@ -49,20 +49,20 @@ Source code for twilio.base.version
self.version = None
[docs] def absolute_url(self, uri):
- """
+ """
Turns a relative uri into an absolute url.
"""
return self.domain.absolute_url(self.relative_uri(uri))
[docs] def relative_uri(self, uri):
- """
+ """
Turns a relative uri into a versioned relative uri.
"""
return '{}/{}'.format(self.version.strip('/'), uri.strip('/'))
[docs] def request(self, method, uri, params=None, data=None, headers=None,
auth=None, timeout=None, allow_redirects=False):
- """
+ """
Make an HTTP request.
"""
url = self.relative_uri(uri)
@@ -79,7 +79,7 @@ Source code for twilio.base.version
[docs] @classmethod
def exception(cls, method, uri, response, message):
- """
+ """
Wraps an exceptional response in a `TwilioRestException`.
"""
# noinspection PyBroadException
@@ -96,7 +96,7 @@ Source code for twilio.base.version
[docs] def fetch(self, method, uri, params=None, data=None, headers=None, auth=None, timeout=None,
allow_redirects=False):
- """
+ """
Fetch a resource instance.
"""
response = self.request(
@@ -118,7 +118,7 @@ Source code for twilio.base.version
[docs] def update(self, method, uri, params=None, data=None, headers=None, auth=None, timeout=None,
allow_redirects=False):
- """
+ """
Update a resource instance.
"""
response = self.request(
@@ -139,7 +139,7 @@ Source code for twilio.base.version
[docs] def delete(self, method, uri, params=None, data=None, headers=None, auth=None, timeout=None,
allow_redirects=False):
- """
+ """
Delete a resource.
"""
response = self.request(
@@ -159,7 +159,7 @@ Source code for twilio.base.version
return response.status_code == 204
[docs] def read_limits(self, limit=None, page_size=None):
- """
+ """
Takes a limit on the max number of records to read and a max page_size
and calculates the max number of pages to read.
@@ -177,7 +177,7 @@ Source code for twilio.base.version
[docs] def page(self, method, uri, params=None, data=None, headers=None, auth=None, timeout=None,
allow_redirects=False):
- """
+ """
Makes an HTTP request.
"""
return self.request(
@@ -192,7 +192,7 @@ Source code for twilio.base.version
)
[docs] def stream(self, page, limit=None, page_limit=None):
- """
+ """
Generates records one a time from a page, stopping at prescribed limits.
:param Page page: The page to stream.
@@ -217,7 +217,7 @@ Source code for twilio.base.version
[docs] def create(self, method, uri, params=None, data=None, headers=None, auth=None, timeout=None,
allow_redirects=False):
- """
+ """
Create a resource instance.
"""
response = self.request(
diff --git a/docs/build/html/_modules/twilio/http.html b/docs/build/html/_modules/twilio/http.html
index 716dc12816..85b87e28e9 100644
--- a/docs/build/html/_modules/twilio/http.html
+++ b/docs/build/html/_modules/twilio/http.html
@@ -10,7 +10,7 @@
})(window,document,'script','dataLayer','GTM-MWRD6S');
-twilio.http — twilio-python 7.16.0 documentation
+twilio.http — twilio-python 7.16.1 documentation
@@ -32,12 +32,12 @@ Source code for twilio.http
[docs]class HttpClient(object):
- """
+ """
An abstract class representing an HTTP client.
"""
[docs] def request(self, method, url, params=None, data=None, headers=None, auth=None,
timeout=None, allow_redirects=False):
- """
+ """
Make an HTTP request.
"""
raise TwilioException('HttpClient is an abstract class')
diff --git a/docs/build/html/_modules/twilio/http/http_client.html b/docs/build/html/_modules/twilio/http/http_client.html
index f3d05a7533..2c9c0b805d 100644
--- a/docs/build/html/_modules/twilio/http/http_client.html
+++ b/docs/build/html/_modules/twilio/http/http_client.html
@@ -10,7 +10,7 @@
})(window,document,'script','dataLayer','GTM-MWRD6S');
-twilio.http.http_client — twilio-python 7.16.0 documentation
+twilio.http.http_client — twilio-python 7.16.1 documentation
@@ -41,13 +41,13 @@ Source code for twilio.http.http_client
[docs]class TwilioHttpClient(HttpClient):
- """
+ """
General purpose HTTP Client for interacting with the Twilio API
"""
def __init__(self, pool_connections=True, request_hooks=None, timeout=None, logger=_logger, proxy=None,
max_retries=None):
- """
+ """
Constructor for the TwilioHttpClient
:param bool pool_connections
@@ -73,7 +73,7 @@ Source code for twilio.http.http_client
[docs] def request(self, method, url, params=None, data=None, headers=None, auth=None, timeout=None,
allow_redirects=False):
- """
+ """
Make an HTTP Request with parameters provided.
:param str method: The HTTP method to use
diff --git a/docs/build/html/_modules/twilio/http/request.html b/docs/build/html/_modules/twilio/http/request.html
index c19faa02c7..7bb5a3fd91 100644
--- a/docs/build/html/_modules/twilio/http/request.html
+++ b/docs/build/html/_modules/twilio/http/request.html
@@ -10,7 +10,7 @@
})(window,document,'script','dataLayer','GTM-MWRD6S');
-twilio.http.request — twilio-python 7.16.0 documentation
+twilio.http.request — twilio-python 7.16.1 documentation
@@ -32,7 +32,7 @@ Source code for twilio.http.request
[docs]class Request(object):
- """
+ """
An HTTP request.
"""
ANY = '*'
diff --git a/docs/build/html/_modules/twilio/http/response.html b/docs/build/html/_modules/twilio/http/response.html
index 0db50a1100..707652496c 100644
--- a/docs/build/html/_modules/twilio/http/response.html
+++ b/docs/build/html/_modules/twilio/http/response.html
@@ -10,7 +10,7 @@
})(window,document,'script','dataLayer','GTM-MWRD6S');
-twilio.http.response — twilio-python 7.16.0 documentation
+twilio.http.response — twilio-python 7.16.1 documentation
diff --git a/docs/build/html/_modules/twilio/http/validation_client.html b/docs/build/html/_modules/twilio/http/validation_client.html
index fbd0a83178..2b1adf1735 100644
--- a/docs/build/html/_modules/twilio/http/validation_client.html
+++ b/docs/build/html/_modules/twilio/http/validation_client.html
@@ -10,7 +10,7 @@
})(window,document,'script','dataLayer','GTM-MWRD6S');
-twilio.http.validation_client — twilio-python 7.16.0 documentation
+twilio.http.validation_client — twilio-python 7.16.1 documentation
@@ -47,7 +47,7 @@ Source code for twilio.http.validation_client
__SIGNED_HEADERS = ['authorization', 'host']
def __init__(self, account_sid, api_key_sid, credential_sid, private_key, pool_connections=True):
- """
+ """
Build a ValidationClient which signs requests with private_key and allows Twilio to
validate request has not been tampered with.
@@ -65,7 +65,7 @@ Source code for twilio.http.validation_client
[docs] def request(self, method, url, params=None, data=None, headers=None, auth=None, timeout=None,
allow_redirects=False):
- """
+ """
Make a signed HTTP Request
:param str method: The HTTP method to use
@@ -102,7 +102,7 @@ Source code for twilio.http.validation_client
return Response(int(response.status_code), response.text)
def _build_validation_payload(self, request):
- """
+ """
Extract relevant information from request to build a ClientValidationJWT
:param PreparedRequest request: request we will extract information from.
:return: ValidationPayload
@@ -121,12 +121,12 @@ Source code for twilio.http.validation_client
)
def _get_host(self, request):
- """Pull the Host out of the request"""
+ """Pull the Host out of the request"""
parsed = urlparse(request.url)
return parsed.netloc
[docs] def validate_ssl_certificate(self, client):
- """
+ """
Validate that a request to the new SSL certificate is successful
:return: null on success, raise TwilioRestException if the request fails
"""
diff --git a/docs/build/html/_modules/twilio/jwt.html b/docs/build/html/_modules/twilio/jwt.html
index b327ce804f..b1580f579e 100644
--- a/docs/build/html/_modules/twilio/jwt.html
+++ b/docs/build/html/_modules/twilio/jwt.html
@@ -10,7 +10,7 @@
})(window,document,'script','dataLayer','GTM-MWRD6S');
-twilio.jwt — twilio-python 7.16.0 documentation
+twilio.jwt — twilio-python 7.16.1 documentation
@@ -40,41 +40,41 @@ Source code for twilio.jwt
[docs]class Jwt(object):
- """Base class for building a Json Web Token"""
+ """Base class for building a Json Web Token"""
GENERATE = object()
ALGORITHM = 'HS256'
def __init__(self, secret_key, issuer, subject=None, algorithm=None, nbf=GENERATE,
ttl=3600, valid_until=None):
self.secret_key = secret_key
- """:type str: The secret used to encode the JWT"""
+ """:type str: The secret used to encode the JWT"""
self.issuer = issuer
- """:type str: The issuer of this JWT"""
+ """:type str: The issuer of this JWT"""
self.subject = subject
- """:type str: The subject of this JWT, omitted from payload by default"""
+ """:type str: The subject of this JWT, omitted from payload by default"""
self.algorithm = algorithm or self.ALGORITHM
- """:type str: The algorithm used to encode the JWT, defaults to 'HS256'"""
+ """:type str: The algorithm used to encode the JWT, defaults to 'HS256'"""
self.nbf = nbf
- """:type int: Time in secs since epoch before which this JWT is invalid. Defaults to now."""
+ """:type int: Time in secs since epoch before which this JWT is invalid. Defaults to now."""
self.ttl = ttl
- """:type int: Time to live of the JWT in seconds, defaults to 1 hour"""
+ """:type int: Time to live of the JWT in seconds, defaults to 1 hour"""
self.valid_until = valid_until
- """:type int: Time in secs since epoch this JWT is valid for. Overrides ttl if provided."""
+ """:type int: Time in secs since epoch this JWT is valid for. Overrides ttl if provided."""
self.__decoded_payload = None
self.__decoded_headers = None
def _generate_payload(self):
- """:rtype: dict the payload of the JWT to send"""
+ """:rtype: dict the payload of the JWT to send"""
raise NotImplementedError('Subclass must provide a payload.')
def _generate_headers(self):
- """:rtype dict: Additional headers to include in the JWT, defaults to an empty dict"""
+ """:rtype dict: Additional headers to include in the JWT, defaults to an empty dict"""
return {}
@classmethod
def _from_jwt(cls, headers, payload, key=None):
- """
+ """
Class specific implementation of from_jwt which should take jwt components and return
and instance of this Class with jwt information loaded.
:return: Jwt object containing the headers, payload and key
@@ -122,7 +122,7 @@ Source code for twilio.jwt
return headers
[docs] def to_jwt(self, ttl=None):
- """
+ """
Encode this JWT object into a JWT string
:param int ttl: override the ttl configured in the constructor
:rtype: str The JWT string
@@ -141,7 +141,7 @@ Source code for twilio.jwt
[docs] @classmethod
def from_jwt(cls, jwt, key=''):
- """
+ """
Decode a JWT string into a Jwt object
:param str jwt: JWT string
:param Optional[str] key: key used to verify JWT signature, if not provided then validation
diff --git a/docs/build/html/_modules/twilio/jwt/access_token.html b/docs/build/html/_modules/twilio/jwt/access_token.html
index 7e9ea18b44..3e9d07fd95 100644
--- a/docs/build/html/_modules/twilio/jwt/access_token.html
+++ b/docs/build/html/_modules/twilio/jwt/access_token.html
@@ -10,7 +10,7 @@
})(window,document,'script','dataLayer','GTM-MWRD6S');
-twilio.jwt.access_token — twilio-python 7.16.0 documentation
+twilio.jwt.access_token — twilio-python 7.16.1 documentation
@@ -34,14 +34,14 @@ Source code for twilio.jwt.access_token
[docs]class AccessTokenGrant(object):
- """A Grant giving access to a Twilio Resource"""
+ """A Grant giving access to a Twilio Resource"""
@property
def key(self):
- """:rtype str Grant's twilio specific key"""
+ """:rtype str Grant's twilio specific key"""
raise NotImplementedError('Grant must have a key property.')
[docs] def to_payload(self):
- """:return: dict something"""
+ """:return: dict something"""
raise NotImplementedError('Grant must implement to_payload.')
def __str__(self):
@@ -49,7 +49,7 @@ Source code for twilio.jwt.access_token
[docs]class AccessToken(Jwt):
- """Access Token containing one or more AccessTokenGrants used to access Twilio Resources"""
+ """Access Token containing one or more AccessTokenGrants used to access Twilio Resources"""
ALGORITHM = 'HS256'
@@ -75,7 +75,7 @@ Source code for twilio.jwt.access_token
)
[docs] def add_grant(self, grant):
- """Add a grant to this AccessToken"""
+ """Add a grant to this AccessToken"""
if not isinstance(grant, AccessTokenGrant):
raise ValueError('Grant must be an instance of AccessTokenGrant.')
self.grants.append(grant)
diff --git a/docs/build/html/_modules/twilio/jwt/access_token/grants.html b/docs/build/html/_modules/twilio/jwt/access_token/grants.html
index 72d055e15a..eff09ccd96 100644
--- a/docs/build/html/_modules/twilio/jwt/access_token/grants.html
+++ b/docs/build/html/_modules/twilio/jwt/access_token/grants.html
@@ -10,7 +10,7 @@
})(window,document,'script','dataLayer','GTM-MWRD6S');
-twilio.jwt.access_token.grants — twilio-python 7.16.0 documentation
+twilio.jwt.access_token.grants — twilio-python 7.16.1 documentation
@@ -34,7 +34,7 @@ Source code for twilio.jwt.access_token.grants
[docs]def deprecated(func):
- '''This is a decorator which can be used to mark functions
+ '''This is a decorator which can be used to mark functions
as deprecated. It will result in a warning being emitted
when the function is used.'''
@@ -49,7 +49,7 @@
Source code for twilio.jwt.access_token.grants
[docs]class ChatGrant(AccessTokenGrant):
- """Grant to access Twilio Chat"""
+ """Grant to access Twilio Chat"""
def __init__(self, service_sid=None, endpoint_id=None,
deployment_role_sid=None, push_credential_sid=None):
@@ -77,7 +77,7 @@
Source code for twilio.jwt.access_token.grants
[docs]class IpMessagingGrant(AccessTokenGrant):
- """Grant to access Twilio IP Messaging"""
+ """Grant to access Twilio IP Messaging"""
@deprecated
def __init__(self, service_sid=None, endpoint_id=None,
@@ -106,7 +106,7 @@
Source code for twilio.jwt.access_token.grants
[docs]class SyncGrant(AccessTokenGrant):
- """Grant to access Twilio Sync"""
+ """Grant to access Twilio Sync"""
def __init__(self, service_sid=None, endpoint_id=None):
self.service_sid = service_sid
self.endpoint_id = endpoint_id
@@ -126,7 +126,7 @@
Source code for twilio.jwt.access_token.grants
[docs]class VoiceGrant(AccessTokenGrant):
- """Grant to access Twilio Programmable Voice"""
+ """Grant to access Twilio Programmable Voice"""
def __init__(self,
incoming_allow=None,
outgoing_application_sid=None,
@@ -134,15 +134,15 @@
Source code for twilio.jwt.access_token.grants
push_credential_sid=None,
endpoint_id=None):
self.incoming_allow = incoming_allow
- """ :type : bool """
+ """ :type : bool """
self.outgoing_application_sid = outgoing_application_sid
- """ :type : str """
+ """ :type : str """
self.outgoing_application_params = outgoing_application_params
- """ :type : dict """
+ """ :type : dict """
self.push_credential_sid = push_credential_sid
- """ :type : str """
+ """ :type : str """
self.endpoint_id = endpoint_id
- """ :type : str """
+ """ :type : str """
@property
def key(self):
@@ -171,7 +171,7 @@
Source code for twilio.jwt.access_token.grants
[docs]class ConversationsGrant(AccessTokenGrant):
- """Grant to access Twilio Conversations"""
+ """Grant to access Twilio Conversations"""
@deprecated
def __init__(self, configuration_profile_sid=None):
self.configuration_profile_sid = configuration_profile_sid
@@ -189,7 +189,7 @@
Source code for twilio.jwt.access_token.grants
[docs]class VideoGrant(AccessTokenGrant):
- """Grant to access Twilio Video"""
+ """Grant to access Twilio Video"""
def __init__(self, room=None):
self.room = room
@@ -206,7 +206,7 @@
Source code for twilio.jwt.access_token.grants
[docs]class TaskRouterGrant(AccessTokenGrant):
- """Grant to access Twilio TaskRouter"""
+ """Grant to access Twilio TaskRouter"""
def __init__(self, workspace_sid=None, worker_sid=None, role=None):
self.workspace_sid = workspace_sid
self.worker_sid = worker_sid
@@ -229,19 +229,19 @@
Source code for twilio.jwt.access_token.grants
[docs]class PlaybackGrant(AccessTokenGrant):
- """Grant to access Twilio Live stream"""
+ """Grant to access Twilio Live stream"""
def __init__(self, grant=None):
- """Initialize a PlaybackGrant with a grant retrieved from the Twilio API."""
+ """Initialize a PlaybackGrant with a grant retrieved from the Twilio API."""
self.grant = grant
@property
def key(self):
- """Return the grant's key."""
+ """Return the grant's key."""
return "player"
diff --git a/docs/build/html/_modules/twilio/jwt/client.html b/docs/build/html/_modules/twilio/jwt/client.html
index f2bf25efb7..82e2f2b5e1 100644
--- a/docs/build/html/_modules/twilio/jwt/client.html
+++ b/docs/build/html/_modules/twilio/jwt/client.html
@@ -10,7 +10,7 @@
})(window,document,'script','dataLayer','GTM-MWRD6S');
-twilio.jwt.client — twilio-python 7.16.0 documentation
+twilio.jwt.client — twilio-python 7.16.1 documentation
@@ -34,13 +34,13 @@ Source code for twilio.jwt.client
[docs]class ClientCapabilityToken(Jwt):
- """A token to control permissions with Twilio Client"""
+ """A token to control permissions with Twilio Client"""
ALGORITHM = 'HS256'
def __init__(self, account_sid, auth_token, nbf=Jwt.GENERATE, ttl=3600, valid_until=None,
**kwargs):
- """
+ """
:param str account_sid: The account sid to which this token is granted access.
:param str auth_token: The secret key used to sign the token. Note, this auth token is not
visible to the user of the token.
@@ -73,7 +73,7 @@ Source code for twilio.jwt.client
self.allow_event_stream(**kwargs['allow_event_stream'])
[docs] def allow_client_outgoing(self, application_sid, **kwargs):
- """
+ """
Allow the user of this token to make outgoing connections. Keyword arguments are passed
to the application.
@@ -86,7 +86,7 @@ Source code for twilio.jwt.client
self.capabilities['outgoing'] = scope
[docs] def allow_client_incoming(self, client_name):
- """
+ """
Allow the user of this token to accept incoming connections.
:param str client_name: Client name to accept calls from
@@ -95,7 +95,7 @@ Source code for twilio.jwt.client
self.capabilities['incoming'] = ScopeURI('client', 'incoming', {'clientName': client_name})
[docs] def allow_event_stream(self, **kwargs):
- """
+ """
Allow the user of this token to access their event stream.
"""
scope = ScopeURI('stream', 'subscribe', {'path': '/2010-04-01/Events'})
@@ -113,7 +113,7 @@ Source code for twilio.jwt.client
[docs]class ScopeURI(object):
- """A single capability granted to Twilio Client and scoped to a service"""
+ """A single capability granted to Twilio Client and scoped to a service"""
def __init__(self, service, privilege, params=None):
self.service = service
diff --git a/docs/build/html/_modules/twilio/jwt/taskrouter.html b/docs/build/html/_modules/twilio/jwt/taskrouter.html
index 611fbe8666..4f79e09f01 100644
--- a/docs/build/html/_modules/twilio/jwt/taskrouter.html
+++ b/docs/build/html/_modules/twilio/jwt/taskrouter.html
@@ -10,7 +10,7 @@
})(window,document,'script','dataLayer','GTM-MWRD6S');
-twilio.jwt.taskrouter — twilio-python 7.16.0 documentation
+twilio.jwt.taskrouter — twilio-python 7.16.1 documentation
@@ -38,7 +38,7 @@ Source code for twilio.jwt.taskrouter
ALGORITHM = 'HS256'
def __init__(self, account_sid, auth_token, workspace_sid, channel_id, **kwargs):
- """
+ """
:param str account_sid: Twilio account sid
:param str auth_token: Twilio auth token used to sign the JWT
:param str workspace_sid: TaskRouter workspace sid
diff --git a/docs/build/html/_modules/twilio/jwt/taskrouter/capabilities.html b/docs/build/html/_modules/twilio/jwt/taskrouter/capabilities.html
index f766664c2f..5564c6e5ae 100644
--- a/docs/build/html/_modules/twilio/jwt/taskrouter/capabilities.html
+++ b/docs/build/html/_modules/twilio/jwt/taskrouter/capabilities.html
@@ -10,7 +10,7 @@
})(window,document,'script','dataLayer','GTM-MWRD6S');
-twilio.jwt.taskrouter.capabilities — twilio-python 7.16.0 documentation
+twilio.jwt.taskrouter.capabilities — twilio-python 7.16.1 documentation
@@ -33,7 +33,7 @@ Source code for twilio.jwt.taskrouter.capabilities
[docs]class WorkerCapabilityToken(TaskRouterCapabilityToken):
def __init__(self, account_sid, auth_token, workspace_sid, worker_sid, ttl=3600, **kwargs):
- """
+ """
:param kwargs:
All kwarg parameters supported by TaskRouterCapabilityToken
:param bool allow_fetch_activities: shortcut to calling allow_fetch_activities,
diff --git a/docs/build/html/_modules/twilio/jwt/validation.html b/docs/build/html/_modules/twilio/jwt/validation.html
index 246fe9a515..c2ab0d2a96 100644
--- a/docs/build/html/_modules/twilio/jwt/validation.html
+++ b/docs/build/html/_modules/twilio/jwt/validation.html
@@ -10,7 +10,7 @@
})(window,document,'script','dataLayer','GTM-MWRD6S');
-twilio.jwt.validation — twilio-python 7.16.0 documentation
+twilio.jwt.validation — twilio-python 7.16.1 documentation
@@ -34,12 +34,12 @@ Source code for twilio.jwt.validation
[docs]class ClientValidationJwt(Jwt):
- """A JWT included on requests so that Twilio can verify request authenticity"""
+ """A JWT included on requests so that Twilio can verify request authenticity"""
__CTY = 'twilio-pkrv;v=1'
ALGORITHM = 'RS256'
def __init__(self, account_sid, api_key_sid, credential_sid, private_key, validation_payload):
- """
+ """
Create a new ClientValidationJwt
:param str account_sid: A Twilio Account Sid starting with 'AC'
:param str api_key_sid: A Twilio API Key Sid starting with 'SK'
diff --git a/docs/build/html/_modules/twilio/request_validator.html b/docs/build/html/_modules/twilio/request_validator.html
index 8141a561c4..af2f71bce3 100644
--- a/docs/build/html/_modules/twilio/request_validator.html
+++ b/docs/build/html/_modules/twilio/request_validator.html
@@ -10,7 +10,7 @@
})(window,document,'script','dataLayer','GTM-MWRD6S');
-twilio.request_validator — twilio-python 7.16.0 documentation
+twilio.request_validator — twilio-python 7.16.1 documentation
@@ -36,7 +36,7 @@ Source code for twilio.request_validator
[docs]def compare(string1, string2):
- """Compare two strings while protecting against timing attacks
+ """Compare two strings while protecting against timing attacks
:param str string1: the first string
:param str string2: the second string
@@ -54,7 +54,7 @@ Source code for twilio.request_validator
[docs]def remove_port(uri):
- """Remove the port number from a URI
+ """Remove the port number from a URI
:param uri: parsed URI that Twilio requested on your server
@@ -71,7 +71,7 @@ Source code for twilio.request_validator
[docs]def add_port(uri):
- """Add the port number to a URI
+ """Add the port number to a URI
:param uri: parsed URI that Twilio requested on your server
@@ -94,7 +94,7 @@ Source code for twilio.request_validator
self.token = token.encode("utf-8")
[docs] def compute_signature(self, uri, params):
- """Compute the signature for a given request
+ """Compute the signature for a given request
:param uri: full URI that Twilio requested on your server
:param params: post vars that Twilio sent with the request
@@ -134,7 +134,7 @@ Source code for twilio.request_validator
return computed.strip()
[docs] def validate(self, uri, params, signature):
- """Validate a request from Twilio
+ """Validate a request from Twilio
:param uri: full URI that Twilio requested on your server
:param params: dictionary of POST variables or string of POST body for JSON requests
diff --git a/docs/build/html/_modules/twilio/rest.html b/docs/build/html/_modules/twilio/rest.html
index 114b8cdd4a..b2d2498b9b 100644
--- a/docs/build/html/_modules/twilio/rest.html
+++ b/docs/build/html/_modules/twilio/rest.html
@@ -10,7 +10,7 @@
})(window,document,'script','dataLayer','GTM-MWRD6S');
-twilio.rest — twilio-python 7.16.0 documentation
+twilio.rest — twilio-python 7.16.1 documentation
@@ -49,12 +49,12 @@ Source code for twilio.rest
[docs]class Client(object):
- """ A client for accessing the Twilio API. """
+ """ A client for accessing the Twilio API. """
def __init__(self, username=None, password=None, account_sid=None, region=None,
http_client=None, environment=None, edge=None,
user_agent_extensions=None):
- """
+ """
Initializes the Twilio Client
:param str username: Username to authenticate with
@@ -72,25 +72,25 @@ Source code for twilio.rest
environment = environment or os.environ
self.username = username or environment.get('TWILIO_ACCOUNT_SID')
- """ :type : str """
+ """ :type : str """
self.password = password or environment.get('TWILIO_AUTH_TOKEN')
- """ :type : str """
+ """ :type : str """
self.account_sid = account_sid or self.username
- """ :type : str """
+ """ :type : str """
self.edge = edge or environment.get('TWILIO_EDGE')
- """ :type : str """
+ """ :type : str """
self.region = region or environment.get('TWILIO_REGION')
- """ :type : str """
+ """ :type : str """
self.user_agent_extensions = user_agent_extensions or []
- """ :type : list[str] """
+ """ :type : list[str] """
if not self.username or not self.password:
raise TwilioException("Credentials are required to create a TwilioClient")
self.auth = (self.username, self.password)
- """ :type : tuple(str, str) """
+ """ :type : tuple(str, str) """
self.http_client = http_client or TwilioHttpClient()
- """ :type : HttpClient """
+ """ :type : HttpClient """
# Domains
self._accounts = None
@@ -131,7 +131,7 @@ Source code for twilio.rest
[docs] def request(self, method, uri, params=None, data=None, headers=None, auth=None,
timeout=None, allow_redirects=False):
- """
+ """
Makes a request to the Twilio API using the configured http client
Authentication information is automatically added if none is provided
@@ -185,7 +185,7 @@ Source code for twilio.rest
)
[docs] def get_hostname(self, uri):
- """
+ """
Determines the proper hostname given edge and region preferences
via client configuration or uri.
@@ -221,7 +221,7 @@ Source code for twilio.rest
@property
def accounts(self):
- """
+ """
Access the Accounts Twilio Domain
:returns: Accounts Twilio Domain
@@ -234,7 +234,7 @@ Source code for twilio.rest
@property
def api(self):
- """
+ """
Access the Api Twilio Domain
:returns: Api Twilio Domain
@@ -247,7 +247,7 @@ Source code for twilio.rest
@property
def autopilot(self):
- """
+ """
Access the Autopilot Twilio Domain
:returns: Autopilot Twilio Domain
@@ -260,7 +260,7 @@ Source code for twilio.rest
@property
def chat(self):
- """
+ """
Access the Chat Twilio Domain
:returns: Chat Twilio Domain
@@ -273,7 +273,7 @@ Source code for twilio.rest
@property
def content(self):
- """
+ """
Access the Content Twilio Domain
:returns: Content Twilio Domain
@@ -286,7 +286,7 @@ Source code for twilio.rest
@property
def conversations(self):
- """
+ """
Access the Conversations Twilio Domain
:returns: Conversations Twilio Domain
@@ -299,7 +299,7 @@ Source code for twilio.rest
@property
def events(self):
- """
+ """
Access the Events Twilio Domain
:returns: Events Twilio Domain
@@ -312,7 +312,7 @@ Source code for twilio.rest
@property
def flex_api(self):
- """
+ """
Access the FlexApi Twilio Domain
:returns: FlexApi Twilio Domain
@@ -325,7 +325,7 @@ Source code for twilio.rest
@property
def frontline_api(self):
- """
+ """
Access the FrontlineApi Twilio Domain
:returns: FrontlineApi Twilio Domain
@@ -338,7 +338,7 @@ Source code for twilio.rest
@property
def insights(self):
- """
+ """
Access the Insights Twilio Domain
:returns: Insights Twilio Domain
@@ -351,7 +351,7 @@ Source code for twilio.rest
@property
def ip_messaging(self):
- """
+ """
Access the IpMessaging Twilio Domain
:returns: IpMessaging Twilio Domain
@@ -364,7 +364,7 @@ Source code for twilio.rest
@property
def lookups(self):
- """
+ """
Access the Lookups Twilio Domain
:returns: Lookups Twilio Domain
@@ -377,7 +377,7 @@ Source code for twilio.rest
@property
def media(self):
- """
+ """
Access the Media Twilio Domain
:returns: Media Twilio Domain
@@ -390,7 +390,7 @@ Source code for twilio.rest
@property
def messaging(self):
- """
+ """
Access the Messaging Twilio Domain
:returns: Messaging Twilio Domain
@@ -403,7 +403,7 @@ Source code for twilio.rest
@property
def monitor(self):
- """
+ """
Access the Monitor Twilio Domain
:returns: Monitor Twilio Domain
@@ -416,7 +416,7 @@ Source code for twilio.rest
@property
def notify(self):
- """
+ """
Access the Notify Twilio Domain
:returns: Notify Twilio Domain
@@ -429,7 +429,7 @@ Source code for twilio.rest
@property
def numbers(self):
- """
+ """
Access the Numbers Twilio Domain
:returns: Numbers Twilio Domain
@@ -442,7 +442,7 @@ Source code for twilio.rest
@property
def oauth(self):
- """
+ """
Access the Oauth Twilio Domain
:returns: Oauth Twilio Domain
@@ -455,7 +455,7 @@ Source code for twilio.rest
@property
def preview(self):
- """
+ """
Access the Preview Twilio Domain
:returns: Preview Twilio Domain
@@ -468,7 +468,7 @@ Source code for twilio.rest
@property
def pricing(self):
- """
+ """
Access the Pricing Twilio Domain
:returns: Pricing Twilio Domain
@@ -481,7 +481,7 @@ Source code for twilio.rest
@property
def proxy(self):
- """
+ """
Access the Proxy Twilio Domain
:returns: Proxy Twilio Domain
@@ -494,7 +494,7 @@ Source code for twilio.rest
@property
def routes(self):
- """
+ """
Access the Routes Twilio Domain
:returns: Routes Twilio Domain
@@ -507,7 +507,7 @@ Source code for twilio.rest
@property
def serverless(self):
- """
+ """
Access the Serverless Twilio Domain
:returns: Serverless Twilio Domain
@@ -520,7 +520,7 @@ Source code for twilio.rest
@property
def studio(self):
- """
+ """
Access the Studio Twilio Domain
:returns: Studio Twilio Domain
@@ -533,7 +533,7 @@ Source code for twilio.rest
@property
def sync(self):
- """
+ """
Access the Sync Twilio Domain
:returns: Sync Twilio Domain
@@ -546,7 +546,7 @@ Source code for twilio.rest
@property
def taskrouter(self):
- """
+ """
Access the Taskrouter Twilio Domain
:returns: Taskrouter Twilio Domain
@@ -559,7 +559,7 @@ Source code for twilio.rest
@property
def trunking(self):
- """
+ """
Access the Trunking Twilio Domain
:returns: Trunking Twilio Domain
@@ -572,7 +572,7 @@ Source code for twilio.rest
@property
def trusthub(self):
- """
+ """
Access the Trusthub Twilio Domain
:returns: Trusthub Twilio Domain
@@ -585,7 +585,7 @@ Source code for twilio.rest
@property
def verify(self):
- """
+ """
Access the Verify Twilio Domain
:returns: Verify Twilio Domain
@@ -598,7 +598,7 @@ Source code for twilio.rest
@property
def video(self):
- """
+ """
Access the Video Twilio Domain
:returns: Video Twilio Domain
@@ -611,7 +611,7 @@ Source code for twilio.rest
@property
def voice(self):
- """
+ """
Access the Voice Twilio Domain
:returns: Voice Twilio Domain
@@ -624,7 +624,7 @@ Source code for twilio.rest
@property
def wireless(self):
- """
+ """
Access the Wireless Twilio Domain
:returns: Wireless Twilio Domain
@@ -637,7 +637,7 @@ Source code for twilio.rest
@property
def supersim(self):
- """
+ """
Access the Supersim Twilio Domain
:returns: Supersim Twilio Domain
@@ -650,7 +650,7 @@ Source code for twilio.rest
@property
def bulkexports(self):
- """
+ """
Access the Bulkexports Twilio Domain
:returns: Bulkexports Twilio Domain
@@ -663,7 +663,7 @@ Source code for twilio.rest