Skip to content

Commit ccc8241

Browse files
SDK regenerated by CI server [ci skip]
1 parent d20eba9 commit ccc8241

File tree

9 files changed

+510
-4
lines changed

9 files changed

+510
-4
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ 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 22.7
20+
21+
- Expand 'AppendDocument' API method to support 'ImageEntryList' for directly appending images to documents and another images.
22+
23+
1924
## Enhancements in Version 22.6
2025

2126
- Added 'DeleteBookmark' and 'DeleteBookmarkOnline' API methods for delete bookmarks by name from the document.

asposewordscloud/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
# import models into sdk package
1313
from asposewordscloud.models.api_error import ApiError
1414
from asposewordscloud.models.available_fonts_response import AvailableFontsResponse
15+
from asposewordscloud.models.base_entry import BaseEntry
1516
from asposewordscloud.models.bmp_save_options_data import BmpSaveOptionsData
1617
from asposewordscloud.models.bookmark import Bookmark
1718
from asposewordscloud.models.bookmark_data import BookmarkData
@@ -120,6 +121,8 @@
120121
from asposewordscloud.models.hyperlink_response import HyperlinkResponse
121122
from asposewordscloud.models.hyperlinks import Hyperlinks
122123
from asposewordscloud.models.hyperlinks_response import HyperlinksResponse
124+
from asposewordscloud.models.image_entry import ImageEntry
125+
from asposewordscloud.models.image_entry_list import ImageEntryList
123126
from asposewordscloud.models.info_additional_item import InfoAdditionalItem
124127
from asposewordscloud.models.info_response import InfoResponse
125128
from asposewordscloud.models.jpeg_save_options_data import JpegSaveOptionsData

asposewordscloud/apis/words_api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ def append_document(self, request, **kwargs): # noqa: E501
232232

233233
:param is_async bool
234234
:param name str : The filename of the input document. (required)
235-
:param document_list DocumentEntryList : <see cref="DocumentEntryList"/> with a list of documents to append. (required)
235+
:param document_list BaseEntryList : <see cref="BaseEntryList"/> with a list of entries to append. (required)
236236
:param folder str : Original document folder.
237237
:param storage str : Original document storage.
238238
:param load_encoding str : Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML.
@@ -315,7 +315,7 @@ def append_document_online(self, request, **kwargs): # noqa: E501
315315

316316
:param is_async bool
317317
:param document file : Original document. (required)
318-
:param document_list DocumentEntryList : <see cref="DocumentEntryList"/> with a list of documents to append. (required)
318+
:param document_list BaseEntryList : <see cref="BaseEntryList"/> with a list of entries to append. (required)
319319
:param load_encoding str : Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML.
320320
: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.
321321
: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/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
# import models into model package
88
from asposewordscloud.models.api_error import ApiError
99
from asposewordscloud.models.available_fonts_response import AvailableFontsResponse
10+
from asposewordscloud.models.base_entry import BaseEntry
1011
from asposewordscloud.models.bmp_save_options_data import BmpSaveOptionsData
1112
from asposewordscloud.models.bookmark import Bookmark
1213
from asposewordscloud.models.bookmark_data import BookmarkData
@@ -115,6 +116,8 @@
115116
from asposewordscloud.models.hyperlink_response import HyperlinkResponse
116117
from asposewordscloud.models.hyperlinks import Hyperlinks
117118
from asposewordscloud.models.hyperlinks_response import HyperlinksResponse
119+
from asposewordscloud.models.image_entry import ImageEntry
120+
from asposewordscloud.models.image_entry_list import ImageEntryList
118121
from asposewordscloud.models.info_additional_item import InfoAdditionalItem
119122
from asposewordscloud.models.info_response import InfoResponse
120123
from asposewordscloud.models.jpeg_save_options_data import JpegSaveOptionsData
Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
# coding: utf-8
2+
# -----------------------------------------------------------------------------------
3+
# <copyright company="Aspose" file="base_entry.py">
4+
# Copyright (c) 2022 Aspose.Words for Cloud
5+
# </copyright>
6+
# <summary>
7+
# Permission is hereby granted, free of charge, to any person obtaining a copy
8+
# of this software and associated documentation files (the "Software"), to deal
9+
# in the Software without restriction, including without limitation the rights
10+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
# copies of the Software, and to permit persons to whom the Software is
12+
# furnished to do so, subject to the following conditions:
13+
#
14+
# The above copyright notice and this permission notice shall be included in all
15+
# copies or substantial portions of the Software.
16+
#
17+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23+
# SOFTWARE.
24+
# </summary>
25+
# -----------------------------------------------------------------------------------
26+
import pprint
27+
import re # noqa: F401
28+
29+
import datetime
30+
import six
31+
import json
32+
33+
34+
class BaseEntry(object):
35+
"""Represents a entry which will be appended to the original resource document.
36+
"""
37+
38+
"""
39+
Attributes:
40+
swagger_types (dict): The key is attribute name
41+
and the value is attribute type.
42+
attribute_map (dict): The key is attribute name
43+
and the value is json key in definition.
44+
"""
45+
swagger_types = {
46+
'href': 'str'
47+
}
48+
49+
attribute_map = {
50+
'href': 'Href'
51+
}
52+
53+
def __init__(self, href=None): # noqa: E501
54+
"""BaseEntry - a model defined in Swagger""" # noqa: E501
55+
56+
self._href = None
57+
self.discriminator = None
58+
59+
if href is not None:
60+
self.href = href
61+
62+
@property
63+
def href(self):
64+
"""Gets the href of this BaseEntry. # noqa: E501
65+
66+
Gets or sets the path to entry to append at the server. # noqa: E501
67+
68+
:return: The href of this BaseEntry. # noqa: E501
69+
:rtype: str
70+
"""
71+
return self._href
72+
73+
@href.setter
74+
def href(self, href):
75+
"""Sets the href of this BaseEntry.
76+
77+
Gets or sets the path to entry to append at the server. # noqa: E501
78+
79+
:param href: The href of this BaseEntry. # noqa: E501
80+
:type: str
81+
"""
82+
self._href = href
83+
84+
85+
def to_dict(self):
86+
"""Returns the model properties as a dict"""
87+
result = {}
88+
89+
for attr, _ in six.iteritems(self.swagger_types):
90+
value = getattr(self, attr)
91+
if value is None:
92+
continue
93+
if isinstance(value, list):
94+
result[self.attribute_map[attr]] = list(map(
95+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
96+
value
97+
))
98+
elif hasattr(value, "to_dict"):
99+
result[self.attribute_map[attr]] = value.to_dict()
100+
elif isinstance(value, dict):
101+
result[self.attribute_map[attr]] = dict(map(
102+
lambda item: (item[0], item[1].to_dict())
103+
if hasattr(item[1], "to_dict") else item,
104+
value.items()
105+
))
106+
elif isinstance(value, (datetime.datetime, datetime.date)):
107+
result[self.attribute_map[attr]] = value.isoformat()
108+
else:
109+
result[self.attribute_map[attr]] = value
110+
111+
return result
112+
113+
def to_json(self):
114+
"""Returns the model properties as a dict"""
115+
result = {}
116+
117+
for attr, _ in six.iteritems(self.swagger_types):
118+
value = getattr(self, attr)
119+
if isinstance(value, list):
120+
result[self.attribute_map[attr]] = list(map(
121+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
122+
value
123+
))
124+
elif hasattr(value, "to_dict"):
125+
result[self.attribute_map[attr]] = value.to_dict()
126+
elif isinstance(value, dict):
127+
result[self.attribute_map[attr]] = dict(map(
128+
lambda item: (item[0], item[1].to_dict())
129+
if hasattr(item[1], "to_dict") else item,
130+
value.items()
131+
))
132+
elif isinstance(value, (datetime.datetime, datetime.date)):
133+
result[self.attribute_map[attr]] = value.isoformat()
134+
else:
135+
result[self.attribute_map[attr]] = value
136+
137+
return json.dumps(result)
138+
139+
def to_str(self):
140+
"""Returns the string representation of the model"""
141+
return pprint.pformat(self.to_dict())
142+
143+
def __repr__(self):
144+
"""For `print` and `pprint`"""
145+
return self.to_str()
146+
147+
def __eq__(self, other):
148+
"""Returns true if both objects are equal"""
149+
if not isinstance(other, BaseEntry):
150+
return False
151+
152+
return self.__dict__ == other.__dict__
153+
154+
def __ne__(self, other):
155+
"""Returns true if both objects are not equal"""
156+
return not self == other
Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
# coding: utf-8
2+
# -----------------------------------------------------------------------------------
3+
# <copyright company="Aspose" file="image_entry.py">
4+
# Copyright (c) 2022 Aspose.Words for Cloud
5+
# </copyright>
6+
# <summary>
7+
# Permission is hereby granted, free of charge, to any person obtaining a copy
8+
# of this software and associated documentation files (the "Software"), to deal
9+
# in the Software without restriction, including without limitation the rights
10+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
# copies of the Software, and to permit persons to whom the Software is
12+
# furnished to do so, subject to the following conditions:
13+
#
14+
# The above copyright notice and this permission notice shall be included in all
15+
# copies or substantial portions of the Software.
16+
#
17+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23+
# SOFTWARE.
24+
# </summary>
25+
# -----------------------------------------------------------------------------------
26+
import pprint
27+
import re # noqa: F401
28+
29+
import datetime
30+
import six
31+
import json
32+
33+
34+
class ImageEntry(object):
35+
"""Represents a image which will be appended to the original resource image or document.
36+
"""
37+
38+
"""
39+
Attributes:
40+
swagger_types (dict): The key is attribute name
41+
and the value is attribute type.
42+
attribute_map (dict): The key is attribute name
43+
and the value is json key in definition.
44+
"""
45+
swagger_types = {
46+
'href': 'str'
47+
}
48+
49+
attribute_map = {
50+
'href': 'Href'
51+
}
52+
53+
def __init__(self, href=None): # noqa: E501
54+
"""ImageEntry - a model defined in Swagger""" # noqa: E501
55+
56+
self._href = None
57+
self.discriminator = None
58+
59+
if href is not None:
60+
self.href = href
61+
62+
@property
63+
def href(self):
64+
"""Gets the href of this ImageEntry. # noqa: E501
65+
66+
Gets or sets the path to entry to append at the server. # noqa: E501
67+
68+
:return: The href of this ImageEntry. # noqa: E501
69+
:rtype: str
70+
"""
71+
return self._href
72+
73+
@href.setter
74+
def href(self, href):
75+
"""Sets the href of this ImageEntry.
76+
77+
Gets or sets the path to entry to append at the server. # noqa: E501
78+
79+
:param href: The href of this ImageEntry. # noqa: E501
80+
:type: str
81+
"""
82+
self._href = href
83+
84+
85+
def to_dict(self):
86+
"""Returns the model properties as a dict"""
87+
result = {}
88+
89+
for attr, _ in six.iteritems(self.swagger_types):
90+
value = getattr(self, attr)
91+
if value is None:
92+
continue
93+
if isinstance(value, list):
94+
result[self.attribute_map[attr]] = list(map(
95+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
96+
value
97+
))
98+
elif hasattr(value, "to_dict"):
99+
result[self.attribute_map[attr]] = value.to_dict()
100+
elif isinstance(value, dict):
101+
result[self.attribute_map[attr]] = dict(map(
102+
lambda item: (item[0], item[1].to_dict())
103+
if hasattr(item[1], "to_dict") else item,
104+
value.items()
105+
))
106+
elif isinstance(value, (datetime.datetime, datetime.date)):
107+
result[self.attribute_map[attr]] = value.isoformat()
108+
else:
109+
result[self.attribute_map[attr]] = value
110+
111+
return result
112+
113+
def to_json(self):
114+
"""Returns the model properties as a dict"""
115+
result = {}
116+
117+
for attr, _ in six.iteritems(self.swagger_types):
118+
value = getattr(self, attr)
119+
if isinstance(value, list):
120+
result[self.attribute_map[attr]] = list(map(
121+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
122+
value
123+
))
124+
elif hasattr(value, "to_dict"):
125+
result[self.attribute_map[attr]] = value.to_dict()
126+
elif isinstance(value, dict):
127+
result[self.attribute_map[attr]] = dict(map(
128+
lambda item: (item[0], item[1].to_dict())
129+
if hasattr(item[1], "to_dict") else item,
130+
value.items()
131+
))
132+
elif isinstance(value, (datetime.datetime, datetime.date)):
133+
result[self.attribute_map[attr]] = value.isoformat()
134+
else:
135+
result[self.attribute_map[attr]] = value
136+
137+
return json.dumps(result)
138+
139+
def to_str(self):
140+
"""Returns the string representation of the model"""
141+
return pprint.pformat(self.to_dict())
142+
143+
def __repr__(self):
144+
"""For `print` and `pprint`"""
145+
return self.to_str()
146+
147+
def __eq__(self, other):
148+
"""Returns true if both objects are equal"""
149+
if not isinstance(other, ImageEntry):
150+
return False
151+
152+
return self.__dict__ == other.__dict__
153+
154+
def __ne__(self, other):
155+
"""Returns true if both objects are not equal"""
156+
return not self == other

0 commit comments

Comments
 (0)