Skip to content

Commit

Permalink
2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Cloudmersive committed Oct 14, 2019
1 parent 4418c07 commit c1fd46d
Show file tree
Hide file tree
Showing 17 changed files with 672 additions and 5 deletions.
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.0.9
- Package version: 2.1.0
- Build package: io.swagger.codegen.languages.PythonClientCodegen

## Requirements.
Expand Down Expand Up @@ -145,6 +145,7 @@ Class | Method | HTTP request | Description
*MergeDocumentApi* | [**merge_document_pdf**](docs/MergeDocumentApi.md#merge_document_pdf) | **POST** /convert/merge/pdf | Merge Multple PDF Files Together
*MergeDocumentApi* | [**merge_document_pptx**](docs/MergeDocumentApi.md#merge_document_pptx) | **POST** /convert/merge/pptx | Merge Multple PowerPoint PPTX Together
*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_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)
Expand Down Expand Up @@ -226,8 +227,10 @@ Class | Method | HTTP request | Description
- [RemoveDocxHeadersAndFootersResponse](docs/RemoveDocxHeadersAndFootersResponse.md)
- [ReplaceStringRequest](docs/ReplaceStringRequest.md)
- [ScreenshotRequest](docs/ScreenshotRequest.md)
- [SplitXlsxWorksheetResult](docs/SplitXlsxWorksheetResult.md)
- [TextConversionResult](docs/TextConversionResult.md)
- [ViewerResponse](docs/ViewerResponse.md)
- [WorksheetResult](docs/WorksheetResult.md)
- [XlsxImage](docs/XlsxImage.md)
- [XlsxSpreadsheetCell](docs/XlsxSpreadsheetCell.md)
- [XlsxSpreadsheetColumn](docs/XlsxSpreadsheetColumn.md)
Expand Down
3 changes: 3 additions & 0 deletions cloudmersive_convert_api_client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
from cloudmersive_convert_api_client.api.convert_web_api import ConvertWebApi
from cloudmersive_convert_api_client.api.edit_document_api import EditDocumentApi
from cloudmersive_convert_api_client.api.merge_document_api import MergeDocumentApi
from cloudmersive_convert_api_client.api.split_document_api import SplitDocumentApi
from cloudmersive_convert_api_client.api.validate_document_api import ValidateDocumentApi
from cloudmersive_convert_api_client.api.viewer_tools_api import ViewerToolsApi

Expand Down Expand Up @@ -104,8 +105,10 @@
from cloudmersive_convert_api_client.models.remove_docx_headers_and_footers_response import RemoveDocxHeadersAndFootersResponse
from cloudmersive_convert_api_client.models.replace_string_request import ReplaceStringRequest
from cloudmersive_convert_api_client.models.screenshot_request import ScreenshotRequest
from cloudmersive_convert_api_client.models.split_xlsx_worksheet_result import SplitXlsxWorksheetResult
from cloudmersive_convert_api_client.models.text_conversion_result import TextConversionResult
from cloudmersive_convert_api_client.models.viewer_response import ViewerResponse
from cloudmersive_convert_api_client.models.worksheet_result import WorksheetResult
from cloudmersive_convert_api_client.models.xlsx_image import XlsxImage
from cloudmersive_convert_api_client.models.xlsx_spreadsheet_cell import XlsxSpreadsheetCell
from cloudmersive_convert_api_client.models.xlsx_spreadsheet_column import XlsxSpreadsheetColumn
Expand Down
1 change: 1 addition & 0 deletions cloudmersive_convert_api_client/api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@
from cloudmersive_convert_api_client.api.convert_web_api import ConvertWebApi
from cloudmersive_convert_api_client.api.edit_document_api import EditDocumentApi
from cloudmersive_convert_api_client.api.merge_document_api import MergeDocumentApi
from cloudmersive_convert_api_client.api.split_document_api import SplitDocumentApi
from cloudmersive_convert_api_client.api.validate_document_api import ValidateDocumentApi
from cloudmersive_convert_api_client.api.viewer_tools_api import ViewerToolsApi
133 changes: 133 additions & 0 deletions cloudmersive_convert_api_client/api/split_document_api.py
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)
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.0.9/python'
self.user_agent = 'Swagger-Codegen/2.1.0/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.0.9".\
"SDK Package Version: 2.1.0".\
format(env=sys.platform, pyversion=sys.version)
2 changes: 2 additions & 0 deletions cloudmersive_convert_api_client/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,10 @@
from cloudmersive_convert_api_client.models.remove_docx_headers_and_footers_response import RemoveDocxHeadersAndFootersResponse
from cloudmersive_convert_api_client.models.replace_string_request import ReplaceStringRequest
from cloudmersive_convert_api_client.models.screenshot_request import ScreenshotRequest
from cloudmersive_convert_api_client.models.split_xlsx_worksheet_result import SplitXlsxWorksheetResult
from cloudmersive_convert_api_client.models.text_conversion_result import TextConversionResult
from cloudmersive_convert_api_client.models.viewer_response import ViewerResponse
from cloudmersive_convert_api_client.models.worksheet_result import WorksheetResult
from cloudmersive_convert_api_client.models.xlsx_image import XlsxImage
from cloudmersive_convert_api_client.models.xlsx_spreadsheet_cell import XlsxSpreadsheetCell
from cloudmersive_convert_api_client.models.xlsx_spreadsheet_column import XlsxSpreadsheetColumn
Expand Down
145 changes: 145 additions & 0 deletions cloudmersive_convert_api_client/models/split_xlsx_worksheet_result.py
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
Loading

0 comments on commit c1fd46d

Please sign in to comment.