-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4418c07
commit c1fd46d
Showing
17 changed files
with
672 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
133 changes: 133 additions & 0 deletions
133
cloudmersive_convert_api_client/api/split_document_api.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
# coding: utf-8 | ||
|
||
""" | ||
convertapi | ||
Convert API lets you effortlessly convert file formats and types. # noqa: E501 | ||
OpenAPI spec version: v1 | ||
Generated by: https://github.com/swagger-api/swagger-codegen.git | ||
""" | ||
|
||
|
||
from __future__ import absolute_import | ||
|
||
import re # noqa: F401 | ||
|
||
# python 2 and python 3 compatibility library | ||
import six | ||
|
||
from cloudmersive_convert_api_client.api_client import ApiClient | ||
|
||
|
||
class SplitDocumentApi(object): | ||
"""NOTE: This class is auto generated by the swagger code generator program. | ||
Do not edit the class manually. | ||
Ref: https://github.com/swagger-api/swagger-codegen | ||
""" | ||
|
||
def __init__(self, api_client=None): | ||
if api_client is None: | ||
api_client = ApiClient() | ||
self.api_client = api_client | ||
|
||
def split_document_xlsx(self, input_file, **kwargs): # noqa: E501 | ||
"""Split a single Excel XLSX into Separate Worksheets # noqa: E501 | ||
Split an Excel XLSX Spreadsheet, comprised of multiple Worksheets (or Tabs) into separate Excel XLSX spreadsheet files, with each containing exactly one Worksheet. # noqa: E501 | ||
This method makes a synchronous HTTP request by default. To make an | ||
asynchronous HTTP request, please pass async_req=True | ||
>>> thread = api.split_document_xlsx(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: SplitXlsxWorksheetResult | ||
If the method is called asynchronously, | ||
returns the request thread. | ||
""" | ||
kwargs['_return_http_data_only'] = True | ||
if kwargs.get('async_req'): | ||
return self.split_document_xlsx_with_http_info(input_file, **kwargs) # noqa: E501 | ||
else: | ||
(data) = self.split_document_xlsx_with_http_info(input_file, **kwargs) # noqa: E501 | ||
return data | ||
|
||
def split_document_xlsx_with_http_info(self, input_file, **kwargs): # noqa: E501 | ||
"""Split a single Excel XLSX into Separate Worksheets # noqa: E501 | ||
Split an Excel XLSX Spreadsheet, comprised of multiple Worksheets (or Tabs) into separate Excel XLSX spreadsheet files, with each containing exactly one Worksheet. # noqa: E501 | ||
This method makes a synchronous HTTP request by default. To make an | ||
asynchronous HTTP request, please pass async_req=True | ||
>>> thread = api.split_document_xlsx_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: SplitXlsxWorksheetResult | ||
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 split_document_xlsx" % 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 `split_document_xlsx`") # 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/split/xlsx', 'POST', | ||
path_params, | ||
query_params, | ||
header_params, | ||
body=body_params, | ||
post_params=form_params, | ||
files=local_var_files, | ||
response_type='SplitXlsxWorksheetResult', # 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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
145 changes: 145 additions & 0 deletions
145
cloudmersive_convert_api_client/models/split_xlsx_worksheet_result.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
# coding: utf-8 | ||
|
||
""" | ||
convertapi | ||
Convert API lets you effortlessly convert file formats and types. # noqa: E501 | ||
OpenAPI spec version: v1 | ||
Generated by: https://github.com/swagger-api/swagger-codegen.git | ||
""" | ||
|
||
|
||
import pprint | ||
import re # noqa: F401 | ||
|
||
import six | ||
|
||
from cloudmersive_convert_api_client.models.worksheet_result import WorksheetResult # noqa: F401,E501 | ||
|
||
|
||
class SplitXlsxWorksheetResult(object): | ||
"""NOTE: This class is auto generated by the swagger code generator program. | ||
Do not edit the class manually. | ||
""" | ||
|
||
""" | ||
Attributes: | ||
swagger_types (dict): The key is attribute name | ||
and the value is attribute type. | ||
attribute_map (dict): The key is attribute name | ||
and the value is json key in definition. | ||
""" | ||
swagger_types = { | ||
'result_worksheets': 'list[WorksheetResult]', | ||
'successful': 'bool' | ||
} | ||
|
||
attribute_map = { | ||
'result_worksheets': 'ResultWorksheets', | ||
'successful': 'Successful' | ||
} | ||
|
||
def __init__(self, result_worksheets=None, successful=None): # noqa: E501 | ||
"""SplitXlsxWorksheetResult - a model defined in Swagger""" # noqa: E501 | ||
|
||
self._result_worksheets = None | ||
self._successful = None | ||
self.discriminator = None | ||
|
||
if result_worksheets is not None: | ||
self.result_worksheets = result_worksheets | ||
if successful is not None: | ||
self.successful = successful | ||
|
||
@property | ||
def result_worksheets(self): | ||
"""Gets the result_worksheets of this SplitXlsxWorksheetResult. # noqa: E501 | ||
:return: The result_worksheets of this SplitXlsxWorksheetResult. # noqa: E501 | ||
:rtype: list[WorksheetResult] | ||
""" | ||
return self._result_worksheets | ||
|
||
@result_worksheets.setter | ||
def result_worksheets(self, result_worksheets): | ||
"""Sets the result_worksheets of this SplitXlsxWorksheetResult. | ||
:param result_worksheets: The result_worksheets of this SplitXlsxWorksheetResult. # noqa: E501 | ||
:type: list[WorksheetResult] | ||
""" | ||
|
||
self._result_worksheets = result_worksheets | ||
|
||
@property | ||
def successful(self): | ||
"""Gets the successful of this SplitXlsxWorksheetResult. # noqa: E501 | ||
True if the operation was successful, false otherwise # noqa: E501 | ||
:return: The successful of this SplitXlsxWorksheetResult. # noqa: E501 | ||
:rtype: bool | ||
""" | ||
return self._successful | ||
|
||
@successful.setter | ||
def successful(self, successful): | ||
"""Sets the successful of this SplitXlsxWorksheetResult. | ||
True if the operation was successful, false otherwise # noqa: E501 | ||
:param successful: The successful of this SplitXlsxWorksheetResult. # noqa: E501 | ||
:type: bool | ||
""" | ||
|
||
self._successful = successful | ||
|
||
def to_dict(self): | ||
"""Returns the model properties as a dict""" | ||
result = {} | ||
|
||
for attr, _ in six.iteritems(self.swagger_types): | ||
value = getattr(self, attr) | ||
if isinstance(value, list): | ||
result[attr] = list(map( | ||
lambda x: x.to_dict() if hasattr(x, "to_dict") else x, | ||
value | ||
)) | ||
elif hasattr(value, "to_dict"): | ||
result[attr] = value.to_dict() | ||
elif isinstance(value, dict): | ||
result[attr] = dict(map( | ||
lambda item: (item[0], item[1].to_dict()) | ||
if hasattr(item[1], "to_dict") else item, | ||
value.items() | ||
)) | ||
else: | ||
result[attr] = value | ||
if issubclass(SplitXlsxWorksheetResult, dict): | ||
for key, value in self.items(): | ||
result[key] = value | ||
|
||
return result | ||
|
||
def to_str(self): | ||
"""Returns the string representation of the model""" | ||
return pprint.pformat(self.to_dict()) | ||
|
||
def __repr__(self): | ||
"""For `print` and `pprint`""" | ||
return self.to_str() | ||
|
||
def __eq__(self, other): | ||
"""Returns true if both objects are equal""" | ||
if not isinstance(other, SplitXlsxWorksheetResult): | ||
return False | ||
|
||
return self.__dict__ == other.__dict__ | ||
|
||
def __ne__(self, other): | ||
"""Returns true if both objects are not equal""" | ||
return not self == other |
Oops, something went wrong.