Skip to content

Commit 2cd6bc8

Browse files
author
MousumiMohanty
committed
updated comments
1 parent 5d8bfe5 commit 2cd6bc8

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

RELEASE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
2.3.0
2-
- Added patch method to the RestClient class to facilitate Update Verification Process action
2+
- Added "PATCH" method to the RestClient class to facilitate Update Verification Process action
33

44
2.2.7
55
- Added tracking to requests

telesign/rest.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616

1717
class RestClient(requests.models.RequestEncodingMixin):
1818
"""
19-
The TeleSign RestClient is a generic HTTP REST client that can be extended to make requests against any of
20-
TeleSign's REST API endpoints.
19+
The Telesign RestClient is a generic HTTP REST client that can be extended to make requests against any of
20+
Telesign's REST API endpoints.
2121
2222
RequestEncodingMixin offers the function _encode_params for url encoding the body for use in string_to_sign outside
2323
of a regular HTTP request.
@@ -54,7 +54,7 @@ def __init__(self,
5454
timeout=10,
5555
auth_method=None):
5656
"""
57-
TeleSign RestClient useful for making generic RESTful requests against our API.
57+
Telesign RestClient useful for making generic RESTful requests against our API.
5858
5959
:param customer_id: Your customer_id string associated with your account.
6060
:param api_key: Your api_key string associated with your account.
@@ -78,7 +78,7 @@ def __init__(self,
7878

7979
current_version_sdk = telesign.__version__ if source == "python_telesign" else sdk_version_origin
8080

81-
self.user_agent = "TeleSignSDK/python Python/{python_version} Requests/{requests_version} OriginatingSDK/{source} SDKVersion/{sdk_version}".format(
81+
self.user_agent = "TelesignSDK/python Python/{python_version} Requests/{requests_version} OriginatingSDK/{source} SDKVersion/{sdk_version}".format(
8282
python_version=python_version(),
8383
requests_version=requests.__version__,
8484
source=source,
@@ -99,25 +99,25 @@ def generate_telesign_headers(customer_id,
9999
content_type=None,
100100
auth_method=None):
101101
"""
102-
Generates the TeleSign REST API headers used to authenticate requests.
102+
Generates the Telesign REST API headers used to authenticate requests.
103103
104104
Creates the canonicalized string_to_sign and generates the HMAC signature. This is used to authenticate requests
105-
against the TeleSign REST API.
105+
against the Telesign REST API.
106106
107107
See https://developer.telesign.com/docs/authentication for detailed API documentation.
108108
109109
:param customer_id: Your account customer_id.
110110
:param api_key: Your account api_key.
111111
:param method_name: The HTTP method name of the request as a upper case string, should be one of 'POST', 'GET',
112-
'PUT' or 'DELETE'.
112+
'PUT', 'PATCH' or 'DELETE'.
113113
:param resource: The partial resource URI to perform the request against, as a string.
114114
:param url_encoded_fields: HTTP body parameters to perform the HTTP request with, must be a urlencoded string.
115115
:param date_rfc2616: The date and time of the request formatted in rfc 2616, as a string.
116116
:param nonce: A unique cryptographic nonce for the request, as a string.
117117
:param user_agent: (optional) User Agent associated with the request, as a string.
118118
:param content_type: (optional) ContentType of the request, as a string.
119119
:param auth_method: (optional) Authentication type ex: Basic, HMAC etc
120-
:return: The TeleSign authentication headers.
120+
:return: The Telesign authentication headers.
121121
"""
122122
if date_rfc2616 is None:
123123
date_rfc2616 = formatdate(usegmt=True)
@@ -177,7 +177,7 @@ def generate_telesign_headers(customer_id,
177177

178178
def post(self, resource, body=None, json_fields=None, **query_params):
179179
"""
180-
Generic TeleSign REST API POST handler.
180+
Generic Telesign REST API POST handler.
181181
182182
:param resource: The partial resource URI to perform the request against, as a string.
183183
:param body: (optional) A dictionary sent as a part of request body.
@@ -188,7 +188,7 @@ def post(self, resource, body=None, json_fields=None, **query_params):
188188

189189
def get(self, resource, body=None, json_fields=None, **query_params):
190190
"""
191-
Generic TeleSign REST API GET handler.
191+
Generic Telesign REST API GET handler.
192192
193193
:param resource: The partial resource URI to perform the request against, as a string.
194194
:param body: (optional) A dictionary sent as a part of request body.
@@ -199,7 +199,7 @@ def get(self, resource, body=None, json_fields=None, **query_params):
199199

200200
def put(self, resource, body=None, json_fields=None, **query_params):
201201
"""
202-
Generic TeleSign REST API PUT handler.
202+
Generic Telesign REST API PUT handler.
203203
204204
:param resource: The partial resource URI to perform the request against, as a string.
205205
:param body: (optional) A dictionary sent as a part of request body.
@@ -213,7 +213,7 @@ def set_endpoint(self, rest_endpoint):
213213

214214
def delete(self, resource, body=None, json_fields=None, **query_params):
215215
"""
216-
Generic TeleSign REST API DELETE handler.
216+
Generic Telesign REST API DELETE handler.
217217
218218
:param resource: The partial resource URI to perform the request against, as a string.
219219
:param body: (optional) A dictionary sent as a part of request body.
@@ -224,7 +224,7 @@ def delete(self, resource, body=None, json_fields=None, **query_params):
224224

225225
def patch(self, resource, body=None, json_fields=None, **query_params):
226226
"""
227-
Generic TeleSign REST API PATCH handler.
227+
Generic Telesign REST API PATCH handler.
228228
229229
:param resource: The partial resource URI to perform the request against, as a string.
230230
:param body: (optional) A dictionary sent as a part of request body.
@@ -236,7 +236,7 @@ def patch(self, resource, body=None, json_fields=None, **query_params):
236236

237237
def _execute(self, method_function, method_name, resource, body=None, json_fields=None, **query_params):
238238
"""
239-
Generic TeleSign REST API request handler.
239+
Generic Telesign REST API request handler.
240240
241241
:param method_function: The Requests HTTP request function to perform the request.
242242
:param method_name: The HTTP method name, as an upper case string.

0 commit comments

Comments
 (0)