Skip to content

Commit acdba99

Browse files
Merge remote-tracking branch 'origin/master' into release
2 parents 5df086b + c3712bc commit acdba99

15 files changed

+538
-16
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ Python Cloud SDK wraps Aspose.Words Cloud API so you could seamlessly integrate
1616
- [Convert a document to desired file format](https://docs.aspose.cloud/display/wordscloud/Convert+Document+to+Destination+Format+with+Detailed+Settings+and+Save+Result+to+Storage) along with detailed settings.
1717
- Convert an encrypted PDF document into Word document format.
1818

19+
## Enhancements in Version 24.4
20+
21+
- Added the 'MergeWithNext' method to merge a section with the next one.
22+
- Added the 'LockAspectRatio' propperty for DrawingObjectInsert and DrawingObjectUpdate methods.
23+
24+
1925
## Enhancements in Version 24.3
2026

2127
- Added support for 'RemoveEmptyCells' option for the 'Cleanup' parameter in the insert 'MailMerge' API method.

asposewordscloud/api_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,12 +347,12 @@ def __init__(self, configuration=None, header_name=None, header_value=None,
347347

348348
self.pool = None
349349
self.rest_client = rest.RESTClientObject(configuration)
350-
self.default_headers = {'x-aspose-client': 'python sdk', 'x-aspose-client-version': '24.3'}
350+
self.default_headers = {'x-aspose-client': 'python sdk', 'x-aspose-client-version': '24.4'}
351351
if header_name is not None:
352352
self.default_headers[header_name] = header_value
353353
self.cookie = cookie
354354
# Set default User-Agent.
355-
self.user_agent = 'python sdk 24.3'
355+
self.user_agent = 'python sdk 24.4'
356356

357357
def __del__(self):
358358
if not self.pool is None:

asposewordscloud/apis/words_api.py

Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20487,6 +20487,169 @@ def load_web_document_with_http_info(self, request, **kwargs): # noqa: E501
2048720487
collection_formats=http_params['collection_formats']))
2048820488

2048920489

20490+
def merge_with_next(self, request, **kwargs): # noqa: E501
20491+
"""Merge the section with the next one. # noqa: E501
20492+
20493+
This method makes a synchronous HTTP request by default. To make an
20494+
asynchronous HTTP request, please pass is_async=True
20495+
20496+
:param is_async bool
20497+
:param name str : The filename of the input document. (required)
20498+
:param section_index int : The index of the section. (required)
20499+
:param folder str : Original document folder.
20500+
:param storage str : Original document storage.
20501+
:param load_encoding str : Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML.
20502+
:param password str : Password of protected Word document. Use the parameter to pass a password via SDK. SDK encrypts it automatically. We don't recommend to use the parameter to pass a plain password for direct call of API.
20503+
:param encrypted_password str : Password of protected Word document. Use the parameter to pass an encrypted password for direct calls of API. See SDK code for encyption details.
20504+
:param dest_file_name str : Result path of the document after the operation. If this parameter is omitted then result of the operation will be saved as the source document.
20505+
:param revision_author str : Initials of the author to use for revisions.If you set this parameter and then make some changes to the document programmatically, save the document and later open the document in MS Word you will see these changes as revisions.
20506+
:param revision_date_time str : The date and time to use for revisions.
20507+
:return: None
20508+
If the method is called asynchronously,
20509+
returns the request thread.
20510+
"""
20511+
try:
20512+
if kwargs.get('is_async'):
20513+
return self.merge_with_next_with_http_info(request, **kwargs) # noqa: E501
20514+
data = self.merge_with_next_with_http_info(request, **kwargs) # noqa: E501
20515+
return data
20516+
except ApiException as e:
20517+
if e.status == 401:
20518+
self.api_client.request_token()
20519+
if kwargs.get('is_async'):
20520+
return self.merge_with_next_with_http_info(request, **kwargs) # noqa: E501
20521+
data = self.merge_with_next_with_http_info(request, **kwargs) # noqa: E501
20522+
return data
20523+
20524+
def merge_with_next_with_http_info(self, request, **kwargs): # noqa: E501
20525+
"""Merge the section with the next one. # noqa: E501
20526+
20527+
This method makes a synchronous HTTP request by default. To make an
20528+
asynchronous HTTP request, please pass is_async=True
20529+
20530+
:param is_async bool
20531+
:param request MergeWithNextRequest object with parameters
20532+
:return: None
20533+
If the method is called asynchronously,
20534+
returns the request thread.
20535+
"""
20536+
20537+
params = locals()
20538+
params['is_async'] = ''
20539+
params['_preload_content'] = True
20540+
params['_request_timeout'] = self.timeout
20541+
for key, val in six.iteritems(params['kwargs']):
20542+
if key not in params:
20543+
raise TypeError(
20544+
"Got an unexpected keyword argument '%s'"
20545+
" to method merge_with_next" % key
20546+
)
20547+
params[key] = val
20548+
del params['kwargs']
20549+
http_params = request.create_http_request(self.api_client, self)
20550+
20551+
# Authentication setting
20552+
auth_settings = ['JWT'] # noqa: E501
20553+
20554+
self.api_client.handle_password(http_params, self)
20555+
20556+
return request.deserialize_response(self.api_client, self.api_client.call_api(
20557+
http_params['path'],
20558+
http_params['method'],
20559+
http_params['query_params'],
20560+
http_params['header_params'],
20561+
body=None,
20562+
post_params=http_params['form_params'],
20563+
response_type=http_params['response_type'], # noqa: E501
20564+
auth_settings=auth_settings,
20565+
is_async=params.get('is_async'),
20566+
_preload_content=params.get('_preload_content', True),
20567+
_request_timeout=params.get('_request_timeout'),
20568+
collection_formats=http_params['collection_formats']))
20569+
20570+
20571+
def merge_with_next_online(self, request, **kwargs): # noqa: E501
20572+
"""Merge the section with the next one. # noqa: E501
20573+
20574+
This method makes a synchronous HTTP request by default. To make an
20575+
asynchronous HTTP request, please pass is_async=True
20576+
20577+
:param is_async bool
20578+
:param document file : The document. (required)
20579+
:param section_index int : The index of the section. (required)
20580+
:param load_encoding str : Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML.
20581+
:param password str : Password of protected Word document. Use the parameter to pass a password via SDK. SDK encrypts it automatically. We don't recommend to use the parameter to pass a plain password for direct call of API.
20582+
:param encrypted_password str : Password of protected Word document. Use the parameter to pass an encrypted password for direct calls of API. See SDK code for encyption details.
20583+
:param dest_file_name str : Result path of the document after the operation. If this parameter is omitted then result of the operation will be saved as the source document.
20584+
:param revision_author str : Initials of the author to use for revisions.If you set this parameter and then make some changes to the document programmatically, save the document and later open the document in MS Word you will see these changes as revisions.
20585+
:param revision_date_time str : The date and time to use for revisions.
20586+
:return: files_collection
20587+
If the method is called asynchronously,
20588+
returns the request thread.
20589+
"""
20590+
try:
20591+
if kwargs.get('is_async'):
20592+
return self.merge_with_next_online_with_http_info(request, **kwargs) # noqa: E501
20593+
data = self.merge_with_next_online_with_http_info(request, **kwargs) # noqa: E501
20594+
return data
20595+
except ApiException as e:
20596+
if e.status == 401:
20597+
self.api_client.request_token()
20598+
if kwargs.get('is_async'):
20599+
return self.merge_with_next_online_with_http_info(request, **kwargs) # noqa: E501
20600+
data = self.merge_with_next_online_with_http_info(request, **kwargs) # noqa: E501
20601+
return data
20602+
20603+
def merge_with_next_online_with_http_info(self, request, **kwargs): # noqa: E501
20604+
"""Merge the section with the next one. # noqa: E501
20605+
20606+
This method makes a synchronous HTTP request by default. To make an
20607+
asynchronous HTTP request, please pass is_async=True
20608+
20609+
:param is_async bool
20610+
:param request MergeWithNextOnlineRequest object with parameters
20611+
:return: files_collection
20612+
If the method is called asynchronously,
20613+
returns the request thread.
20614+
"""
20615+
20616+
params = locals()
20617+
params['is_async'] = ''
20618+
params['_preload_content'] = True
20619+
params['_request_timeout'] = self.timeout
20620+
for key, val in six.iteritems(params['kwargs']):
20621+
if key not in params:
20622+
raise TypeError(
20623+
"Got an unexpected keyword argument '%s'"
20624+
" to method merge_with_next_online" % key
20625+
)
20626+
params[key] = val
20627+
del params['kwargs']
20628+
http_params = request.create_http_request(self.api_client, self)
20629+
20630+
# HTTP header `Accept`
20631+
http_params['header_params']['Accept'] = self.api_client.select_header_accept(
20632+
['application/xml', 'application/json']) # noqa: E501
20633+
# Authentication setting
20634+
auth_settings = ['JWT'] # noqa: E501
20635+
20636+
self.api_client.handle_password(http_params, self)
20637+
20638+
return request.deserialize_response(self.api_client, self.api_client.call_api(
20639+
http_params['path'],
20640+
http_params['method'],
20641+
http_params['query_params'],
20642+
http_params['header_params'],
20643+
body=None,
20644+
post_params=http_params['form_params'],
20645+
response_type=http_params['response_type'], # noqa: E501
20646+
auth_settings=auth_settings,
20647+
is_async=params.get('is_async'),
20648+
_preload_content=params.get('_preload_content', True),
20649+
_request_timeout=params.get('_request_timeout'),
20650+
collection_formats=http_params['collection_formats']))
20651+
20652+
2049020653
def move_file(self, request, **kwargs): # noqa: E501
2049120654
"""Move file. # noqa: E501
2049220655

asposewordscloud/configuration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,6 @@ def to_debug_report(self):
262262
return "Python SDK Debug Report:\n"\
263263
"OS: {env}\n"\
264264
"Python Version: {pyversion}\n"\
265-
"Version of the API: 24.3\n"\
266-
"SDK Package Version: 24.3".\
265+
"Version of the API: 24.4\n"\
266+
"SDK Package Version: 24.4".\
267267
format(env=sys.platform, pyversion=sys.version)

asposewordscloud/models/drawing_object_insert.py

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ class DrawingObjectInsert(object):
5050
'top': 'float',
5151
'width': 'float',
5252
'height': 'float',
53-
'wrap_type': 'str'
53+
'wrap_type': 'str',
54+
'aspect_ratio_locked': 'bool'
5455
}
5556

5657
attribute_map = {
@@ -61,10 +62,11 @@ class DrawingObjectInsert(object):
6162
'top': 'Top',
6263
'width': 'Width',
6364
'height': 'Height',
64-
'wrap_type': 'WrapType'
65+
'wrap_type': 'WrapType',
66+
'aspect_ratio_locked': 'AspectRatioLocked'
6567
}
6668

67-
def __init__(self, position=None, relative_horizontal_position=None, left=None, relative_vertical_position=None, top=None, width=None, height=None, wrap_type=None): # noqa: E501
69+
def __init__(self, position=None, relative_horizontal_position=None, left=None, relative_vertical_position=None, top=None, width=None, height=None, wrap_type=None, aspect_ratio_locked=None): # noqa: E501
6870
"""DrawingObjectInsert - a model defined in Swagger""" # noqa: E501
6971

7072
self._position = None
@@ -75,6 +77,7 @@ def __init__(self, position=None, relative_horizontal_position=None, left=None,
7577
self._width = None
7678
self._height = None
7779
self._wrap_type = None
80+
self._aspect_ratio_locked = None
7881
self.discriminator = None
7982

8083
if position is not None:
@@ -93,6 +96,8 @@ def __init__(self, position=None, relative_horizontal_position=None, left=None,
9396
self.height = height
9497
if wrap_type is not None:
9598
self.wrap_type = wrap_type
99+
if aspect_ratio_locked is not None:
100+
self.aspect_ratio_locked = aspect_ratio_locked
96101

97102
@property
98103
def position(self):
@@ -294,6 +299,28 @@ def wrap_type(self, wrap_type):
294299
else:
295300
self._wrap_type = allowed_values[int(wrap_type) if six.PY3 else long(wrap_type)]
296301

302+
@property
303+
def aspect_ratio_locked(self):
304+
"""Gets the aspect_ratio_locked of this DrawingObjectInsert. # noqa: E501
305+
306+
Gets or sets a value indicating whether AspectRatioLocked option on or off. # noqa: E501
307+
308+
:return: The aspect_ratio_locked of this DrawingObjectInsert. # noqa: E501
309+
:rtype: bool
310+
"""
311+
return self._aspect_ratio_locked
312+
313+
@aspect_ratio_locked.setter
314+
def aspect_ratio_locked(self, aspect_ratio_locked):
315+
"""Sets the aspect_ratio_locked of this DrawingObjectInsert.
316+
317+
Gets or sets a value indicating whether AspectRatioLocked option on or off. # noqa: E501
318+
319+
:param aspect_ratio_locked: The aspect_ratio_locked of this DrawingObjectInsert. # noqa: E501
320+
:type: bool
321+
"""
322+
self._aspect_ratio_locked = aspect_ratio_locked
323+
297324

298325
def extract_files_content(self, filesContentResult):
299326
"""Append the file content result list"""
@@ -326,6 +353,7 @@ def validate(self):
326353

327354

328355

356+
329357
def to_dict(self):
330358
"""Returns the model properties as a dict"""
331359
result = {}

asposewordscloud/models/drawing_object_update.py

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ class DrawingObjectUpdate(object):
4949
'top': 'float',
5050
'width': 'float',
5151
'height': 'float',
52-
'wrap_type': 'str'
52+
'wrap_type': 'str',
53+
'aspect_ratio_locked': 'bool'
5354
}
5455

5556
attribute_map = {
@@ -59,10 +60,11 @@ class DrawingObjectUpdate(object):
5960
'top': 'Top',
6061
'width': 'Width',
6162
'height': 'Height',
62-
'wrap_type': 'WrapType'
63+
'wrap_type': 'WrapType',
64+
'aspect_ratio_locked': 'AspectRatioLocked'
6365
}
6466

65-
def __init__(self, relative_horizontal_position=None, left=None, relative_vertical_position=None, top=None, width=None, height=None, wrap_type=None): # noqa: E501
67+
def __init__(self, relative_horizontal_position=None, left=None, relative_vertical_position=None, top=None, width=None, height=None, wrap_type=None, aspect_ratio_locked=None): # noqa: E501
6668
"""DrawingObjectUpdate - a model defined in Swagger""" # noqa: E501
6769

6870
self._relative_horizontal_position = None
@@ -72,6 +74,7 @@ def __init__(self, relative_horizontal_position=None, left=None, relative_vertic
7274
self._width = None
7375
self._height = None
7476
self._wrap_type = None
77+
self._aspect_ratio_locked = None
7578
self.discriminator = None
7679

7780
if relative_horizontal_position is not None:
@@ -88,6 +91,8 @@ def __init__(self, relative_horizontal_position=None, left=None, relative_vertic
8891
self.height = height
8992
if wrap_type is not None:
9093
self.wrap_type = wrap_type
94+
if aspect_ratio_locked is not None:
95+
self.aspect_ratio_locked = aspect_ratio_locked
9196

9297
@property
9398
def relative_horizontal_position(self):
@@ -267,6 +272,28 @@ def wrap_type(self, wrap_type):
267272
else:
268273
self._wrap_type = allowed_values[int(wrap_type) if six.PY3 else long(wrap_type)]
269274

275+
@property
276+
def aspect_ratio_locked(self):
277+
"""Gets the aspect_ratio_locked of this DrawingObjectUpdate. # noqa: E501
278+
279+
Gets or sets a value indicating whether AspectRatioLocked option on or off. # noqa: E501
280+
281+
:return: The aspect_ratio_locked of this DrawingObjectUpdate. # noqa: E501
282+
:rtype: bool
283+
"""
284+
return self._aspect_ratio_locked
285+
286+
@aspect_ratio_locked.setter
287+
def aspect_ratio_locked(self, aspect_ratio_locked):
288+
"""Sets the aspect_ratio_locked of this DrawingObjectUpdate.
289+
290+
Gets or sets a value indicating whether AspectRatioLocked option on or off. # noqa: E501
291+
292+
:param aspect_ratio_locked: The aspect_ratio_locked of this DrawingObjectUpdate. # noqa: E501
293+
:type: bool
294+
"""
295+
self._aspect_ratio_locked = aspect_ratio_locked
296+
270297

271298
def extract_files_content(self, filesContentResult):
272299
"""Append the file content result list"""

asposewordscloud/models/requests/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,8 @@
254254
from asposewordscloud.models.requests.insert_watermark_text_online_request import InsertWatermarkTextOnlineRequest
255255
from asposewordscloud.models.requests.link_header_footers_to_previous_request import LinkHeaderFootersToPreviousRequest
256256
from asposewordscloud.models.requests.load_web_document_request import LoadWebDocumentRequest
257+
from asposewordscloud.models.requests.merge_with_next_request import MergeWithNextRequest
258+
from asposewordscloud.models.requests.merge_with_next_online_request import MergeWithNextOnlineRequest
257259
from asposewordscloud.models.requests.move_file_request import MoveFileRequest
258260
from asposewordscloud.models.requests.move_folder_request import MoveFolderRequest
259261
from asposewordscloud.models.requests.optimize_document_request import OptimizeDocumentRequest

0 commit comments

Comments
 (0)