telesign 2.2.4__py2.py3-none-any.whl → 2.2.6__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- telesign/rest.py +6 -3
- {telesign-2.2.4.dist-info → telesign-2.2.6.dist-info}/METADATA +1 -1
- {telesign-2.2.4.dist-info → telesign-2.2.6.dist-info}/RECORD +6 -6
- {telesign-2.2.4.dist-info → telesign-2.2.6.dist-info}/LICENSE.txt +0 -0
- {telesign-2.2.4.dist-info → telesign-2.2.6.dist-info}/WHEEL +0 -0
- {telesign-2.2.4.dist-info → telesign-2.2.6.dist-info}/top_level.txt +0 -0
telesign/rest.py
CHANGED
|
@@ -119,14 +119,14 @@ class RestClient(requests.models.RequestEncodingMixin):
|
|
|
119
119
|
content_type = "application/x-www-form-urlencoded" if method_name in ("POST", "PUT") else ""
|
|
120
120
|
|
|
121
121
|
# Default auth_method is Digest if not explicitly specified
|
|
122
|
-
if auth_method == AuthMethod.BASIC:
|
|
122
|
+
if auth_method == AuthMethod.BASIC.value:
|
|
123
123
|
usr_apikey = "{customer_id}:{api_key}".format(customer_id=customer_id,
|
|
124
124
|
api_key=api_key)
|
|
125
125
|
b64val = b64encode(usr_apikey.encode())
|
|
126
|
-
authorization = "{auth_method} {b64val}".format(auth_method=AuthMethod.BASIC,
|
|
126
|
+
authorization = "{auth_method} {b64val}".format(auth_method=AuthMethod.BASIC.value,
|
|
127
127
|
b64val=b64val.decode())
|
|
128
128
|
else:
|
|
129
|
-
auth_method = AuthMethod.HMAC_SHA256
|
|
129
|
+
auth_method = AuthMethod.HMAC_SHA256.value
|
|
130
130
|
|
|
131
131
|
string_to_sign_builder = ["{method}".format(method=method_name)]
|
|
132
132
|
|
|
@@ -198,6 +198,9 @@ class RestClient(requests.models.RequestEncodingMixin):
|
|
|
198
198
|
"""
|
|
199
199
|
return self._execute(self.session.put, 'PUT', resource, body, json_fields, **query_params)
|
|
200
200
|
|
|
201
|
+
def set_endpoint(self, rest_endpoint):
|
|
202
|
+
self.api_host = rest_endpoint
|
|
203
|
+
|
|
201
204
|
def delete(self, resource, body=None, json_fields=None, **query_params):
|
|
202
205
|
"""
|
|
203
206
|
Generic TeleSign REST API DELETE handler.
|
|
@@ -3,12 +3,12 @@ telesign/appverify.py,sha256=wBeaeUxGmYcZkrbxkkXlG3-0oZr5sVvegzVpdvaoO2A,1195
|
|
|
3
3
|
telesign/intelligence.py,sha256=t-xwlgxkXw1OMupF5K4_UKWeTArOr9XPvddmqgZftPI,1452
|
|
4
4
|
telesign/messaging.py,sha256=v7l-eKUPqz7Nrwka0YNPMkC2TaoFUvQm3yp_djuTPu0,1367
|
|
5
5
|
telesign/phoneid.py,sha256=mk03NxL3wlaXpd8b-BB6q_SKfCxbtuTO19ayAHxmzz0,954
|
|
6
|
-
telesign/rest.py,sha256=
|
|
6
|
+
telesign/rest.py,sha256=s9ADfwcDhC9lpPJdpohkl6JiZ6URcb8diy2cnQOYX1o,11501
|
|
7
7
|
telesign/score.py,sha256=Kceu6IrirN9SsuT1geEWs0QHAn6H9ZNFyIDVHcBJdwg,908
|
|
8
8
|
telesign/util.py,sha256=stDxpL5ZQeGskE_OSGP04UFHs3ZP2ACaRpW1WyQGMHg,1624
|
|
9
9
|
telesign/voice.py,sha256=DJaWyQpun-T7LfNjpxpsUjupiv2ShW1jqoFQA-CE2-Y,1341
|
|
10
|
-
telesign-2.2.
|
|
11
|
-
telesign-2.2.
|
|
12
|
-
telesign-2.2.
|
|
13
|
-
telesign-2.2.
|
|
14
|
-
telesign-2.2.
|
|
10
|
+
telesign-2.2.6.dist-info/LICENSE.txt,sha256=a--xZ4PCKUL5rpct8RrUC6ODU_8ZKIU51kJPfsA4HUs,1058
|
|
11
|
+
telesign-2.2.6.dist-info/METADATA,sha256=DFbelVbeU83W0KXnGEGZyvp5rKZ9YFdZ0HCckG1eqCo,4532
|
|
12
|
+
telesign-2.2.6.dist-info/WHEEL,sha256=z9j0xAa_JmUKMpmz72K0ZGALSM_n-wQVmGbleXx2VHg,110
|
|
13
|
+
telesign-2.2.6.dist-info/top_level.txt,sha256=6LG7Jcr1jnpVhOWaIShoTdwYJn0QCfPhfudyVJNz1qg,9
|
|
14
|
+
telesign-2.2.6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|