Skip to content

Commit 841d06a

Browse files
committed
Updated sources
1 parent e6ea2aa commit 841d06a

File tree

8 files changed

+348
-6
lines changed

8 files changed

+348
-6
lines changed

groupdocs_conversion_cloud/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@
66

77
# import apis
88
from groupdocs_conversion_cloud.apis.convert_api import ConvertApi
9-
from groupdocs_conversion_cloud.apis.info_api import InfoApi
109
from groupdocs_conversion_cloud.apis.file_api import FileApi
1110
from groupdocs_conversion_cloud.apis.folder_api import FolderApi
11+
from groupdocs_conversion_cloud.apis.info_api import InfoApi
12+
from groupdocs_conversion_cloud.apis.license_api import LicenseApi
1213
from groupdocs_conversion_cloud.apis.storage_api import StorageApi
1314

1415
# import requests
@@ -25,11 +26,14 @@
2526
from groupdocs_conversion_cloud.configuration import Configuration
2627

2728
# import models
29+
from groupdocs_conversion_cloud.models.consumption_result import ConsumptionResult
2830
from groupdocs_conversion_cloud.models.convert_options import ConvertOptions
2931
from groupdocs_conversion_cloud.models.convert_settings import ConvertSettings
3032
from groupdocs_conversion_cloud.models.disc_usage import DiscUsage
33+
from groupdocs_conversion_cloud.models.document_metadata import DocumentMetadata
3134
from groupdocs_conversion_cloud.models.error import Error
3235
from groupdocs_conversion_cloud.models.error_details import ErrorDetails
36+
from groupdocs_conversion_cloud.models.field_label import FieldLabel
3337
from groupdocs_conversion_cloud.models.file_versions import FileVersions
3438
from groupdocs_conversion_cloud.models.files_list import FilesList
3539
from groupdocs_conversion_cloud.models.files_upload_result import FilesUploadResult
@@ -46,6 +50,7 @@
4650
from groupdocs_conversion_cloud.models.email_load_options import EmailLoadOptions
4751
from groupdocs_conversion_cloud.models.file_version import FileVersion
4852
from groupdocs_conversion_cloud.models.html_convert_options import HtmlConvertOptions
53+
from groupdocs_conversion_cloud.models.html_load_options import HtmlLoadOptions
4954
from groupdocs_conversion_cloud.models.image_convert_options import ImageConvertOptions
5055
from groupdocs_conversion_cloud.models.image_load_options import ImageLoadOptions
5156
from groupdocs_conversion_cloud.models.one_load_options import OneLoadOptions

groupdocs_conversion_cloud/api_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,12 @@ def __init__(self, configuration, header_name=None, header_value=None,
7474
self.configuration = configuration
7575
self.pool = None
7676
self.rest_client = rest.RESTClientObject(configuration)
77-
self.default_headers = {'x-groupdocs-client': 'python sdk', 'x-groupdocs-version': '21.10'}
77+
self.default_headers = {'x-groupdocs-client': 'python sdk', 'x-groupdocs-version': '21.12'}
7878
if header_name is not None:
7979
self.default_headers[header_name] = header_value
8080
self.cookie = cookie
8181
# Set default User-Agent.
82-
self.user_agent = 'python sdk 21.10'
82+
self.user_agent = 'python sdk 21.12'
8383

8484
def __del__(self):
8585
if self.pool is not None:

groupdocs_conversion_cloud/apis/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@
77
from groupdocs_conversion_cloud.apis.file_api import FileApi
88
from groupdocs_conversion_cloud.apis.folder_api import FolderApi
99
from groupdocs_conversion_cloud.apis.info_api import InfoApi
10+
from groupdocs_conversion_cloud.apis.license_api import LicenseApi
1011
from groupdocs_conversion_cloud.apis.storage_api import StorageApi
Lines changed: 176 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,176 @@
1+
# coding: utf-8
2+
3+
# -----------------------------------------------------------------------------------
4+
# <copyright company="Aspose Pty Ltd">
5+
# Copyright (c) 2003-2021 Aspose Pty Ltd
6+
# </copyright>
7+
# <summary>
8+
# Permission is hereby granted, free of charge, to any person obtaining a copy
9+
# of this software and associated documentation files (the "Software"), to deal
10+
# in the Software without restriction, including without limitation the rights
11+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12+
# copies of the Software, and to permit persons to whom the Software is
13+
# furnished to do so, subject to the following conditions:
14+
#
15+
# The above copyright notice and this permission notice shall be included in all
16+
# copies or substantial portions of the Software.
17+
#
18+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24+
# SOFTWARE.
25+
# </summary>
26+
# -----------------------------------------------------------------------------------
27+
28+
from __future__ import absolute_import
29+
30+
import re # noqa: F401
31+
32+
# python 2 and python 3 compatibility library
33+
import six
34+
35+
from groupdocs_conversion_cloud.auth import Auth
36+
from groupdocs_conversion_cloud.api_client import ApiClient
37+
from groupdocs_conversion_cloud.api_exception import ApiException
38+
from groupdocs_conversion_cloud.configuration import Configuration
39+
40+
class LicenseApi(object):
41+
"""
42+
GroupDocs.Conversion Cloud API
43+
44+
:param configuration: API configuration
45+
"""
46+
47+
def __init__(self, configuration):
48+
api_client = ApiClient(configuration)
49+
50+
self.auth = Auth(configuration, api_client)
51+
self.api_client = api_client
52+
self.configuration = configuration
53+
54+
def close(self): # noqa: E501
55+
"""
56+
Closes thread pool. This method should be called when
57+
methods are executed asynchronously (is_async=True is passed as parameter)
58+
and this instance of LicenseApi is not going to be used any more.
59+
"""
60+
if self.api_client is not None:
61+
if(self.api_client.pool is not None):
62+
self.api_client.pool.close()
63+
self.api_client.pool.join()
64+
self.api_client.pool = None
65+
66+
@classmethod
67+
def from_keys(cls, app_sid, app_key):
68+
"""
69+
Initializes new instance of LicenseApi with API keys
70+
71+
:param app_sid Application identifier (App SID)
72+
:param app_key Application private key (App Key)
73+
"""
74+
configuration = Configuration(app_sid, app_key)
75+
return LicenseApi(configuration)
76+
77+
@classmethod
78+
def from_config(cls, configuration):
79+
"""
80+
Initializes new instance of LicenseApi with configuration options
81+
82+
:param configuration API configuration
83+
"""
84+
return LicenseApi(configuration)
85+
86+
def get_consumption_credit(self, **kwargs): # noqa: E501
87+
"""Get license consumption # noqa: E501
88+
89+
This method makes a synchronous HTTP request by default. To make an
90+
asynchronous HTTP request, please pass is_async=True
91+
92+
:param is_async bool
93+
:return: ConsumptionResult
94+
If the method is called asynchronously,
95+
returns the request thread.
96+
"""
97+
kwargs['_return_http_data_only'] = True
98+
99+
if kwargs.get('is_async'):
100+
return self._get_consumption_credit_with_http_info(**kwargs) # noqa: E501
101+
102+
(data) = self._get_consumption_credit_with_http_info(**kwargs) # noqa: E501
103+
return data
104+
105+
def _get_consumption_credit_with_http_info(self, **kwargs): # noqa: E501
106+
"""Get license consumption # noqa: E501
107+
108+
This method makes a synchronous HTTP request by default. To make an
109+
asynchronous HTTP request, please pass is_async=True
110+
111+
:param is_async bool
112+
113+
:return: ConsumptionResult
114+
If the method is called asynchronously,
115+
returns the request thread.
116+
"""
117+
params = locals()
118+
params['is_async'] = ''
119+
params['_return_http_data_only'] = False
120+
params['_preload_content'] = True
121+
params['_request_timeout'] = ''
122+
for key, val in six.iteritems(params['kwargs']):
123+
if key not in params:
124+
raise TypeError(
125+
"Got an unexpected keyword argument '%s'"
126+
" to method get_consumption_credit" % key
127+
)
128+
params[key] = val
129+
del params['kwargs']
130+
131+
collection_formats = {}
132+
path = '/conversion/consumption'
133+
path_params = {}
134+
135+
query_params = []
136+
137+
header_params = {}
138+
139+
form_params = []
140+
local_var_files = []
141+
142+
body_params = None
143+
# HTTP header `Accept`
144+
header_params['Accept'] = self.api_client.select_header_accept(
145+
['application/json']) # noqa: E501
146+
147+
# HTTP header `Content-Type`
148+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
149+
['application/json']) # noqa: E501
150+
151+
call_kwargs = {
152+
'resource_path':path,
153+
'method':'GET',
154+
'path_params':path_params,
155+
'query_params':query_params,
156+
'header_params':header_params,
157+
'body':body_params,
158+
'post_params':form_params,
159+
'files':local_var_files,
160+
'response_type':'ConsumptionResult', # noqa: E501
161+
'auth_settings':self.auth.get_auth_settings(),
162+
'is_async':params.get('is_async'),
163+
'_return_http_data_only':params.get('_return_http_data_only'),
164+
'_preload_content':params.get('_preload_content', True),
165+
'_request_timeout':params.get('_request_timeout'),
166+
'collection_formats':collection_formats
167+
}
168+
169+
return self.api_client.call_api(**call_kwargs) # noqa: E501
170+
171+
def __downcase_first_letter(self, s):
172+
if len(s) == 0:
173+
return str
174+
else:
175+
return s[0].lower() + s[1:]
176+

groupdocs_conversion_cloud/configuration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,6 @@ def to_debug_report(self):
202202
return "Python SDK Debug Report:\n"\
203203
"OS: {env}\n"\
204204
"Python Version: {pyversion}\n"\
205-
"Version of the API: 21.10\n"\
206-
"SDK Package Version: 21.10".\
205+
"Version of the API: 21.12\n"\
206+
"SDK Package Version: 21.12".\
207207
format(env=sys.platform, pyversion=sys.version)

groupdocs_conversion_cloud/models/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from __future__ import absolute_import
55

66
# import models
7+
from groupdocs_conversion_cloud.models.consumption_result import ConsumptionResult
78
from groupdocs_conversion_cloud.models.convert_options import ConvertOptions
89
from groupdocs_conversion_cloud.models.convert_settings import ConvertSettings
910
from groupdocs_conversion_cloud.models.disc_usage import DiscUsage

0 commit comments

Comments
 (0)