Skip to content

Commit dc8f322

Browse files
authored
Release 21.9 (#26)
* Release 21.9 * Change Content-Type order * Code cleanup
1 parent fde0e8e commit dc8f322

9 files changed

Lines changed: 19 additions & 16 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[![PyPI](https://img.shields.io/pypi/v/aspose-barcode-cloud)](https://pypi.org/project/aspose-barcode-cloud/)
66

77
- API version: 3.0
8-
- Package version: 21.7.0
8+
- Package version: 21.9.0
99

1010
## Demo applications
1111

aspose_barcode_cloud/api/barcode_api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1076,7 +1076,7 @@ def post_barcode_recognize_from_url_or_content_with_http_info(self, **kwargs):
10761076

10771077
# HTTP header "Content-Type"
10781078
header_params["Content-Type"] = self.api_client.select_header_content_type(
1079-
["multipart/form-data", "application/octet-stream"]
1079+
["multipart/form-data", "application/x-www-form-urlencoded", "application/octet-stream"]
10801080
)
10811081

10821082
# Authentication setting
@@ -1557,7 +1557,7 @@ def put_barcode_generate_file_with_http_info(self, name, type, text, **kwargs):
15571557

15581558
# HTTP header "Content-Type"
15591559
header_params["Content-Type"] = self.api_client.select_header_content_type(
1560-
["application/json", "application/xml", "multipart/form-data"]
1560+
["multipart/form-data", "application/x-www-form-urlencoded", "application/json", "application/xml"]
15611561
)
15621562

15631563
# Authentication setting

aspose_barcode_cloud/api_client.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,12 @@ def __init__(self, configuration=None, header_name=None, header_value=None, cook
8282
# Use the pool property to lazily initialize the ThreadPool.
8383
self._pool = None
8484
self.rest_client = rest.RESTClientObject(configuration)
85-
self.default_headers = {"x-aspose-client": "python sdk", "x-aspose-client-version": "21.7.0"}
85+
self.default_headers = {"x-aspose-client": "python sdk", "x-aspose-client-version": "21.9.0"}
8686
if header_name is not None:
8787
self.default_headers[header_name] = header_value
8888
self.cookie = cookie
8989
# Set default User-Agent.
90-
self.user_agent = "Aspose-Barcode-SDK/21.7.0/python"
90+
self.user_agent = "Aspose-Barcode-SDK/21.9.0/python"
9191

9292
def __del__(self):
9393
if self._pool is not None:
@@ -138,8 +138,9 @@ def __call_api(
138138
if self.cookie:
139139
header_params["Cookie"] = self.cookie
140140
if header_params:
141-
header_params = self.sanitize_for_serialization(header_params)
142-
header_params = dict(self.parameters_to_tuples(header_params, collection_formats))
141+
header_params = dict(
142+
self.parameters_to_tuples(self.sanitize_for_serialization(header_params), collection_formats)
143+
)
143144

144145
# path parameters
145146
if path_params:
@@ -156,9 +157,9 @@ def __call_api(
156157

157158
# post parameters
158159
if post_params or files:
159-
post_params = self.prepare_post_parameters(post_params, files)
160-
post_params = self.sanitize_for_serialization(post_params)
161-
post_params = self.parameters_to_tuples(post_params, collection_formats)
160+
post_params = self.parameters_to_tuples(
161+
self.sanitize_for_serialization(self.prepare_post_parameters(post_params, files)), collection_formats
162+
)
162163

163164
# auth setting
164165
self.update_params_for_auth(header_params, query_params, auth_settings)

aspose_barcode_cloud/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ def to_debug_report(self):
285285
"OS: {env}\n"
286286
"Python Version: {pyversion}\n"
287287
"Version of the API: 3.0\n"
288-
"SDK Package Version: 21.7.0".format(env=sys.platform, pyversion=sys.version)
288+
"SDK Package Version: 21.9.0".format(env=sys.platform, pyversion=sys.version)
289289
)
290290

291291
@staticmethod

docs/BarcodeApi.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ Name | Type | Description | Notes
361361

362362
### HTTP request headers
363363

364-
- **Content-Type**: multipart/form-data, application/octet-stream
364+
- **Content-Type**: multipart/form-data, application/x-www-form-urlencoded, application/octet-stream
365365
- **Accept**: application/json
366366

367367
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@@ -535,7 +535,7 @@ Name | Type | Description | Notes
535535

536536
### HTTP request headers
537537

538-
- **Content-Type**: application/json, application/xml, multipart/form-data
538+
- **Content-Type**: multipart/form-data, application/x-www-form-urlencoded, application/json, application/xml
539539
- **Accept**: application/json
540540

541541
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
from setuptools import setup, find_packages
3030

3131
NAME = "aspose-barcode-cloud"
32-
VERSION = "21.7.0"
32+
VERSION = "21.9.0"
3333
# To install the library, run the following
3434
#
3535
# python setup.py install

tests/test_barcode_api.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ def test_post_barcode_recognize_from_url_or_content(self):
7171
type=DecodeBarcodeType.PDF417, preset=PresetType.HIGHPERFORMANCE, image=self.test_filename
7272
)
7373

74+
self.assertIsNotNone(response and response.barcodes)
7475
self.assertEqual(1, len(response.barcodes))
7576
barcode = response.barcodes[0]
7677
self.assertEqual("Pdf417", barcode.type)

tests/test_generate_and_recognize.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ def test_generate_and_recognize(self):
2929
finally:
3030
os.remove(temp_filename)
3131

32+
self.assertIsNotNone(recognized and recognized.barcodes)
3233
self.assertEqual(1, len(recognized.barcodes))
3334
barcode = recognized.barcodes[0]
3435
self.assertEqual(DecodeBarcodeType.QR, barcode.type)

tests/test_headers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ def test_default_headers(self):
2424

2525
self.assertEqual(1, self.rest_client_mock.GET.call_count)
2626
headers = self.rest_client_mock.GET.call_args[1]["headers"]
27-
self.assertEqual("Aspose-Barcode-SDK/21.7.0/python", headers["User-Agent"])
27+
self.assertEqual("Aspose-Barcode-SDK/21.9.0/python", headers["User-Agent"])
2828
self.assertEqual("python sdk", headers["x-aspose-client"])
29-
self.assertEqual("21.7.0", headers["x-aspose-client-version"])
29+
self.assertEqual("21.9.0", headers["x-aspose-client-version"])
3030

3131
def test_header_override(self):
3232
api_client = ApiClient(self.local_config, header_name="x-aspose-client", header_value="some custom sdk")

0 commit comments

Comments
 (0)