Skip to content

Commit f2edb67

Browse files
SDK regenerated by CI server [ci skip]
1 parent 53ca291 commit f2edb67

File tree

7 files changed

+28
-75
lines changed

7 files changed

+28
-75
lines changed

README.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,6 @@ 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.5
20-
21-
- Added an url parameter to InsertImage / UpdateImage methods. It allows to link to an image from a web URL.
22-
23-
2419
## Enhancements in Version 24.4
2520

2621
- Added the 'MergeWithNext' method to merge a section with the next one.

asposewordscloud/apis/words_api.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17153,9 +17153,8 @@ def insert_drawing_object(self, request, **kwargs): # noqa: E501
1715317153
:param is_async bool
1715417154
:param name str : The filename of the input document. (required)
1715517155
:param drawing_object DrawingObjectInsert : Drawing object parameters. (required)
17156+
:param image_file file : File with image. (required)
1715617157
:param node_path str : The path to the node in the document tree.
17157-
:param image_file file : File with image.
17158-
:param url str : The link to the image.
1715917158
:param folder str : Original document folder.
1716017159
:param storage str : Original document storage.
1716117160
:param load_encoding str : Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML.
@@ -17240,9 +17239,8 @@ def insert_drawing_object_online(self, request, **kwargs): # noqa: E501
1724017239
:param is_async bool
1724117240
:param document file : The document. (required)
1724217241
:param drawing_object DrawingObjectInsert : Drawing object parameters. (required)
17242+
:param image_file file : File with image. (required)
1724317243
:param node_path str : The path to the node in the document tree.
17244-
:param image_file file : File with image.
17245-
:param url str : The link to the image.
1724617244
:param load_encoding str : Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML.
1724717245
: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.
1724817246
: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.
@@ -24361,10 +24359,9 @@ def update_drawing_object(self, request, **kwargs): # noqa: E501
2436124359
:param is_async bool
2436224360
:param name str : The filename of the input document. (required)
2436324361
:param drawing_object DrawingObjectUpdate : Drawing object parameters. (required)
24362+
:param image_file file : File with image. (required)
2436424363
:param index int : Object index. (required)
2436524364
:param node_path str : The path to the node in the document tree.
24366-
:param image_file file : File with image.
24367-
:param url str : The link to the image.
2436824365
:param folder str : Original document folder.
2436924366
:param storage str : Original document storage.
2437024367
:param load_encoding str : Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML.
@@ -24449,10 +24446,9 @@ def update_drawing_object_online(self, request, **kwargs): # noqa: E501
2444924446
:param is_async bool
2445024447
:param document file : The document. (required)
2445124448
:param drawing_object DrawingObjectUpdate : Drawing object parameters. (required)
24449+
:param image_file file : File with image. (required)
2445224450
:param index int : Object index. (required)
2445324451
:param node_path str : The path to the node in the document tree.
24454-
:param image_file file : File with image.
24455-
:param url str : The link to the image.
2445624452
:param load_encoding str : Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML.
2445724453
: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.
2445824454
: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.

asposewordscloud/models/requests/insert_drawing_object_online_request.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,8 @@ class InsertDrawingObjectOnlineRequest(BaseRequestObject):
3737
Initializes a new instance.
3838
:param document The document.
3939
:param drawing_object Drawing object parameters.
40-
:param node_path The path to the node in the document tree.
4140
:param image_file File with image.
42-
:param url The link to the image.
41+
:param node_path The path to the node in the document tree.
4342
:param load_encoding Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML.
4443
:param password 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.
4544
:param encrypted_password Password of protected Word document. Use the parameter to pass an encrypted password for direct calls of API. See SDK code for encyption details.
@@ -48,12 +47,11 @@ class InsertDrawingObjectOnlineRequest(BaseRequestObject):
4847
:param revision_date_time The date and time to use for revisions.
4948
"""
5049

51-
def __init__(self, document, drawing_object, node_path=None, image_file=None, url=None, load_encoding=None, password=None, encrypted_password=None, dest_file_name=None, revision_author=None, revision_date_time=None):
50+
def __init__(self, document, drawing_object, image_file, node_path=None, load_encoding=None, password=None, encrypted_password=None, dest_file_name=None, revision_author=None, revision_date_time=None):
5251
self.document = document
5352
self.drawing_object = drawing_object
54-
self.node_path = node_path
5553
self.image_file = image_file
56-
self.url = url
54+
self.node_path = node_path
5755
self.load_encoding = load_encoding
5856
self.password = password
5957
self.encrypted_password = encrypted_password
@@ -68,6 +66,9 @@ def create_http_request(self, api_client, encryptor):
6866
# verify the required parameter 'drawing_object' is set
6967
if self.drawing_object is None:
7068
raise ValueError("Missing the required parameter `drawing_object` when calling `insert_drawing_object_online`") # noqa: E501
69+
# verify the required parameter 'image_file' is set
70+
if self.image_file is None:
71+
raise ValueError("Missing the required parameter `image_file` when calling `insert_drawing_object_online`") # noqa: E501
7172
if self.drawing_object is not None:
7273
self.drawing_object.validate()
7374

@@ -95,8 +96,6 @@ def create_http_request(self, api_client, encryptor):
9596
path = path.replace('//', '/')
9697

9798
query_params = []
98-
if self.url is not None:
99-
query_params.append(('url', self.url)) # noqa: E501
10099
if self.load_encoding is not None:
101100
query_params.append(('loadEncoding', self.load_encoding)) # noqa: E501
102101
if self.password is not None:

asposewordscloud/models/requests/insert_drawing_object_request.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,8 @@ class InsertDrawingObjectRequest(BaseRequestObject):
3737
Initializes a new instance.
3838
:param name The filename of the input document.
3939
:param drawing_object Drawing object parameters.
40-
:param node_path The path to the node in the document tree.
4140
:param image_file File with image.
42-
:param url The link to the image.
41+
:param node_path The path to the node in the document tree.
4342
:param folder Original document folder.
4443
:param storage Original document storage.
4544
:param load_encoding Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML.
@@ -50,12 +49,11 @@ class InsertDrawingObjectRequest(BaseRequestObject):
5049
:param revision_date_time The date and time to use for revisions.
5150
"""
5251

53-
def __init__(self, name, drawing_object, node_path=None, image_file=None, url=None, folder=None, storage=None, load_encoding=None, password=None, encrypted_password=None, dest_file_name=None, revision_author=None, revision_date_time=None):
52+
def __init__(self, name, drawing_object, image_file, node_path=None, folder=None, storage=None, load_encoding=None, password=None, encrypted_password=None, dest_file_name=None, revision_author=None, revision_date_time=None):
5453
self.name = name
5554
self.drawing_object = drawing_object
56-
self.node_path = node_path
5755
self.image_file = image_file
58-
self.url = url
56+
self.node_path = node_path
5957
self.folder = folder
6058
self.storage = storage
6159
self.load_encoding = load_encoding
@@ -72,6 +70,9 @@ def create_http_request(self, api_client, encryptor):
7270
# verify the required parameter 'drawing_object' is set
7371
if self.drawing_object is None:
7472
raise ValueError("Missing the required parameter `drawing_object` when calling `insert_drawing_object`") # noqa: E501
73+
# verify the required parameter 'image_file' is set
74+
if self.image_file is None:
75+
raise ValueError("Missing the required parameter `image_file` when calling `insert_drawing_object`") # noqa: E501
7576
if self.drawing_object is not None:
7677
self.drawing_object.validate()
7778

@@ -103,8 +104,6 @@ def create_http_request(self, api_client, encryptor):
103104
path = path.replace('//', '/')
104105

105106
query_params = []
106-
if self.url is not None:
107-
query_params.append(('url', self.url)) # noqa: E501
108107
if self.folder is not None:
109108
query_params.append(('folder', self.folder)) # noqa: E501
110109
if self.storage is not None:

asposewordscloud/models/requests/update_drawing_object_online_request.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,9 @@ class UpdateDrawingObjectOnlineRequest(BaseRequestObject):
3737
Initializes a new instance.
3838
:param document The document.
3939
:param drawing_object Drawing object parameters.
40+
:param image_file File with image.
4041
:param index Object index.
4142
:param node_path The path to the node in the document tree.
42-
:param image_file File with image.
43-
:param url The link to the image.
4443
:param load_encoding Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML.
4544
:param password 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.
4645
:param encrypted_password Password of protected Word document. Use the parameter to pass an encrypted password for direct calls of API. See SDK code for encyption details.
@@ -49,13 +48,12 @@ class UpdateDrawingObjectOnlineRequest(BaseRequestObject):
4948
:param revision_date_time The date and time to use for revisions.
5049
"""
5150

52-
def __init__(self, document, drawing_object, index, node_path=None, image_file=None, url=None, load_encoding=None, password=None, encrypted_password=None, dest_file_name=None, revision_author=None, revision_date_time=None):
51+
def __init__(self, document, drawing_object, image_file, index, node_path=None, load_encoding=None, password=None, encrypted_password=None, dest_file_name=None, revision_author=None, revision_date_time=None):
5352
self.document = document
5453
self.drawing_object = drawing_object
54+
self.image_file = image_file
5555
self.index = index
5656
self.node_path = node_path
57-
self.image_file = image_file
58-
self.url = url
5957
self.load_encoding = load_encoding
6058
self.password = password
6159
self.encrypted_password = encrypted_password
@@ -70,6 +68,9 @@ def create_http_request(self, api_client, encryptor):
7068
# verify the required parameter 'drawing_object' is set
7169
if self.drawing_object is None:
7270
raise ValueError("Missing the required parameter `drawing_object` when calling `update_drawing_object_online`") # noqa: E501
71+
# verify the required parameter 'image_file' is set
72+
if self.image_file is None:
73+
raise ValueError("Missing the required parameter `image_file` when calling `update_drawing_object_online`") # noqa: E501
7374
# verify the required parameter 'index' is set
7475
if self.index is None:
7576
raise ValueError("Missing the required parameter `index` when calling `update_drawing_object_online`") # noqa: E501
@@ -104,8 +105,6 @@ def create_http_request(self, api_client, encryptor):
104105
path = path.replace('//', '/')
105106

106107
query_params = []
107-
if self.url is not None:
108-
query_params.append(('url', self.url)) # noqa: E501
109108
if self.load_encoding is not None:
110109
query_params.append(('loadEncoding', self.load_encoding)) # noqa: E501
111110
if self.password is not None:

asposewordscloud/models/requests/update_drawing_object_request.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,9 @@ class UpdateDrawingObjectRequest(BaseRequestObject):
3737
Initializes a new instance.
3838
:param name The filename of the input document.
3939
:param drawing_object Drawing object parameters.
40+
:param image_file File with image.
4041
:param index Object index.
4142
:param node_path The path to the node in the document tree.
42-
:param image_file File with image.
43-
:param url The link to the image.
4443
:param folder Original document folder.
4544
:param storage Original document storage.
4645
:param load_encoding Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML.
@@ -51,13 +50,12 @@ class UpdateDrawingObjectRequest(BaseRequestObject):
5150
:param revision_date_time The date and time to use for revisions.
5251
"""
5352

54-
def __init__(self, name, drawing_object, index, node_path=None, image_file=None, url=None, folder=None, storage=None, load_encoding=None, password=None, encrypted_password=None, dest_file_name=None, revision_author=None, revision_date_time=None):
53+
def __init__(self, name, drawing_object, image_file, index, node_path=None, folder=None, storage=None, load_encoding=None, password=None, encrypted_password=None, dest_file_name=None, revision_author=None, revision_date_time=None):
5554
self.name = name
5655
self.drawing_object = drawing_object
56+
self.image_file = image_file
5757
self.index = index
5858
self.node_path = node_path
59-
self.image_file = image_file
60-
self.url = url
6159
self.folder = folder
6260
self.storage = storage
6361
self.load_encoding = load_encoding
@@ -74,6 +72,9 @@ def create_http_request(self, api_client, encryptor):
7472
# verify the required parameter 'drawing_object' is set
7573
if self.drawing_object is None:
7674
raise ValueError("Missing the required parameter `drawing_object` when calling `update_drawing_object`") # noqa: E501
75+
# verify the required parameter 'image_file' is set
76+
if self.image_file is None:
77+
raise ValueError("Missing the required parameter `image_file` when calling `update_drawing_object`") # noqa: E501
7778
# verify the required parameter 'index' is set
7879
if self.index is None:
7980
raise ValueError("Missing the required parameter `index` when calling `update_drawing_object`") # noqa: E501
@@ -112,8 +113,6 @@ def create_http_request(self, api_client, encryptor):
112113
path = path.replace('//', '/')
113114

114115
query_params = []
115-
if self.url is not None:
116-
query_params.append(('url', self.url)) # noqa: E501
117116
if self.folder is not None:
118117
query_params.append(('folder', self.folder)) # noqa: E501
119118
if self.storage is not None:

test/api/drawing/test_drawing_objects.py

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -308,23 +308,6 @@ def test_insert_drawing_object_without_node_path(self):
308308
self.assertIsNotNone(result, 'Error has occurred.')
309309

310310

311-
#
312-
# Test for adding a link to a drawing object.
313-
#
314-
def test_insert_drawing_object_link(self):
315-
remote_data_folder = self.remote_test_folder + '/DocumentElements/DrawingObjectss'
316-
local_file = 'Common/test_multi_pages.docx'
317-
remote_file_name = 'TestInsetDrawingObject.docx'
318-
319-
self.upload_file(remote_data_folder + '/' + remote_file_name, open(os.path.join(self.local_test_folder, local_file), 'rb'))
320-
321-
request_drawing_object = asposewordscloud.DrawingObjectInsert(height=0, left=0, top=0, width=0, relative_horizontal_position='Margin', relative_vertical_position='Margin', wrap_type='Inline')
322-
request = asposewordscloud.models.requests.InsertDrawingObjectRequest(name=remote_file_name, drawing_object=request_drawing_object, url='https://products.aspose.com/words/static/img/aspose_words_cloud-for-net.png', node_path='', folder=remote_data_folder)
323-
324-
result = self.words_api.insert_drawing_object(request)
325-
self.assertIsNotNone(result, 'Error has occurred.')
326-
327-
328311
#
329312
# Test for deleting drawing object.
330313
#
@@ -418,20 +401,3 @@ def test_update_drawing_object_without_node_path(self):
418401
result = self.words_api.update_drawing_object(request)
419402
self.assertIsNotNone(result, 'Error has occurred.')
420403

421-
422-
#
423-
# Test for updating drawing object to a link to it.
424-
#
425-
def test_update_drawing_object_link(self):
426-
remote_data_folder = self.remote_test_folder + '/DocumentElements/DrawingObjectss'
427-
local_file = 'Common/test_multi_pages.docx'
428-
remote_file_name = 'TestUpdateDrawingObjectLink.docx'
429-
430-
self.upload_file(remote_data_folder + '/' + remote_file_name, open(os.path.join(self.local_test_folder, local_file), 'rb'))
431-
432-
request_drawing_object = asposewordscloud.DrawingObjectUpdate(left=0)
433-
request = asposewordscloud.models.requests.UpdateDrawingObjectRequest(name=remote_file_name, drawing_object=request_drawing_object, url='https://products.aspose.com/words/static/img/aspose_words_cloud-for-net.png', index=0, node_path='', folder=remote_data_folder)
434-
435-
result = self.words_api.update_drawing_object(request)
436-
self.assertIsNotNone(result, 'Error has occurred.')
437-

0 commit comments

Comments
 (0)