Skip to content

Commit

Permalink
2.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Cloudmersive committed Oct 20, 2019
1 parent c1fd46d commit 88f743e
Show file tree
Hide file tree
Showing 8 changed files with 471 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .swagger-codegen/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
unset
2.4.5
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Convert API lets you effortlessly convert file formats and types.
This Python package provides a native API client for [Cloudmersive Document Conversion](https://www.cloudmersive.com/convert-api)

- API version: v1
- Package version: 2.1.0
- Package version: 2.1.1
- Build package: io.swagger.codegen.languages.PythonClientCodegen

## Requirements.
Expand Down Expand Up @@ -147,8 +147,11 @@ Class | Method | HTTP request | Description
*MergeDocumentApi* | [**merge_document_xlsx**](docs/MergeDocumentApi.md#merge_document_xlsx) | **POST** /convert/merge/xlsx | Merge Multple Excel XLSX Together
*SplitDocumentApi* | [**split_document_xlsx**](docs/SplitDocumentApi.md#split_document_xlsx) | **POST** /convert/split/xlsx | Split a single Excel XLSX into Separate Worksheets
*ValidateDocumentApi* | [**validate_document_docx_validation**](docs/ValidateDocumentApi.md#validate_document_docx_validation) | **POST** /convert/validate/docx | Validate a Word document (DOCX)
*ValidateDocumentApi* | [**validate_document_json_validation**](docs/ValidateDocumentApi.md#validate_document_json_validation) | **POST** /convert/validate/json | Validate a JSON file
*ValidateDocumentApi* | [**validate_document_pdf_validation**](docs/ValidateDocumentApi.md#validate_document_pdf_validation) | **POST** /convert/validate/pdf | Validate a PDF document file
*ValidateDocumentApi* | [**validate_document_pptx_validation**](docs/ValidateDocumentApi.md#validate_document_pptx_validation) | **POST** /convert/validate/pptx | Validate a PowerPoint presentation (PPTX)
*ValidateDocumentApi* | [**validate_document_xlsx_validation**](docs/ValidateDocumentApi.md#validate_document_xlsx_validation) | **POST** /convert/validate/xlsx | Validate a Excel document (XLSX)
*ValidateDocumentApi* | [**validate_document_xml_validation**](docs/ValidateDocumentApi.md#validate_document_xml_validation) | **POST** /convert/validate/xml | Validate an XML file
*ViewerToolsApi* | [**viewer_tools_create_simple**](docs/ViewerToolsApi.md#viewer_tools_create_simple) | **POST** /convert/viewer/create/web/simple | Create a web-based viewer


Expand Down
297 changes: 297 additions & 0 deletions cloudmersive_convert_api_client/api/validate_document_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,204 @@ def validate_document_docx_validation_with_http_info(self, input_file, **kwargs)
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)

def validate_document_json_validation(self, input_file, **kwargs): # noqa: E501
"""Validate a JSON file # noqa: E501
Validate a JSON (JavaScript Object Notation) document file; if the document is not valid, identifies the errors in the document # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.validate_document_json_validation(input_file, async_req=True)
>>> result = thread.get()
:param async_req bool
:param file input_file: Input file to perform the operation on. (required)
:return: DocumentValidationResult
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.validate_document_json_validation_with_http_info(input_file, **kwargs) # noqa: E501
else:
(data) = self.validate_document_json_validation_with_http_info(input_file, **kwargs) # noqa: E501
return data

def validate_document_json_validation_with_http_info(self, input_file, **kwargs): # noqa: E501
"""Validate a JSON file # noqa: E501
Validate a JSON (JavaScript Object Notation) document file; if the document is not valid, identifies the errors in the document # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.validate_document_json_validation_with_http_info(input_file, async_req=True)
>>> result = thread.get()
:param async_req bool
:param file input_file: Input file to perform the operation on. (required)
:return: DocumentValidationResult
If the method is called asynchronously,
returns the request thread.
"""

all_params = ['input_file'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')

params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method validate_document_json_validation" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'input_file' is set
if ('input_file' not in params or
params['input_file'] is None):
raise ValueError("Missing the required parameter `input_file` when calling `validate_document_json_validation`") # noqa: E501

collection_formats = {}

path_params = {}

query_params = []

header_params = {}

form_params = []
local_var_files = {}
if 'input_file' in params:
local_var_files['inputFile'] = params['input_file'] # noqa: E501

body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/octet-stream']) # noqa: E501

# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['multipart/form-data']) # noqa: E501

# Authentication setting
auth_settings = ['Apikey'] # noqa: E501

return self.api_client.call_api(
'/convert/validate/json', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='DocumentValidationResult', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)

def validate_document_pdf_validation(self, input_file, **kwargs): # noqa: E501
"""Validate a PDF document file # noqa: E501
Validate a PDF document; if the document is not valid, identifies the errors in the document # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.validate_document_pdf_validation(input_file, async_req=True)
>>> result = thread.get()
:param async_req bool
:param file input_file: Input file to perform the operation on. (required)
:return: DocumentValidationResult
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.validate_document_pdf_validation_with_http_info(input_file, **kwargs) # noqa: E501
else:
(data) = self.validate_document_pdf_validation_with_http_info(input_file, **kwargs) # noqa: E501
return data

def validate_document_pdf_validation_with_http_info(self, input_file, **kwargs): # noqa: E501
"""Validate a PDF document file # noqa: E501
Validate a PDF document; if the document is not valid, identifies the errors in the document # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.validate_document_pdf_validation_with_http_info(input_file, async_req=True)
>>> result = thread.get()
:param async_req bool
:param file input_file: Input file to perform the operation on. (required)
:return: DocumentValidationResult
If the method is called asynchronously,
returns the request thread.
"""

all_params = ['input_file'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')

params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method validate_document_pdf_validation" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'input_file' is set
if ('input_file' not in params or
params['input_file'] is None):
raise ValueError("Missing the required parameter `input_file` when calling `validate_document_pdf_validation`") # noqa: E501

collection_formats = {}

path_params = {}

query_params = []

header_params = {}

form_params = []
local_var_files = {}
if 'input_file' in params:
local_var_files['inputFile'] = params['input_file'] # noqa: E501

body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/octet-stream']) # noqa: E501

# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['multipart/form-data']) # noqa: E501

# Authentication setting
auth_settings = ['Apikey'] # noqa: E501

return self.api_client.call_api(
'/convert/validate/pdf', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='DocumentValidationResult', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)

def validate_document_pptx_validation(self, input_file, **kwargs): # noqa: E501
"""Validate a PowerPoint presentation (PPTX) # noqa: E501
Expand Down Expand Up @@ -329,3 +527,102 @@ def validate_document_xlsx_validation_with_http_info(self, input_file, **kwargs)
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)

def validate_document_xml_validation(self, input_file, **kwargs): # noqa: E501
"""Validate an XML file # noqa: E501
Validate an XML document file; if the document is not valid, identifies the errors in the document # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.validate_document_xml_validation(input_file, async_req=True)
>>> result = thread.get()
:param async_req bool
:param file input_file: Input file to perform the operation on. (required)
:return: DocumentValidationResult
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.validate_document_xml_validation_with_http_info(input_file, **kwargs) # noqa: E501
else:
(data) = self.validate_document_xml_validation_with_http_info(input_file, **kwargs) # noqa: E501
return data

def validate_document_xml_validation_with_http_info(self, input_file, **kwargs): # noqa: E501
"""Validate an XML file # noqa: E501
Validate an XML document file; if the document is not valid, identifies the errors in the document # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.validate_document_xml_validation_with_http_info(input_file, async_req=True)
>>> result = thread.get()
:param async_req bool
:param file input_file: Input file to perform the operation on. (required)
:return: DocumentValidationResult
If the method is called asynchronously,
returns the request thread.
"""

all_params = ['input_file'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')

params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method validate_document_xml_validation" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'input_file' is set
if ('input_file' not in params or
params['input_file'] is None):
raise ValueError("Missing the required parameter `input_file` when calling `validate_document_xml_validation`") # noqa: E501

collection_formats = {}

path_params = {}

query_params = []

header_params = {}

form_params = []
local_var_files = {}
if 'input_file' in params:
local_var_files['inputFile'] = params['input_file'] # noqa: E501

body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/octet-stream']) # noqa: E501

# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['multipart/form-data']) # noqa: E501

# Authentication setting
auth_settings = ['Apikey'] # noqa: E501

return self.api_client.call_api(
'/convert/validate/xml', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='DocumentValidationResult', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
2 changes: 1 addition & 1 deletion cloudmersive_convert_api_client/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None,
self.default_headers[header_name] = header_value
self.cookie = cookie
# Set default User-Agent.
self.user_agent = 'Swagger-Codegen/2.1.0/python'
self.user_agent = 'Swagger-Codegen/2.1.1/python'

def __del__(self):
if self._pool is not None:
Expand Down
2 changes: 1 addition & 1 deletion cloudmersive_convert_api_client/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,5 +240,5 @@ def to_debug_report(self):
"OS: {env}\n"\
"Python Version: {pyversion}\n"\
"Version of the API: v1\n"\
"SDK Package Version: 2.1.0".\
"SDK Package Version: 2.1.1".\
format(env=sys.platform, pyversion=sys.version)
Loading

0 comments on commit 88f743e

Please sign in to comment.