Skip to content

Commit 952a88a

Browse files
committed
Deploy
1 parent 0295d50 commit 952a88a

File tree

18 files changed

+104
-52
lines changed

18 files changed

+104
-52
lines changed

bandwidth/__init__.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
__all__ = [
2-
'models',
2+
'api_helper',
3+
'bandwidth_client',
4+
'configuration',
35
'controllers',
4-
'BandwidthClient',
6+
'decorators',
7+
'exceptions',
8+
'http',
9+
'models',
510
]

bandwidth/api_helper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def json_serialize(obj):
5353
"""JSON Serialization of a given object.
5454
5555
Args:
56-
obj (object): The object to serialise.
56+
obj (object): The object to serialize.
5757
5858
Returns:
5959
str: The JSON serialized string of the object.
@@ -79,7 +79,7 @@ def json_serialize(obj):
7979

8080
@staticmethod
8181
def json_deserialize(json, unboxing_function=None):
82-
"""JSON Deerialization of a given string.
82+
"""JSON Deserialization of a given string.
8383
8484
Args:
8585
json (str): The JSON serialized string to deserialize.

bandwidth/controllers/base_controller.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class BaseController(object):
2727
"""
2828

2929
global_headers = {
30-
'user-agent': 'python-sdk-refs/tags/python6.0.0'
30+
'user-agent': 'python-sdk-refs/tags/python6.1.0'
3131
}
3232

3333
def __init__(self, config, call_back=None):

bandwidth/http/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
__all__ = [
2-
'messaging_basic_auth',
3-
'voice_basic_auth',
2+
'auth',
43
'http_method_enum',
54
'http_request',
65
'http_response',

bandwidth/messaging/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
__all__ = [
2-
'models',
32
'controllers',
4-
'messaging_client',
3+
'exceptions',
4+
'messaging_client',
5+
'models',
56
]

bandwidth/messaging/controllers/api_controller.py

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ def list_media(self,
3737
here.
3838
3939
Returns:
40-
list of Media: Response from the API. successful operation
40+
ApiResponse: An object with the response value as well as other
41+
useful information such as status codes and headers.
42+
successful operation
4143
4244
Raises:
4345
APIException: When an error occurs while fetching the data from
@@ -98,7 +100,9 @@ def get_media(self,
98100
media_id (string): TODO: type description here.
99101
100102
Returns:
101-
binary: Response from the API. successful operation
103+
ApiResponse: An object with the response value as well as other
104+
useful information such as status codes and headers.
105+
successful operation
102106
103107
Raises:
104108
APIException: When an error occurs while fetching the data from
@@ -163,7 +167,8 @@ def upload_media(self,
163167
cache_control (string, optional): TODO: type description here.
164168
165169
Returns:
166-
void: Response from the API.
170+
ApiResponse: An object with the response value as well as other
171+
useful information such as status codes and headers.
167172
168173
Raises:
169174
APIException: When an error occurs while fetching the data from
@@ -218,7 +223,8 @@ def upload_media(self,
218223
self.validate_response(_response)
219224

220225
# Return appropriate type
221-
ApiResponse(_response)
226+
return ApiResponse(_response)
227+
222228
def delete_media(self,
223229
user_id,
224230
media_id):
@@ -231,7 +237,8 @@ def delete_media(self,
231237
media_id (string): TODO: type description here.
232238
233239
Returns:
234-
void: Response from the API.
240+
ApiResponse: An object with the response value as well as other
241+
useful information such as status codes and headers.
235242
236243
Raises:
237244
APIException: When an error occurs while fetching the data from
@@ -272,7 +279,8 @@ def delete_media(self,
272279
self.validate_response(_response)
273280

274281
# Return appropriate type
275-
ApiResponse(_response)
282+
return ApiResponse(_response)
283+
276284
def create_message(self,
277285
user_id,
278286
body=None):
@@ -285,7 +293,9 @@ def create_message(self,
285293
body (MessageRequest, optional): TODO: type description here.
286294
287295
Returns:
288-
BandwidthMessage: Response from the API. successful operation
296+
ApiResponse: An object with the response value as well as other
297+
useful information such as status codes and headers.
298+
successful operation
289299
290300
Raises:
291301
APIException: When an error occurs while fetching the data from

bandwidth/messaging/controllers/base_controller.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class BaseController(object):
2727
"""
2828

2929
global_headers = {
30-
'user-agent': 'python-sdk-refs/tags/python6.0.0'
30+
'user-agent': 'python-sdk-refs/tags/python6.1.0'
3131
}
3232

3333
def __init__(self, config, call_back=None):

bandwidth/messaging/models/bandwidth_callback_message.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ).
77
"""
8-
import bandwidth.messaging.models.bandwidth_message
8+
from bandwidth.messaging.models.bandwidth_message import BandwidthMessage
99

1010

1111
class BandwidthCallbackMessage(object):
@@ -74,7 +74,7 @@ def from_dictionary(cls,
7474
to = dictionary.get('to')
7575
error_code = dictionary.get('errorCode')
7676
description = dictionary.get('description')
77-
message = bandwidth.messaging.models.bandwidth_message.BandwidthMessage.from_dictionary(dictionary.get('message')) if dictionary.get('message') else None
77+
message = BandwidthMessage.from_dictionary(dictionary.get('message')) if dictionary.get('message') else None
7878

7979
# Return an object of this model
8080
return cls(time,

bandwidth/messaging/models/media.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ).
77
"""
8-
import bandwidth.messaging.models.tag
8+
from bandwidth.messaging.models.tag import Tag
99

1010

1111
class Media(object):
@@ -92,7 +92,7 @@ def from_dictionary(cls,
9292
content_type = dictionary.get('contentType')
9393
tags = None
9494
if dictionary.get('tags') is not None:
95-
tags = [bandwidth.messaging.models.tag.Tag.from_dictionary(x) for x in dictionary.get('tags')]
95+
tags = [Tag.from_dictionary(x) for x in dictionary.get('tags')]
9696
user_id = dictionary.get('userId')
9797
media_name = dictionary.get('mediaName')
9898
media_id = dictionary.get('mediaId')

bandwidth/voice/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
__all__ = [
22
'bxml',
3-
'models',
43
'controllers',
4+
'exceptions',
5+
'models',
56
'voice_client',
67
]

0 commit comments

Comments
 (0)