Skip to content

Commit

Permalink
2.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Cloudmersive committed Oct 25, 2019
1 parent 88f743e commit 0b3c689
Show file tree
Hide file tree
Showing 13 changed files with 389 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 @@
2.4.5
unset
4 changes: 3 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.1
- Package version: 2.1.2
- Build package: io.swagger.codegen.languages.PythonClientCodegen

## Requirements.
Expand Down Expand Up @@ -132,6 +132,7 @@ Class | Method | HTTP request | Description
*EditDocumentApi* | [**edit_document_docx_remove_object**](docs/EditDocumentApi.md#edit_document_docx_remove_object) | **POST** /convert/edit/docx/remove-object | Delete any object in a DOCX
*EditDocumentApi* | [**edit_document_docx_replace**](docs/EditDocumentApi.md#edit_document_docx_replace) | **POST** /convert/edit/docx/replace-all | Replace string in DOCX
*EditDocumentApi* | [**edit_document_docx_set_footer**](docs/EditDocumentApi.md#edit_document_docx_set_footer) | **POST** /convert/edit/docx/set-footer | Set the footer in a DOCX
*EditDocumentApi* | [**edit_document_docx_set_footer_add_page_number**](docs/EditDocumentApi.md#edit_document_docx_set_footer_add_page_number) | **POST** /convert/edit/docx/set-footer/add-page-number | Add page number to footer in a DOCX
*EditDocumentApi* | [**edit_document_docx_set_header**](docs/EditDocumentApi.md#edit_document_docx_set_header) | **POST** /convert/edit/docx/set-header | Set the header in a DOCX
*EditDocumentApi* | [**edit_document_finish_editing**](docs/EditDocumentApi.md#edit_document_finish_editing) | **POST** /convert/edit/finish-editing | Download result from document editing
*EditDocumentApi* | [**edit_document_pptx_replace**](docs/EditDocumentApi.md#edit_document_pptx_replace) | **POST** /convert/edit/pptx/replace-all | Replace string in PPTX
Expand Down Expand Up @@ -175,6 +176,7 @@ Class | Method | HTTP request | Description
- [DocxRemoveObjectResponse](docs/DocxRemoveObjectResponse.md)
- [DocxRun](docs/DocxRun.md)
- [DocxSection](docs/DocxSection.md)
- [DocxSetFooterAddPageNumberRequest](docs/DocxSetFooterAddPageNumberRequest.md)
- [DocxSetFooterRequest](docs/DocxSetFooterRequest.md)
- [DocxSetFooterResponse](docs/DocxSetFooterResponse.md)
- [DocxSetHeaderRequest](docs/DocxSetHeaderRequest.md)
Expand Down
1 change: 1 addition & 0 deletions cloudmersive_convert_api_client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
from cloudmersive_convert_api_client.models.docx_remove_object_response import DocxRemoveObjectResponse
from cloudmersive_convert_api_client.models.docx_run import DocxRun
from cloudmersive_convert_api_client.models.docx_section import DocxSection
from cloudmersive_convert_api_client.models.docx_set_footer_add_page_number_request import DocxSetFooterAddPageNumberRequest
from cloudmersive_convert_api_client.models.docx_set_footer_request import DocxSetFooterRequest
from cloudmersive_convert_api_client.models.docx_set_footer_response import DocxSetFooterResponse
from cloudmersive_convert_api_client.models.docx_set_header_request import DocxSetHeaderRequest
Expand Down
99 changes: 99 additions & 0 deletions cloudmersive_convert_api_client/api/edit_document_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1419,6 +1419,105 @@ def edit_document_docx_set_footer_with_http_info(self, req_config, **kwargs): #
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)

def edit_document_docx_set_footer_add_page_number(self, req_config, **kwargs): # noqa: E501
"""Add page number to footer in a DOCX # noqa: E501
Set the footer in a Word Document (DOCX) to contain a page number # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.edit_document_docx_set_footer_add_page_number(req_config, async_req=True)
>>> result = thread.get()
:param async_req bool
:param DocxSetFooterAddPageNumberRequest req_config: (required)
:return: DocxSetFooterResponse
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.edit_document_docx_set_footer_add_page_number_with_http_info(req_config, **kwargs) # noqa: E501
else:
(data) = self.edit_document_docx_set_footer_add_page_number_with_http_info(req_config, **kwargs) # noqa: E501
return data

def edit_document_docx_set_footer_add_page_number_with_http_info(self, req_config, **kwargs): # noqa: E501
"""Add page number to footer in a DOCX # noqa: E501
Set the footer in a Word Document (DOCX) to contain a page number # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.edit_document_docx_set_footer_add_page_number_with_http_info(req_config, async_req=True)
>>> result = thread.get()
:param async_req bool
:param DocxSetFooterAddPageNumberRequest req_config: (required)
:return: DocxSetFooterResponse
If the method is called asynchronously,
returns the request thread.
"""

all_params = ['req_config'] # 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 edit_document_docx_set_footer_add_page_number" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'req_config' is set
if ('req_config' not in params or
params['req_config'] is None):
raise ValueError("Missing the required parameter `req_config` when calling `edit_document_docx_set_footer_add_page_number`") # noqa: E501

collection_formats = {}

path_params = {}

query_params = []

header_params = {}

form_params = []
local_var_files = {}

body_params = None
if 'req_config' in params:
body_params = params['req_config']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['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
['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded']) # noqa: E501

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

return self.api_client.call_api(
'/convert/edit/docx/set-footer/add-page-number', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='DocxSetFooterResponse', # 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 edit_document_docx_set_header(self, req_config, **kwargs): # noqa: E501
"""Set the header in a DOCX # noqa: E501
Expand Down
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.1/python'
self.user_agent = 'Swagger-Codegen/2.1.2/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.1".\
"SDK Package Version: 2.1.2".\
format(env=sys.platform, pyversion=sys.version)
1 change: 1 addition & 0 deletions cloudmersive_convert_api_client/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
from cloudmersive_convert_api_client.models.docx_remove_object_response import DocxRemoveObjectResponse
from cloudmersive_convert_api_client.models.docx_run import DocxRun
from cloudmersive_convert_api_client.models.docx_section import DocxSection
from cloudmersive_convert_api_client.models.docx_set_footer_add_page_number_request import DocxSetFooterAddPageNumberRequest
from cloudmersive_convert_api_client.models.docx_set_footer_request import DocxSetFooterRequest
from cloudmersive_convert_api_client.models.docx_set_footer_response import DocxSetFooterResponse
from cloudmersive_convert_api_client.models.docx_set_header_request import DocxSetHeaderRequest
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
# 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


class DocxSetFooterAddPageNumberRequest(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 = {
'prepend_text': 'str',
'input_file_bytes': 'str',
'input_file_url': 'str'
}

attribute_map = {
'prepend_text': 'PrependText',
'input_file_bytes': 'InputFileBytes',
'input_file_url': 'InputFileUrl'
}

def __init__(self, prepend_text=None, input_file_bytes=None, input_file_url=None): # noqa: E501
"""DocxSetFooterAddPageNumberRequest - a model defined in Swagger""" # noqa: E501

self._prepend_text = None
self._input_file_bytes = None
self._input_file_url = None
self.discriminator = None

if prepend_text is not None:
self.prepend_text = prepend_text
if input_file_bytes is not None:
self.input_file_bytes = input_file_bytes
if input_file_url is not None:
self.input_file_url = input_file_url

@property
def prepend_text(self):
"""Gets the prepend_text of this DocxSetFooterAddPageNumberRequest. # noqa: E501
:return: The prepend_text of this DocxSetFooterAddPageNumberRequest. # noqa: E501
:rtype: str
"""
return self._prepend_text

@prepend_text.setter
def prepend_text(self, prepend_text):
"""Sets the prepend_text of this DocxSetFooterAddPageNumberRequest.
:param prepend_text: The prepend_text of this DocxSetFooterAddPageNumberRequest. # noqa: E501
:type: str
"""

self._prepend_text = prepend_text

@property
def input_file_bytes(self):
"""Gets the input_file_bytes of this DocxSetFooterAddPageNumberRequest. # noqa: E501
Optional: Bytes of the input file to operate on # noqa: E501
:return: The input_file_bytes of this DocxSetFooterAddPageNumberRequest. # noqa: E501
:rtype: str
"""
return self._input_file_bytes

@input_file_bytes.setter
def input_file_bytes(self, input_file_bytes):
"""Sets the input_file_bytes of this DocxSetFooterAddPageNumberRequest.
Optional: Bytes of the input file to operate on # noqa: E501
:param input_file_bytes: The input_file_bytes of this DocxSetFooterAddPageNumberRequest. # noqa: E501
:type: str
"""
if input_file_bytes is not None and not re.search(r'^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$', input_file_bytes): # noqa: E501
raise ValueError(r"Invalid value for `input_file_bytes`, must be a follow pattern or equal to `/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/`") # noqa: E501

self._input_file_bytes = input_file_bytes

@property
def input_file_url(self):
"""Gets the input_file_url of this DocxSetFooterAddPageNumberRequest. # noqa: E501
Optional: URL of a file to operate on as input. This can be a public URL, or you can also use the begin-editing API to upload a document and pass in the secure URL result from that operation as the URL here (this URL is not public). # noqa: E501
:return: The input_file_url of this DocxSetFooterAddPageNumberRequest. # noqa: E501
:rtype: str
"""
return self._input_file_url

@input_file_url.setter
def input_file_url(self, input_file_url):
"""Sets the input_file_url of this DocxSetFooterAddPageNumberRequest.
Optional: URL of a file to operate on as input. This can be a public URL, or you can also use the begin-editing API to upload a document and pass in the secure URL result from that operation as the URL here (this URL is not public). # noqa: E501
:param input_file_url: The input_file_url of this DocxSetFooterAddPageNumberRequest. # noqa: E501
:type: str
"""

self._input_file_url = input_file_url

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(DocxSetFooterAddPageNumberRequest, 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, DocxSetFooterAddPageNumberRequest):
return False

return self.__dict__ == other.__dict__

def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other
12 changes: 12 additions & 0 deletions docs/DocxSetFooterAddPageNumberRequest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# DocxSetFooterAddPageNumberRequest

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**prepend_text** | **str** | | [optional]
**input_file_bytes** | **str** | Optional: Bytes of the input file to operate on | [optional]
**input_file_url** | **str** | Optional: URL of a file to operate on as input. This can be a public URL, or you can also use the begin-editing API to upload a document and pass in the secure URL result from that operation as the URL here (this URL is not public). | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


Loading

0 comments on commit 0b3c689

Please sign in to comment.