Skip to content

Commit edfdbf7

Browse files
committed
Release Aspose.Cells Cloud SDK 22.3
1 parent 6fdd99d commit edfdbf7

File tree

6 files changed

+150
-10
lines changed

6 files changed

+150
-10
lines changed

README.md

+3-6
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.2)
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)
22

33

44
# Python SDK for Spreadsheet Processing in Cloud
@@ -21,13 +21,10 @@ 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.2
24+
## Feature & Enhancements in Version 22.3
2525

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

27-
- Update return value for the DeleteUnprotectWorksheet API on Aspose.Cells Cloud.
28-
- Update return value for the PutProtectWorksheet API on Aspose.Cells Cloud.
29-
- Update return value for the PostSetCellHtmlString API on Aspose.Cells Cloud.
30-
- Update return value for the PostUpdateWorksheetProperty API on Aspose.Cells Cloud.
3128

3229

3330
## Read & Write Spreadsheet Formats

asposecellscloud/api_client.py

+1-1
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.2/python'
86+
self.user_agent = 'Swagger-Codegen/22.3/python'
8787

8888
@property
8989
def user_agent(self):

asposecellscloud/apis/cells_api.py

+127
Original file line numberDiff line numberDiff line change
@@ -25890,6 +25890,133 @@ def cells_workbook_post_autofit_workbook_rows_with_http_info(self, name, **kwarg
2589025890
_request_timeout=params.get('_request_timeout'),
2589125891
collection_formats=collection_formats)
2589225892

25893+
def cells_workbook_post_digital_signature(self, name, digitalsignaturefile, password, **kwargs):
25894+
"""
25895+
Add digital signature.
25896+
This method makes a synchronous HTTP request by default. To make an
25897+
asynchronous HTTP request, please define a `callback` function
25898+
to be invoked when receiving the response.
25899+
>>> def callback_function(response):
25900+
>>> pprint(response)
25901+
>>>
25902+
>>> thread = api.cells_workbook_post_digital_signature(name, digitalsignaturefile, password, callback=callback_function)
25903+
25904+
:param callback function: The callback function
25905+
for asynchronous request. (optional)
25906+
:param str name: Workbook name. (required)
25907+
:param str digitalsignaturefile: Digital signature file parameters. (required)
25908+
:param str password: (required)
25909+
:param str folder: Workbook's folder.
25910+
:param str storage_name: storage name.
25911+
:return: CellsCloudResponse
25912+
If the method is called asynchronously,
25913+
returns the request thread.
25914+
"""
25915+
kwargs['_return_http_data_only'] = True
25916+
self.check_access_token()
25917+
if kwargs.get('callback'):
25918+
return self.cells_workbook_post_digital_signature_with_http_info(name, digitalsignaturefile, password, **kwargs)
25919+
else:
25920+
(data) = self.cells_workbook_post_digital_signature_with_http_info(name, digitalsignaturefile, password, **kwargs)
25921+
return data
25922+
25923+
def cells_workbook_post_digital_signature_with_http_info(self, name, digitalsignaturefile, password, **kwargs):
25924+
"""
25925+
Add digital signature.
25926+
This method makes a synchronous HTTP request by default. To make an
25927+
asynchronous HTTP request, please define a `callback` function
25928+
to be invoked when receiving the response.
25929+
>>> def callback_function(response):
25930+
>>> pprint(response)
25931+
>>>
25932+
>>> thread = api.cells_workbook_post_digital_signature_with_http_info(name, digitalsignaturefile, password, callback=callback_function)
25933+
25934+
:param callback function: The callback function
25935+
for asynchronous request. (optional)
25936+
:param str name: Workbook name. (required)
25937+
:param str digitalsignaturefile: Digital signature file parameters. (required)
25938+
:param str password: (required)
25939+
:param str folder: Workbook's folder.
25940+
:param str storage_name: storage name.
25941+
:return: CellsCloudResponse
25942+
If the method is called asynchronously,
25943+
returns the request thread.
25944+
"""
25945+
25946+
all_params = ['name', 'digitalsignaturefile', 'password', 'folder', 'storage_name']
25947+
all_params.append('callback')
25948+
all_params.append('_return_http_data_only')
25949+
all_params.append('_preload_content')
25950+
all_params.append('_request_timeout')
25951+
25952+
params = locals()
25953+
for key, val in iteritems(params['kwargs']):
25954+
if key not in all_params:
25955+
raise TypeError(
25956+
"Got an unexpected keyword argument '%s'"
25957+
" to method cells_workbook_post_digital_signature" % key
25958+
)
25959+
params[key] = val
25960+
del params['kwargs']
25961+
# verify the required parameter 'name' is set
25962+
if ('name' not in params) or (params['name'] is None):
25963+
raise ValueError("Missing the required parameter `name` when calling `cells_workbook_post_digital_signature`")
25964+
# verify the required parameter 'digitalsignaturefile' is set
25965+
if ('digitalsignaturefile' not in params) or (params['digitalsignaturefile'] is None):
25966+
raise ValueError("Missing the required parameter `digitalsignaturefile` when calling `cells_workbook_post_digital_signature`")
25967+
# verify the required parameter 'password' is set
25968+
if ('password' not in params) or (params['password'] is None):
25969+
raise ValueError("Missing the required parameter `password` when calling `cells_workbook_post_digital_signature`")
25970+
25971+
25972+
collection_formats = {}
25973+
25974+
path_params = {}
25975+
if 'name' in params:
25976+
path_params['name'] = params['name']
25977+
25978+
query_params = []
25979+
if 'digitalsignaturefile' in params:
25980+
query_params.append(('digitalsignaturefile', params['digitalsignaturefile']))
25981+
if 'password' in params:
25982+
query_params.append(('password', params['password']))
25983+
if 'folder' in params:
25984+
query_params.append(('folder', params['folder']))
25985+
if 'storage_name' in params:
25986+
query_params.append(('storageName', params['storage_name']))
25987+
25988+
header_params = {}
25989+
25990+
form_params = []
25991+
local_var_files = {}
25992+
25993+
body_params = None
25994+
# HTTP header `Accept`
25995+
header_params['Accept'] = self.api_client.\
25996+
select_header_accept(['application/json'])
25997+
25998+
# HTTP header `Content-Type`
25999+
header_params['Content-Type'] = self.api_client.\
26000+
select_header_content_type(['application/json'])
26001+
26002+
# Authentication setting
26003+
auth_settings = []
26004+
26005+
return self.api_client.call_api('/cells/{name}/digitalsignature', 'POST',
26006+
path_params,
26007+
query_params,
26008+
header_params,
26009+
body=body_params,
26010+
post_params=form_params,
26011+
files=local_var_files,
26012+
response_type='CellsCloudResponse',
26013+
auth_settings=auth_settings,
26014+
callback=params.get('callback'),
26015+
_return_http_data_only=params.get('_return_http_data_only'),
26016+
_preload_content=params.get('_preload_content', True),
26017+
_request_timeout=params.get('_request_timeout'),
26018+
collection_formats=collection_formats)
26019+
2589326020
def cells_workbook_post_encrypt_document(self, name, **kwargs):
2589426021
"""
2589526022
Encript document.

asposecellscloud/configuration.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,6 @@ def to_debug_report(self):
254254
return "Python SDK Debug Report:\n"\
255255
"OS: {env}\n"\
256256
"Python Version: {pyversion}\n"\
257-
"Version of the API: 22.2\n"\
258-
"SDK Package Version: 22.2".\
257+
"Version of the API: 22.3\n"\
258+
"SDK Package Version: 22.3".\
259259
format(env=sys.platform, pyversion=sys.version)

setup.py

+1-1
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.2"
7+
VERSION = "22.3"
88
# To install the library, run the following
99
#
1010
# python setup.py install

test/test_cells_workbook_api.py

+16
Original file line numberDiff line numberDiff line change
@@ -665,5 +665,21 @@ def test_cells_workbook_pagecount(self):
665665
result = self.api.cells_workbook_get_page_count(name, folder=folder)
666666
self.assertGreater(result,0)
667667
pass
668+
def test_cells_workbook_post_digital_signature(self):
669+
"""
670+
Test case for test_cells_workbook_post_digital_signature
671+
672+
Set workbook background image.
673+
"""
674+
name = "Book1.xlsx"
675+
pfx_name ='roywang.pfx'
676+
password = '123456'
677+
folder = "PythonTest"
678+
result = AuthUtil.Ready(self.api, name, folder)
679+
result = AuthUtil.Ready(self.api, pfx_name, "")
680+
self.assertTrue(len(result.uploaded)>0)
681+
result = self.api.cells_workbook_post_digital_signature(name, pfx_name, password,folder=folder)
682+
self.assertEqual(result.code,200)
683+
pass
668684
if __name__ == '__main__':
669685
unittest.main()

0 commit comments

Comments
 (0)