Skip to content

Commit f30e45e

Browse files
committed
20220418 update : update four api.
1 parent edfdbf7 commit f30e45e

File tree

8 files changed

+83
-13
lines changed

8 files changed

+83
-13
lines changed

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![](https://img.shields.io/badge/REST%20API-v3.0-lightgrey) ![PyPI](https://img.shields.io/pypi/v/asposecellscloud) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/asposecellscloud) ![PyPI - Downloads](https://img.shields.io/pypi/dm/asposecellscloud) [![GitHub license](https://img.shields.io/github/license/aspose-cells-cloud/aspose-cells-cloud-python)](https://github.com/aspose-cells-cloud/aspose-cells-cloud-python/blob/master/LICENSE) ![GitHub commits since latest release (by date)](https://img.shields.io/github/commits-since/aspose-cells-cloud/aspose-cells-cloud-python/22.3)
1+
![](https://img.shields.io/badge/REST%20API-v3.0-lightgrey) ![PyPI](https://img.shields.io/pypi/v/asposecellscloud) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/asposecellscloud) ![PyPI - Downloads](https://img.shields.io/pypi/dm/asposecellscloud) [![GitHub license](https://img.shields.io/github/license/aspose-cells-cloud/aspose-cells-cloud-python)](https://github.com/aspose-cells-cloud/aspose-cells-cloud-python/blob/master/LICENSE) ![GitHub commits since latest release (by date)](https://img.shields.io/github/commits-since/aspose-cells-cloud/aspose-cells-cloud-python/22.4)
22

33

44
# Python SDK for Spreadsheet Processing in Cloud
@@ -21,9 +21,13 @@ Python Cloud SDK wraps Aspose.Cells REST API so you could seamlessly integrate M
2121
- Convert worksheets to PDF, XPS & SVG formats.
2222
- Inter-convert files to popular Excel formats.
2323

24-
## Feature & Enhancements in Version 22.3
24+
## Feature & Enhancements in Version 22.4
25+
26+
- Export API adds extended query parameters.
27+
- Convert API adds extended query parameters.
28+
- SaveAs API adds extended query parameters.
29+
- Get Workbook API adds extended query parameters.
2530

26-
- Add new API about adding digital signature for cloud file.
2731

2832

2933

asposecellscloud/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def __init__(self, host=None, header_name=None, header_value=None, cookie=None):
8383
self.host = host
8484
self.cookie = cookie
8585
# Set default User-Agent.
86-
self.user_agent = 'Swagger-Codegen/22.3/python'
86+
self.user_agent = 'Swagger-Codegen/22.4/python'
8787

8888
@property
8989
def user_agent(self):

asposecellscloud/apis/cells_api.py

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22025,7 +22025,7 @@ def cells_save_as_post_document_save_as_with_http_info(self, name, **kwargs):
2202522025
returns the request thread.
2202622026
"""
2202722027

22028-
all_params = ['name', 'save_options', 'newfilename', 'is_auto_fit_rows', 'is_auto_fit_columns', 'folder', 'storage_name', 'out_storage_name']
22028+
all_params = ['name', 'save_options', 'newfilename', 'is_auto_fit_rows', 'is_auto_fit_columns', 'folder', 'storage_name', 'out_storage_name','extended_query_parameters']
2202922029
all_params.append('callback')
2203022030
all_params.append('_return_http_data_only')
2203122031
all_params.append('_preload_content')
@@ -22064,7 +22064,9 @@ def cells_save_as_post_document_save_as_with_http_info(self, name, **kwargs):
2206422064
query_params.append(('storageName', params['storage_name']))
2206522065
if 'out_storage_name' in params:
2206622066
query_params.append(('outStorageName', params['out_storage_name']))
22067-
22067+
if 'extended_query_parameters' in params:
22068+
for key , value in params['extended_query_parameters'].items():
22069+
query_params.append((key, value))
2206822070
header_params = {}
2206922071

2207022072
form_params = []
@@ -24868,7 +24870,7 @@ def cells_workbook_get_workbook_with_http_info(self, name, **kwargs):
2486824870
returns the request thread.
2486924871
"""
2487024872

24871-
all_params = ['name', 'password', 'format', 'is_auto_fit', 'only_save_table', 'folder', 'storage_name', 'out_path', 'out_storage_name']
24873+
all_params = ['name', 'password', 'format', 'is_auto_fit', 'only_save_table', 'folder', 'storage_name', 'out_path', 'out_storage_name','extended_query_parameters']
2487224874
all_params.append('callback')
2487324875
all_params.append('_return_http_data_only')
2487424876
all_params.append('_preload_content')
@@ -24911,7 +24913,10 @@ def cells_workbook_get_workbook_with_http_info(self, name, **kwargs):
2491124913
query_params.append(('outPath', params['out_path']))
2491224914
if 'out_storage_name' in params:
2491324915
query_params.append(('outStorageName', params['out_storage_name']))
24914-
24916+
if 'extended_query_parameters' in params:
24917+
for key , value in params['extended_query_parameters'].items():
24918+
query_params.append((key, value))
24919+
2491524920
header_params = {}
2491624921

2491724922
form_params = []
@@ -27297,7 +27302,7 @@ def cells_workbook_put_convert_workbook_with_http_info(self, file, **kwargs):
2729727302
returns the request thread.
2729827303
"""
2729927304

27300-
all_params = ['file', 'format', 'password', 'out_path', 'storage_name']
27305+
all_params = ['file', 'format', 'password', 'out_path', 'storage_name','extended_query_parameters']
2730127306
all_params.append('callback')
2730227307
all_params.append('_return_http_data_only')
2730327308
all_params.append('_preload_content')
@@ -27330,7 +27335,10 @@ def cells_workbook_put_convert_workbook_with_http_info(self, file, **kwargs):
2733027335
query_params.append(('outPath', params['out_path']))
2733127336
if 'storage_name' in params:
2733227337
query_params.append(('storageName', params['storage_name']))
27333-
27338+
if 'extended_query_parameters' in params:
27339+
for key , value in params['extended_query_parameters'].items():
27340+
query_params.append((key, value))
27341+
2733427342
header_params = {}
2733527343

2733627344
form_params = []
@@ -27574,6 +27582,7 @@ def cells_workbook_put_workbook_background_with_http_info(self, name, png, **kwa
2757427582
if 'storage_name' in params:
2757527583
query_params.append(('storageName', params['storage_name']))
2757627584

27585+
2757727586
header_params = {}
2757827587

2757927588
form_params = []

asposecellscloud/apis/light_cells_api.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ def post_export_with_http_info(self, file, object_type, format, **kwargs):
587587
returns the request thread.
588588
"""
589589

590-
all_params = ['file', 'object_type', 'format']
590+
all_params = ['file', 'object_type', 'format','extended_query_parameters']
591591
all_params.append('callback')
592592
all_params.append('_return_http_data_only')
593593
all_params.append('_preload_content')
@@ -622,7 +622,10 @@ def post_export_with_http_info(self, file, object_type, format, **kwargs):
622622
query_params.append(('objectType', params['object_type']))
623623
if 'format' in params:
624624
query_params.append(('format', params['format']))
625-
625+
if 'extended_query_parameters' in params:
626+
for key , value in params['extended_query_parameters'].items():
627+
query_params.append((key, value))
628+
626629
header_params = {}
627630

628631
form_params = []

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from setuptools import setup, find_packages
55

66
NAME = "asposecellscloud"
7-
VERSION = "22.3"
7+
VERSION = "22.4"
88
# To install the library, run the following
99
#
1010
# python setup.py install

test/test_cells_export_object_api.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,5 +101,11 @@ def test_cells_export_workbook_ods(self):
101101
result = self.api.post_export({ "Book1.xlsx" :Book1, "myDocument.xlsx":myDocument},"workbook", "ods")
102102
self.assertIsNotNone(result)
103103
pass
104+
def test_cells_export_workbook_pdf_extend(self):
105+
Book1 = os.path.dirname(os.path.realpath(__file__)) + "/../TestData/" + "Book1.xlsx"
106+
myDocument = os.path.dirname(os.path.realpath(__file__)) + "/../TestData/" + "myDocument.xlsx"
107+
result = self.api.post_export({ "Book1.xlsx" :Book1, "myDocument.xlsx":myDocument},"workbook", "ods" , extended_query_parameters ={"OnePagePerSheet":"false"})
108+
self.assertIsNotNone(result)
109+
pass
104110
if __name__ == '__main__':
105111
unittest.main()

test/test_cells_save_as_api.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,24 @@ def test_cells_save_as_post_document_save_as_pdf_dropbox(self):
117117
self.assertEqual(result.code,200)
118118
pass
119119

120+
def test_cells_save_as_post_document_save_as_pdf_extend(self):
121+
"""
122+
Test case for cells_save_as_post_document_save_as
120123
124+
Convert document and save result to storage.
125+
"""
126+
name ='Book1.xlsx'
127+
saveOptions = PdfSaveOptions()
128+
saveOptions.OnePagePerSheet = True
129+
saveOptions.SaveFormat = "pdf"
130+
newfilename = "newbook.pdf"
131+
isAutoFitRows= True
132+
isAutoFitColumns= True
133+
folder = "PythonTest"
134+
AuthUtil.Ready(self.api, name, folder)
135+
136+
result = self.api.cells_save_as_post_document_save_as(name, save_options=saveOptions, newfilename=(folder +'/' + newfilename),is_auto_fit_rows=isAutoFitRows, is_auto_fit_columns=isAutoFitColumns,folder=folder, extended_query_parameters ={"OnePagePerSheet":"false"})
137+
self.assertEqual(result.code,200)
138+
pass
121139
if __name__ == '__main__':
122140
unittest.main()

test/test_cells_workbook_api.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,21 @@ def test_cells_workbook_get_workbook_format(self):
154154
result = self.api.cells_workbook_get_workbook(name,password=password,format="xlsx", is_auto_fit=isAutoFit, folder=folder)
155155
# self.assertEqual(result.code,200)
156156
pass
157+
def test_cells_workbook_get_workbook_extend(self):
158+
"""
159+
Test case for cells_workbook_get_workbook with format
160+
161+
Read workbook info or export.
162+
"""
163+
name ='Book1.xlsx'
164+
folder = "PythonTest"
165+
password = None
166+
isAutoFit = True
167+
result = AuthUtil.Ready(self.api, name, folder)
168+
self.assertTrue(len(result.uploaded)>0)
169+
result = self.api.cells_workbook_get_workbook(name,password=password,format="pdf", is_auto_fit=isAutoFit, folder=folder, extended_query_parameters ={"OnePagePerSheet":"false"})
170+
# self.assertEqual(result.code,200)
171+
pass
157172
def test_cells_workbook_get_workbook_JSON(self):
158173
"""
159174
Test case for cells_workbook_get_workbook with format
@@ -562,7 +577,22 @@ def test_cells_workbook_put_convert_workbook(self):
562577
result = self.api.cells_workbook_put_convert_workbook(fullfilename,format=format)
563578
# self.assertEqual(result.code,200)
564579
pass
580+
def test_cells_workbook_put_convert_workbook_extend(self):
581+
"""
582+
Test case for cells_workbook_put_convert_workbook
565583
584+
Convert workbook from request content to some format.
585+
"""
586+
fullfilename = os.path.dirname(os.path.realpath(__file__)) + "/../TestData/" + "Book1.xlsx"
587+
f = open(fullfilename, 'rb')
588+
workbook = f.read()
589+
f.close()
590+
format ='pdf'
591+
password = None
592+
outPath = None
593+
result = self.api.cells_workbook_put_convert_workbook(fullfilename,format=format, extended_query_parameters ={"OnePagePerSheet":"false"})
594+
# self.assertEqual(result.code,200)
595+
pass
566596
def test_cells_workbook_put_convert_workbook_to_other_storage(self):
567597
"""
568598
Test case for cells_workbook_put_convert_workbook

0 commit comments

Comments
 (0)