Skip to content

Commit b3fb7a4

Browse files
Merge branch 'master' into release
2 parents 14190d5 + 72817e8 commit b3fb7a4

File tree

13 files changed

+474
-438
lines changed

13 files changed

+474
-438
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 23.5
20+
21+
- Added InsertSection method.
22+
23+
1924
## Enhancements in Version 23.4
2025

2126
- Added new type of RangeEndIdentifier for RangeApi: document:end

asposewordscloud/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@
104104
from asposewordscloud.models.footnotes_response import FootnotesResponse
105105
from asposewordscloud.models.footnotes_stat_data import FootnotesStatData
106106
from asposewordscloud.models.footnote_update import FootnoteUpdate
107-
from asposewordscloud.models.form_field import FormField
108107
from asposewordscloud.models.form_field_checkbox import FormFieldCheckbox
109108
from asposewordscloud.models.form_field_collection import FormFieldCollection
110109
from asposewordscloud.models.form_field_drop_down import FormFieldDropDown

asposewordscloud/api_client.py

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

8484
self.pool = None
8585
self.rest_client = rest.RESTClientObject(configuration)
86-
self.default_headers = {'x-aspose-client': 'python sdk', 'x-aspose-version': '23.4'}
86+
self.default_headers = {'x-aspose-client': 'python sdk', 'x-aspose-version': '23.5'}
8787
if header_name is not None:
8888
self.default_headers[header_name] = header_value
8989
self.cookie = cookie
9090
# Set default User-Agent.
91-
self.user_agent = 'python sdk 23.4'
91+
self.user_agent = 'python sdk 23.5'
9292

9393
def __del__(self):
9494
if not self.pool is None:

asposewordscloud/apis/words_api.py

Lines changed: 162 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1750,7 +1750,7 @@ def create_document(self, request, **kwargs): # noqa: E501
17501750
asynchronous HTTP request, please pass is_async=True
17511751

17521752
:param is_async bool
1753-
:param file_name str : The filename of the document.
1753+
:param file_name str : The filename of the document. (required)
17541754
:param folder str : The path to the document folder.
17551755
:param storage str : Original document storage.
17561756
:return: DocumentResponse
@@ -18437,6 +18437,167 @@ def insert_run_online_with_http_info(self, request, **kwargs): # noqa: E501
1843718437
_request_timeout=params.get('_request_timeout'),
1843818438
collection_formats=http_params['collection_formats']))
1843918439

18440+
def insert_section(self, request, **kwargs): # noqa: E501
18441+
"""Inserts a section to the document. # noqa: E501
18442+
18443+
This method makes a synchronous HTTP request by default. To make an
18444+
asynchronous HTTP request, please pass is_async=True
18445+
18446+
:param is_async bool
18447+
:param name str : The filename of the input document. (required)
18448+
:param section_index int : The index to insert into. (required)
18449+
:param folder str : Original document folder.
18450+
:param storage str : Original document storage.
18451+
:param load_encoding str : Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML.
18452+
: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.
18453+
: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.
18454+
: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.
18455+
: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.
18456+
:param revision_date_time str : The date and time to use for revisions.
18457+
:return: None
18458+
If the method is called asynchronously,
18459+
returns the request thread.
18460+
"""
18461+
try:
18462+
if kwargs.get('is_async'):
18463+
return self.insert_section_with_http_info(request, **kwargs) # noqa: E501
18464+
data = self.insert_section_with_http_info(request, **kwargs) # noqa: E501
18465+
return data
18466+
except ApiException as e:
18467+
if e.status == 401:
18468+
self.api_client.request_token()
18469+
if kwargs.get('is_async'):
18470+
return self.insert_section_with_http_info(request, **kwargs) # noqa: E501
18471+
data = self.insert_section_with_http_info(request, **kwargs) # noqa: E501
18472+
return data
18473+
18474+
def insert_section_with_http_info(self, request, **kwargs): # noqa: E501
18475+
"""Inserts a section to the document. # noqa: E501
18476+
18477+
This method makes a synchronous HTTP request by default. To make an
18478+
asynchronous HTTP request, please pass is_async=True
18479+
18480+
:param is_async bool
18481+
:param request InsertSectionRequest object with parameters
18482+
:return: None
18483+
If the method is called asynchronously,
18484+
returns the request thread.
18485+
"""
18486+
18487+
params = locals()
18488+
params['is_async'] = ''
18489+
params['_preload_content'] = True
18490+
params['_request_timeout'] = self.timeout
18491+
for key, val in six.iteritems(params['kwargs']):
18492+
if key not in params:
18493+
raise TypeError(
18494+
"Got an unexpected keyword argument '%s'"
18495+
" to method insert_section" % key
18496+
)
18497+
params[key] = val
18498+
del params['kwargs']
18499+
http_params = request.create_http_request(self.api_client)
18500+
18501+
# Authentication setting
18502+
auth_settings = ['JWT'] # noqa: E501
18503+
18504+
self.api_client.handle_password(http_params, self)
18505+
18506+
return request.deserialize_response(self.api_client, self.api_client.call_api(
18507+
http_params['path'],
18508+
http_params['method'],
18509+
http_params['query_params'],
18510+
http_params['header_params'],
18511+
body=None,
18512+
post_params=http_params['form_params'],
18513+
response_type=http_params['response_type'], # noqa: E501
18514+
auth_settings=auth_settings,
18515+
is_async=params.get('is_async'),
18516+
_preload_content=params.get('_preload_content', True),
18517+
_request_timeout=params.get('_request_timeout'),
18518+
collection_formats=http_params['collection_formats']))
18519+
18520+
def insert_section_online(self, request, **kwargs): # noqa: E501
18521+
"""Inserts a section to the document. # noqa: E501
18522+
18523+
This method makes a synchronous HTTP request by default. To make an
18524+
asynchronous HTTP request, please pass is_async=True
18525+
18526+
:param is_async bool
18527+
:param document file : The document. (required)
18528+
:param section_index int : The index to insert into. (required)
18529+
:param load_encoding str : Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML.
18530+
: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.
18531+
: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.
18532+
: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.
18533+
: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.
18534+
:param revision_date_time str : The date and time to use for revisions.
18535+
:return: files_collection
18536+
If the method is called asynchronously,
18537+
returns the request thread.
18538+
"""
18539+
try:
18540+
if kwargs.get('is_async'):
18541+
return self.insert_section_online_with_http_info(request, **kwargs) # noqa: E501
18542+
data = self.insert_section_online_with_http_info(request, **kwargs) # noqa: E501
18543+
return data
18544+
except ApiException as e:
18545+
if e.status == 401:
18546+
self.api_client.request_token()
18547+
if kwargs.get('is_async'):
18548+
return self.insert_section_online_with_http_info(request, **kwargs) # noqa: E501
18549+
data = self.insert_section_online_with_http_info(request, **kwargs) # noqa: E501
18550+
return data
18551+
18552+
def insert_section_online_with_http_info(self, request, **kwargs): # noqa: E501
18553+
"""Inserts a section to the document. # noqa: E501
18554+
18555+
This method makes a synchronous HTTP request by default. To make an
18556+
asynchronous HTTP request, please pass is_async=True
18557+
18558+
:param is_async bool
18559+
:param request InsertSectionOnlineRequest object with parameters
18560+
:return: files_collection
18561+
If the method is called asynchronously,
18562+
returns the request thread.
18563+
"""
18564+
18565+
params = locals()
18566+
params['is_async'] = ''
18567+
params['_preload_content'] = True
18568+
params['_request_timeout'] = self.timeout
18569+
for key, val in six.iteritems(params['kwargs']):
18570+
if key not in params:
18571+
raise TypeError(
18572+
"Got an unexpected keyword argument '%s'"
18573+
" to method insert_section_online" % key
18574+
)
18575+
params[key] = val
18576+
del params['kwargs']
18577+
http_params = request.create_http_request(self.api_client)
18578+
18579+
# HTTP header `Accept`
18580+
http_params['header_params']['Accept'] = self.api_client.select_header_accept(
18581+
['application/xml', 'application/json']) # noqa: E501
18582+
# Authentication setting
18583+
auth_settings = ['JWT'] # noqa: E501
18584+
18585+
self.api_client.handle_password(http_params, self)
18586+
18587+
return request.deserialize_response(self.api_client, self.api_client.call_api(
18588+
http_params['path'],
18589+
http_params['method'],
18590+
http_params['query_params'],
18591+
http_params['header_params'],
18592+
body=None,
18593+
post_params=http_params['form_params'],
18594+
response_type=http_params['response_type'], # noqa: E501
18595+
auth_settings=auth_settings,
18596+
is_async=params.get('is_async'),
18597+
_preload_content=params.get('_preload_content', True),
18598+
_request_timeout=params.get('_request_timeout'),
18599+
collection_formats=http_params['collection_formats']))
18600+
1844018601
def insert_structured_document_tag(self, request, **kwargs): # noqa: E501
1844118602
"""Inserts a new StructuredDocumentTag (SDT) to the document node. # noqa: E501
1844218603

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: 23.4\n"\
266-
"SDK Package Version: 23.4".\
265+
"Version of the API: 23.5\n"\
266+
"SDK Package Version: 23.5".\
267267
format(env=sys.platform, pyversion=sys.version)

asposewordscloud/models/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@
9999
from asposewordscloud.models.footnotes_response import FootnotesResponse
100100
from asposewordscloud.models.footnotes_stat_data import FootnotesStatData
101101
from asposewordscloud.models.footnote_update import FootnoteUpdate
102-
from asposewordscloud.models.form_field import FormField
103102
from asposewordscloud.models.form_field_checkbox import FormFieldCheckbox
104103
from asposewordscloud.models.form_field_collection import FormFieldCollection
105104
from asposewordscloud.models.form_field_drop_down import FormFieldDropDown

0 commit comments

Comments
 (0)