Skip to content

Commit

Permalink
Added
Browse files Browse the repository at this point in the history
  • Loading branch information
Cloudmersive committed Oct 5, 2019
1 parent 73cc4cb commit 4418c07
Show file tree
Hide file tree
Showing 13 changed files with 215 additions and 60 deletions.
3 changes: 2 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.0.8
- Package version: 2.0.9
- Build package: io.swagger.codegen.languages.PythonClientCodegen

## Requirements.
Expand Down Expand Up @@ -101,6 +101,7 @@ Class | Method | HTTP request | Description
*ConvertDocumentApi* | [**convert_document_ppt_to_pptx**](docs/ConvertDocumentApi.md#convert_document_ppt_to_pptx) | **POST** /convert/ppt/to/pptx | PowerPoint PPT (97-03) to PPTX
*ConvertDocumentApi* | [**convert_document_pptx_to_pdf**](docs/ConvertDocumentApi.md#convert_document_pptx_to_pdf) | **POST** /convert/pptx/to/pdf | PowerPoint PPTX to PDF
*ConvertDocumentApi* | [**convert_document_pptx_to_txt**](docs/ConvertDocumentApi.md#convert_document_pptx_to_txt) | **POST** /convert/pptx/to/txt | PowerPoint PPTX to Text
*ConvertDocumentApi* | [**convert_document_xls_to_csv**](docs/ConvertDocumentApi.md#convert_document_xls_to_csv) | **POST** /convert/xls/to/csv | Excel XLS (97-03) to CSV
*ConvertDocumentApi* | [**convert_document_xls_to_pdf**](docs/ConvertDocumentApi.md#convert_document_xls_to_pdf) | **POST** /convert/xls/to/pdf | Excel XLS (97-03) to PDF
*ConvertDocumentApi* | [**convert_document_xls_to_xlsx**](docs/ConvertDocumentApi.md#convert_document_xls_to_xlsx) | **POST** /convert/xls/to/xlsx | Excel XLS (97-03) to XLSX
*ConvertDocumentApi* | [**convert_document_xlsx_to_csv**](docs/ConvertDocumentApi.md#convert_document_xlsx_to_csv) | **POST** /convert/xlsx/to/csv | Excel XLSX to CSV
Expand Down
113 changes: 106 additions & 7 deletions cloudmersive_convert_api_client/api/convert_document_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def convert_document_autodetect_get_info_with_http_info(self, input_file, **kwar
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/octet-stream']) # noqa: E501
['application/json', 'text/json', 'application/xml', 'text/xml']) # noqa: E501

# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
Expand Down Expand Up @@ -1914,6 +1914,105 @@ def convert_document_pptx_to_txt_with_http_info(self, input_file, **kwargs): #
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)

def convert_document_xls_to_csv(self, input_file, **kwargs): # noqa: E501
"""Excel XLS (97-03) to CSV # noqa: E501
Convert/upgrade Office Excel (97-2003) Workbooks (xls) to standard CSV format. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.convert_document_xls_to_csv(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: str
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.convert_document_xls_to_csv_with_http_info(input_file, **kwargs) # noqa: E501
else:
(data) = self.convert_document_xls_to_csv_with_http_info(input_file, **kwargs) # noqa: E501
return data

def convert_document_xls_to_csv_with_http_info(self, input_file, **kwargs): # noqa: E501
"""Excel XLS (97-03) to CSV # noqa: E501
Convert/upgrade Office Excel (97-2003) Workbooks (xls) to standard CSV format. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.convert_document_xls_to_csv_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: str
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 convert_document_xls_to_csv" % 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 `convert_document_xls_to_csv`") # 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/xls/to/csv', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='str', # 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 convert_document_xls_to_pdf(self, input_file, **kwargs): # noqa: E501
"""Excel XLS (97-03) to PDF # noqa: E501
Expand Down Expand Up @@ -2115,7 +2214,7 @@ def convert_document_xls_to_xlsx_with_http_info(self, input_file, **kwargs): #
def convert_document_xlsx_to_csv(self, input_file, **kwargs): # noqa: E501
"""Excel XLSX to CSV # noqa: E501
Convert Office Excel Workbooks (xlsx) to standard Comma-Separated Values (CSV) format. # noqa: E501
Convert Office Excel Workbooks (XLSX) to standard Comma-Separated Values (CSV) format. Supports both XLSX and XLSB file Excel formats. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.convert_document_xlsx_to_csv(input_file, async_req=True)
Expand All @@ -2137,7 +2236,7 @@ def convert_document_xlsx_to_csv(self, input_file, **kwargs): # noqa: E501
def convert_document_xlsx_to_csv_with_http_info(self, input_file, **kwargs): # noqa: E501
"""Excel XLSX to CSV # noqa: E501
Convert Office Excel Workbooks (xlsx) to standard Comma-Separated Values (CSV) format. # noqa: E501
Convert Office Excel Workbooks (XLSX) to standard Comma-Separated Values (CSV) format. Supports both XLSX and XLSB file Excel formats. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.convert_document_xlsx_to_csv_with_http_info(input_file, async_req=True)
Expand Down Expand Up @@ -2214,7 +2313,7 @@ def convert_document_xlsx_to_csv_with_http_info(self, input_file, **kwargs): #
def convert_document_xlsx_to_pdf(self, input_file, **kwargs): # noqa: E501
"""Excel XLSX to PDF # noqa: E501
Convert Office Excel Workbooks (xlsx) to standard PDF. Converts all worksheets in the workbook to PDF. # noqa: E501
Convert Office Excel Workbooks (XLSX) to standard PDF. Converts all worksheets in the workbook to PDF. Supports both XLSX and XLSB Excel file formats. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.convert_document_xlsx_to_pdf(input_file, async_req=True)
Expand All @@ -2236,7 +2335,7 @@ def convert_document_xlsx_to_pdf(self, input_file, **kwargs): # noqa: E501
def convert_document_xlsx_to_pdf_with_http_info(self, input_file, **kwargs): # noqa: E501
"""Excel XLSX to PDF # noqa: E501
Convert Office Excel Workbooks (xlsx) to standard PDF. Converts all worksheets in the workbook to PDF. # noqa: E501
Convert Office Excel Workbooks (XLSX) to standard PDF. Converts all worksheets in the workbook to PDF. Supports both XLSX and XLSB Excel file formats. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.convert_document_xlsx_to_pdf_with_http_info(input_file, async_req=True)
Expand Down Expand Up @@ -2313,7 +2412,7 @@ def convert_document_xlsx_to_pdf_with_http_info(self, input_file, **kwargs): #
def convert_document_xlsx_to_txt(self, input_file, **kwargs): # noqa: E501
"""Excel XLSX to Text # noqa: E501
Convert Office Excel Workbooks (xlsx) to standard Text. Converts all worksheets in the workbook to Text. # noqa: E501
Convert Office Excel Workbooks (XLSX) to standard Text. Converts all worksheets in the workbook to Text. Supports both XLSX and XLSB file formats. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.convert_document_xlsx_to_txt(input_file, async_req=True)
Expand All @@ -2335,7 +2434,7 @@ def convert_document_xlsx_to_txt(self, input_file, **kwargs): # noqa: E501
def convert_document_xlsx_to_txt_with_http_info(self, input_file, **kwargs): # noqa: E501
"""Excel XLSX to Text # noqa: E501
Convert Office Excel Workbooks (xlsx) to standard Text. Converts all worksheets in the workbook to Text. # noqa: E501
Convert Office Excel Workbooks (XLSX) to standard Text. Converts all worksheets in the workbook to Text. Supports both XLSX and XLSB file formats. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.convert_document_xlsx_to_txt_with_http_info(input_file, async_req=True)
Expand Down
4 changes: 2 additions & 2 deletions cloudmersive_convert_api_client/api/convert_image_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def convert_image_image_format_convert_with_http_info(self, format1, format2, in
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'text/json', 'application/xml', 'text/xml']) # noqa: E501
['application/octet-stream']) # noqa: E501

# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
Expand Down Expand Up @@ -329,7 +329,7 @@ def convert_image_image_set_dpi_with_http_info(self, dpi, input_file, **kwargs):
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'text/json', 'application/xml', 'text/xml']) # noqa: E501
['application/octet-stream']) # noqa: E501

# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def convert_template_apply_docx_template_with_http_info(self, input_file, **kwar
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'text/json', 'application/xml', 'text/xml']) # noqa: E501
['application/octet-stream']) # noqa: E501

# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
Expand Down
Loading

0 comments on commit 4418c07

Please sign in to comment.