teamdbapi 2.37.1__py3-none-any.whl → 3.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- teamdbapi/__init__.py +11 -0
- teamdbapi/api/__init__.py +39 -34
- teamdbapi/api/assembly_api.py +2108 -2108
- teamdbapi/api/car_api.py +874 -874
- teamdbapi/api/component_api.py +954 -0
- teamdbapi/api/config_api.py +118 -118
- teamdbapi/api/criteria_api.py +126 -0
- teamdbapi/api/edit_api.py +433 -433
- teamdbapi/api/event_api.py +878 -878
- teamdbapi/api/fixed_field_api.py +320 -320
- teamdbapi/api/group_api.py +609 -609
- teamdbapi/api/import_export_api.py +828 -743
- teamdbapi/api/lap_api.py +708 -708
- teamdbapi/api/lap_report_api.py +490 -486
- teamdbapi/api/model_field_api.py +708 -708
- teamdbapi/api/mounting_api.py +219 -0
- teamdbapi/api/notes_authorization_api.py +324 -324
- teamdbapi/api/parameter_api.py +1176 -1176
- teamdbapi/api/part_api.py +304 -0
- teamdbapi/api/report_api.py +142 -142
- teamdbapi/api/revision_api.py +1420 -1420
- teamdbapi/api/revision_editor_selector_api.py +990 -990
- teamdbapi/api/run_api.py +603 -603
- teamdbapi/api/script_api.py +490 -490
- teamdbapi/api/session_api.py +720 -720
- teamdbapi/api/target_api.py +415 -415
- teamdbapi/api/team_db_list_api.py +987 -987
- teamdbapi/api/team_db_view_api.py +482 -482
- teamdbapi/api/tire_api.py +599 -599
- teamdbapi/api/tire_set_api.py +514 -514
- teamdbapi/api/track_api.py +506 -506
- teamdbapi/api/track_layout_api.py +514 -514
- teamdbapi/api/update_request_api.py +235 -0
- teamdbapi/api/user_api.py +474 -474
- teamdbapi/api/value_field_api.py +558 -558
- teamdbapi/api/version_api.py +449 -449
- teamdbapi/api_client.py +4 -8
- teamdbapi/configuration.py +6 -13
- teamdbapi/models/__init__.py +6 -0
- teamdbapi/models/assembly.py +1 -0
- teamdbapi/models/bleed_adjustment.py +1 -0
- teamdbapi/models/calibration.py +1 -0
- teamdbapi/models/car.py +1 -0
- teamdbapi/models/car_parameters_context.py +1 -0
- teamdbapi/models/compare_options.py +1 -0
- teamdbapi/models/compare_result.py +1 -0
- teamdbapi/models/compare_result_detail.py +2 -0
- teamdbapi/models/component.py +1217 -0
- teamdbapi/models/copy_from_tags_args.py +2 -0
- teamdbapi/models/couple_guid_text.py +1 -0
- teamdbapi/models/criteria.py +430 -0
- teamdbapi/models/criteria_value.py +197 -0
- teamdbapi/models/event.py +1 -0
- teamdbapi/models/fixed_field.py +2 -1
- teamdbapi/models/group.py +1 -0
- teamdbapi/models/import_parameters_args.py +1 -0
- teamdbapi/models/import_parameters_results.py +2 -0
- teamdbapi/models/item_value.py +1 -0
- teamdbapi/models/item_value_key.py +1 -0
- teamdbapi/models/lap.py +1 -0
- teamdbapi/models/lap_report_options.py +1 -0
- teamdbapi/models/model_field.py +3 -1
- teamdbapi/models/model_field_authorization.py +1 -0
- teamdbapi/models/mounting.py +489 -0
- teamdbapi/models/notes_authorization.py +1 -0
- teamdbapi/models/notes_context.py +1 -0
- teamdbapi/models/parameter.py +2 -0
- teamdbapi/models/parameter_cross_table.py +1 -0
- teamdbapi/models/part.py +963 -0
- teamdbapi/models/part_count.py +228 -0
- teamdbapi/models/problem_details.py +2 -6
- teamdbapi/models/revision.py +88 -3
- teamdbapi/models/revision_value.py +1 -0
- teamdbapi/models/run.py +1 -0
- teamdbapi/models/script.py +1 -0
- teamdbapi/models/session.py +1 -0
- teamdbapi/models/string_with_font_style.py +1 -0
- teamdbapi/models/target.py +64 -7
- teamdbapi/models/team_db_list.py +1 -0
- teamdbapi/models/team_db_list_item.py +1 -0
- teamdbapi/models/tire.py +2 -0
- teamdbapi/models/tire_set.py +2 -0
- teamdbapi/models/track.py +1 -0
- teamdbapi/models/track_layout.py +1 -0
- teamdbapi/models/user.py +1 -0
- teamdbapi/models/user_group.py +1 -0
- teamdbapi/models/value_field.py +1 -0
- teamdbapi/models/version.py +1 -0
- teamdbapi/rest.py +6 -1
- {teamdbapi-2.37.1.dist-info → teamdbapi-3.0.0.dist-info}/METADATA +5 -5
- teamdbapi-3.0.0.dist-info/RECORD +93 -0
- teamdbapi-2.37.1.dist-info/RECORD +0 -82
- {teamdbapi-2.37.1.dist-info → teamdbapi-3.0.0.dist-info}/LICENSE +0 -0
- {teamdbapi-2.37.1.dist-info → teamdbapi-3.0.0.dist-info}/WHEEL +0 -0
|
@@ -1,324 +1,324 @@
|
|
|
1
|
-
# coding: utf-8
|
|
2
|
-
|
|
3
|
-
"""
|
|
4
|
-
Trackside Software TeamDB API v2.0
|
|
5
|
-
|
|
6
|
-
This API enables you to access TeamDB data # noqa: E501
|
|
7
|
-
|
|
8
|
-
OpenAPI spec version: 2.0
|
|
9
|
-
Contact: support@trackside.fr
|
|
10
|
-
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
11
|
-
"""
|
|
12
|
-
|
|
13
|
-
from __future__ import absolute_import
|
|
14
|
-
|
|
15
|
-
import re # noqa: F401
|
|
16
|
-
|
|
17
|
-
# python 2 and python 3 compatibility library
|
|
18
|
-
import six
|
|
19
|
-
|
|
20
|
-
from teamdbapi.api_client import ApiClient
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
class NotesAuthorizationApi(object):
|
|
24
|
-
"""NOTE: This class is auto generated by the swagger code generator program.
|
|
25
|
-
|
|
26
|
-
Do not edit the class manually.
|
|
27
|
-
Ref: https://github.com/swagger-api/swagger-codegen
|
|
28
|
-
"""
|
|
29
|
-
|
|
30
|
-
def __init__(self, api_client=None):
|
|
31
|
-
if api_client is None:
|
|
32
|
-
api_client = ApiClient()
|
|
33
|
-
self.api_client = api_client
|
|
34
|
-
|
|
35
|
-
def get_notes_authorizations(self, itembase_id, **kwargs): # noqa: E501
|
|
36
|
-
"""Get the list of authorizations for a given Id corresponding to an Event or a Car # noqa: E501
|
|
37
|
-
|
|
38
|
-
This method makes a synchronous HTTP request by default. To make an
|
|
39
|
-
asynchronous HTTP request, please pass async_req=True
|
|
40
|
-
>>> thread = api.get_notes_authorizations(itembase_id, async_req=True)
|
|
41
|
-
>>> result = thread.get()
|
|
42
|
-
|
|
43
|
-
:param async_req bool
|
|
44
|
-
:param str itembase_id: Unique Id corresponding to an Event or a Car (required)
|
|
45
|
-
:return: list[NotesAuthorization]
|
|
46
|
-
If the method is called asynchronously,
|
|
47
|
-
returns the request thread.
|
|
48
|
-
"""
|
|
49
|
-
kwargs['_return_http_data_only'] = True
|
|
50
|
-
if kwargs.get('async_req'):
|
|
51
|
-
return self.get_notes_authorizations_with_http_info(itembase_id, **kwargs) # noqa: E501
|
|
52
|
-
else:
|
|
53
|
-
(data) = self.get_notes_authorizations_with_http_info(itembase_id, **kwargs) # noqa: E501
|
|
54
|
-
return data
|
|
55
|
-
|
|
56
|
-
def get_notes_authorizations_with_http_info(self, itembase_id, **kwargs): # noqa: E501
|
|
57
|
-
"""Get the list of authorizations for a given Id corresponding to an Event or a Car # noqa: E501
|
|
58
|
-
|
|
59
|
-
This method makes a synchronous HTTP request by default. To make an
|
|
60
|
-
asynchronous HTTP request, please pass async_req=True
|
|
61
|
-
>>> thread = api.get_notes_authorizations_with_http_info(itembase_id, async_req=True)
|
|
62
|
-
>>> result = thread.get()
|
|
63
|
-
|
|
64
|
-
:param async_req bool
|
|
65
|
-
:param str itembase_id: Unique Id corresponding to an Event or a Car (required)
|
|
66
|
-
:return: list[NotesAuthorization]
|
|
67
|
-
If the method is called asynchronously,
|
|
68
|
-
returns the request thread.
|
|
69
|
-
"""
|
|
70
|
-
|
|
71
|
-
all_params = ['itembase_id'] # noqa: E501
|
|
72
|
-
all_params.append('async_req')
|
|
73
|
-
all_params.append('_return_http_data_only')
|
|
74
|
-
all_params.append('_preload_content')
|
|
75
|
-
all_params.append('_request_timeout')
|
|
76
|
-
|
|
77
|
-
params = locals()
|
|
78
|
-
for key, val in six.iteritems(params['kwargs']):
|
|
79
|
-
if key not in all_params:
|
|
80
|
-
raise TypeError(
|
|
81
|
-
"Got an unexpected keyword argument '%s'"
|
|
82
|
-
" to method get_notes_authorizations" % key
|
|
83
|
-
)
|
|
84
|
-
params[key] = val
|
|
85
|
-
del params['kwargs']
|
|
86
|
-
# verify the required parameter 'itembase_id' is set
|
|
87
|
-
if ('itembase_id' not in params or
|
|
88
|
-
params['itembase_id'] is None):
|
|
89
|
-
raise ValueError("Missing the required parameter `itembase_id` when calling `get_notes_authorizations`") # noqa: E501
|
|
90
|
-
|
|
91
|
-
collection_formats = {}
|
|
92
|
-
|
|
93
|
-
path_params = {}
|
|
94
|
-
if 'itembase_id' in params:
|
|
95
|
-
path_params['itembaseId'] = params['itembase_id'] # noqa: E501
|
|
96
|
-
|
|
97
|
-
query_params = []
|
|
98
|
-
|
|
99
|
-
header_params = {}
|
|
100
|
-
|
|
101
|
-
form_params = []
|
|
102
|
-
local_var_files = {}
|
|
103
|
-
|
|
104
|
-
body_params = None
|
|
105
|
-
# HTTP header `Accept`
|
|
106
|
-
header_params['Accept'] = self.api_client.select_header_accept(
|
|
107
|
-
['application/json', 'text/json']) # noqa: E501
|
|
108
|
-
|
|
109
|
-
# Authentication setting
|
|
110
|
-
auth_settings = [] # noqa: E501
|
|
111
|
-
|
|
112
|
-
return self.api_client.call_api(
|
|
113
|
-
'/teamdbapi/v2.0/itembase/{itembaseId}/notesauthorizations', 'GET',
|
|
114
|
-
path_params,
|
|
115
|
-
query_params,
|
|
116
|
-
header_params,
|
|
117
|
-
body=body_params,
|
|
118
|
-
post_params=form_params,
|
|
119
|
-
files=local_var_files,
|
|
120
|
-
response_type='list[NotesAuthorization]', # noqa: E501
|
|
121
|
-
auth_settings=auth_settings,
|
|
122
|
-
async_req=params.get('async_req'),
|
|
123
|
-
_return_http_data_only=params.get('_return_http_data_only'),
|
|
124
|
-
_preload_content=params.get('_preload_content', True),
|
|
125
|
-
_request_timeout=params.get('_request_timeout'),
|
|
126
|
-
collection_formats=collection_formats)
|
|
127
|
-
|
|
128
|
-
def has_acces(self, itembase_id, user_or_group_id, **kwargs): # noqa: E501
|
|
129
|
-
"""Returns true if the user or group has access to the event or car # noqa: E501
|
|
130
|
-
|
|
131
|
-
This method makes a synchronous HTTP request by default. To make an
|
|
132
|
-
asynchronous HTTP request, please pass async_req=True
|
|
133
|
-
>>> thread = api.has_acces(itembase_id, user_or_group_id, async_req=True)
|
|
134
|
-
>>> result = thread.get()
|
|
135
|
-
|
|
136
|
-
:param async_req bool
|
|
137
|
-
:param str itembase_id: Unique Id corresponding to an Event or a Car (required)
|
|
138
|
-
:param str user_or_group_id: Unique Id corresponding to a User or a Group (required)
|
|
139
|
-
:return: bool
|
|
140
|
-
If the method is called asynchronously,
|
|
141
|
-
returns the request thread.
|
|
142
|
-
"""
|
|
143
|
-
kwargs['_return_http_data_only'] = True
|
|
144
|
-
if kwargs.get('async_req'):
|
|
145
|
-
return self.has_acces_with_http_info(itembase_id, user_or_group_id, **kwargs) # noqa: E501
|
|
146
|
-
else:
|
|
147
|
-
(data) = self.has_acces_with_http_info(itembase_id, user_or_group_id, **kwargs) # noqa: E501
|
|
148
|
-
return data
|
|
149
|
-
|
|
150
|
-
def has_acces_with_http_info(self, itembase_id, user_or_group_id, **kwargs): # noqa: E501
|
|
151
|
-
"""Returns true if the user or group has access to the event or car # noqa: E501
|
|
152
|
-
|
|
153
|
-
This method makes a synchronous HTTP request by default. To make an
|
|
154
|
-
asynchronous HTTP request, please pass async_req=True
|
|
155
|
-
>>> thread = api.has_acces_with_http_info(itembase_id, user_or_group_id, async_req=True)
|
|
156
|
-
>>> result = thread.get()
|
|
157
|
-
|
|
158
|
-
:param async_req bool
|
|
159
|
-
:param str itembase_id: Unique Id corresponding to an Event or a Car (required)
|
|
160
|
-
:param str user_or_group_id: Unique Id corresponding to a User or a Group (required)
|
|
161
|
-
:return: bool
|
|
162
|
-
If the method is called asynchronously,
|
|
163
|
-
returns the request thread.
|
|
164
|
-
"""
|
|
165
|
-
|
|
166
|
-
all_params = ['itembase_id', 'user_or_group_id'] # noqa: E501
|
|
167
|
-
all_params.append('async_req')
|
|
168
|
-
all_params.append('_return_http_data_only')
|
|
169
|
-
all_params.append('_preload_content')
|
|
170
|
-
all_params.append('_request_timeout')
|
|
171
|
-
|
|
172
|
-
params = locals()
|
|
173
|
-
for key, val in six.iteritems(params['kwargs']):
|
|
174
|
-
if key not in all_params:
|
|
175
|
-
raise TypeError(
|
|
176
|
-
"Got an unexpected keyword argument '%s'"
|
|
177
|
-
" to method has_acces" % key
|
|
178
|
-
)
|
|
179
|
-
params[key] = val
|
|
180
|
-
del params['kwargs']
|
|
181
|
-
# verify the required parameter 'itembase_id' is set
|
|
182
|
-
if ('itembase_id' not in params or
|
|
183
|
-
params['itembase_id'] is None):
|
|
184
|
-
raise ValueError("Missing the required parameter `itembase_id` when calling `has_acces`") # noqa: E501
|
|
185
|
-
# verify the required parameter 'user_or_group_id' is set
|
|
186
|
-
if ('user_or_group_id' not in params or
|
|
187
|
-
params['user_or_group_id'] is None):
|
|
188
|
-
raise ValueError("Missing the required parameter `user_or_group_id` when calling `has_acces`") # noqa: E501
|
|
189
|
-
|
|
190
|
-
collection_formats = {}
|
|
191
|
-
|
|
192
|
-
path_params = {}
|
|
193
|
-
if 'itembase_id' in params:
|
|
194
|
-
path_params['itembaseId'] = params['itembase_id'] # noqa: E501
|
|
195
|
-
|
|
196
|
-
query_params = []
|
|
197
|
-
if 'user_or_group_id' in params:
|
|
198
|
-
query_params.append(('userOrGroupId', params['user_or_group_id'])) # noqa: E501
|
|
199
|
-
|
|
200
|
-
header_params = {}
|
|
201
|
-
|
|
202
|
-
form_params = []
|
|
203
|
-
local_var_files = {}
|
|
204
|
-
|
|
205
|
-
body_params = None
|
|
206
|
-
# HTTP header `Accept`
|
|
207
|
-
header_params['Accept'] = self.api_client.select_header_accept(
|
|
208
|
-
['application/json', 'text/json']) # noqa: E501
|
|
209
|
-
|
|
210
|
-
# Authentication setting
|
|
211
|
-
auth_settings = [] # noqa: E501
|
|
212
|
-
|
|
213
|
-
return self.api_client.call_api(
|
|
214
|
-
'/teamdbapi/v2.0/itembase/{itembaseId}/hasacces', 'GET',
|
|
215
|
-
path_params,
|
|
216
|
-
query_params,
|
|
217
|
-
header_params,
|
|
218
|
-
body=body_params,
|
|
219
|
-
post_params=form_params,
|
|
220
|
-
files=local_var_files,
|
|
221
|
-
response_type='bool', # noqa: E501
|
|
222
|
-
auth_settings=auth_settings,
|
|
223
|
-
async_req=params.get('async_req'),
|
|
224
|
-
_return_http_data_only=params.get('_return_http_data_only'),
|
|
225
|
-
_preload_content=params.get('_preload_content', True),
|
|
226
|
-
_request_timeout=params.get('_request_timeout'),
|
|
227
|
-
collection_formats=collection_formats)
|
|
228
|
-
|
|
229
|
-
def set_notes_authorizations(self, body, **kwargs): # noqa: E501
|
|
230
|
-
"""[Command] Set an authorization to a user or a group for an event or a car. To give acces to a user or group you have to fill the ConcernedEntityId (user or group Id), ConcernedEntityIsGroup (true if group), ItembaseId (event or car id) and set HasAccess to true. To remove the access to a user or group you have to fill the Id (the existing authorization unique id), ConcernedEntityId (user or group Id), ConcernedEntityIsGroup (true if group), ItembaseId (event or car id) and set HasAccess to false. Notice : you have to load the event or car data before to set the authorization. Event or car data must be loaded locally first to any action. # noqa: E501
|
|
231
|
-
|
|
232
|
-
This method makes a synchronous HTTP request by default. To make an
|
|
233
|
-
asynchronous HTTP request, please pass async_req=True
|
|
234
|
-
>>> thread = api.set_notes_authorizations(body, async_req=True)
|
|
235
|
-
>>> result = thread.get()
|
|
236
|
-
|
|
237
|
-
:param async_req bool
|
|
238
|
-
:param NotesAuthorization body: The authorization to set (required)
|
|
239
|
-
:return: None
|
|
240
|
-
If the method is called asynchronously,
|
|
241
|
-
returns the request thread.
|
|
242
|
-
"""
|
|
243
|
-
kwargs['_return_http_data_only'] = True
|
|
244
|
-
if kwargs.get('async_req'):
|
|
245
|
-
return self.set_notes_authorizations_with_http_info(body, **kwargs) # noqa: E501
|
|
246
|
-
else:
|
|
247
|
-
(data) = self.set_notes_authorizations_with_http_info(body, **kwargs) # noqa: E501
|
|
248
|
-
return data
|
|
249
|
-
|
|
250
|
-
def set_notes_authorizations_with_http_info(self, body, **kwargs): # noqa: E501
|
|
251
|
-
"""[Command] Set an authorization to a user or a group for an event or a car. To give acces to a user or group you have to fill the ConcernedEntityId (user or group Id), ConcernedEntityIsGroup (true if group), ItembaseId (event or car id) and set HasAccess to true. To remove the access to a user or group you have to fill the Id (the existing authorization unique id), ConcernedEntityId (user or group Id), ConcernedEntityIsGroup (true if group), ItembaseId (event or car id) and set HasAccess to false. Notice : you have to load the event or car data before to set the authorization. Event or car data must be loaded locally first to any action. # noqa: E501
|
|
252
|
-
|
|
253
|
-
This method makes a synchronous HTTP request by default. To make an
|
|
254
|
-
asynchronous HTTP request, please pass async_req=True
|
|
255
|
-
>>> thread = api.set_notes_authorizations_with_http_info(body, async_req=True)
|
|
256
|
-
>>> result = thread.get()
|
|
257
|
-
|
|
258
|
-
:param async_req bool
|
|
259
|
-
:param NotesAuthorization body: The authorization to set (required)
|
|
260
|
-
:return: None
|
|
261
|
-
If the method is called asynchronously,
|
|
262
|
-
returns the request thread.
|
|
263
|
-
"""
|
|
264
|
-
|
|
265
|
-
all_params = ['body'] # noqa: E501
|
|
266
|
-
all_params.append('async_req')
|
|
267
|
-
all_params.append('_return_http_data_only')
|
|
268
|
-
all_params.append('_preload_content')
|
|
269
|
-
all_params.append('_request_timeout')
|
|
270
|
-
|
|
271
|
-
params = locals()
|
|
272
|
-
for key, val in six.iteritems(params['kwargs']):
|
|
273
|
-
if key not in all_params:
|
|
274
|
-
raise TypeError(
|
|
275
|
-
"Got an unexpected keyword argument '%s'"
|
|
276
|
-
" to method set_notes_authorizations" % key
|
|
277
|
-
)
|
|
278
|
-
params[key] = val
|
|
279
|
-
del params['kwargs']
|
|
280
|
-
# verify the required parameter 'body' is set
|
|
281
|
-
if ('body' not in params or
|
|
282
|
-
params['body'] is None):
|
|
283
|
-
raise ValueError("Missing the required parameter `body` when calling `set_notes_authorizations`") # noqa: E501
|
|
284
|
-
|
|
285
|
-
collection_formats = {}
|
|
286
|
-
|
|
287
|
-
path_params = {}
|
|
288
|
-
|
|
289
|
-
query_params = []
|
|
290
|
-
|
|
291
|
-
header_params = {}
|
|
292
|
-
|
|
293
|
-
form_params = []
|
|
294
|
-
local_var_files = {}
|
|
295
|
-
|
|
296
|
-
body_params = None
|
|
297
|
-
if 'body' in params:
|
|
298
|
-
body_params = params['body']
|
|
299
|
-
# HTTP header `Accept`
|
|
300
|
-
header_params['Accept'] = self.api_client.select_header_accept(
|
|
301
|
-
['application/json', 'text/json']) # noqa: E501
|
|
302
|
-
|
|
303
|
-
# HTTP header `Content-Type`
|
|
304
|
-
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
305
|
-
['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) # noqa: E501
|
|
306
|
-
|
|
307
|
-
# Authentication setting
|
|
308
|
-
auth_settings = [] # noqa: E501
|
|
309
|
-
|
|
310
|
-
return self.api_client.call_api(
|
|
311
|
-
'/teamdbapi/v2.0/notesauthorizations', 'POST',
|
|
312
|
-
path_params,
|
|
313
|
-
query_params,
|
|
314
|
-
header_params,
|
|
315
|
-
body=body_params,
|
|
316
|
-
post_params=form_params,
|
|
317
|
-
files=local_var_files,
|
|
318
|
-
response_type=None, # noqa: E501
|
|
319
|
-
auth_settings=auth_settings,
|
|
320
|
-
async_req=params.get('async_req'),
|
|
321
|
-
_return_http_data_only=params.get('_return_http_data_only'),
|
|
322
|
-
_preload_content=params.get('_preload_content', True),
|
|
323
|
-
_request_timeout=params.get('_request_timeout'),
|
|
324
|
-
collection_formats=collection_formats)
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Trackside Software TeamDB API v2.0
|
|
5
|
+
|
|
6
|
+
This API enables you to access TeamDB data # noqa: E501
|
|
7
|
+
|
|
8
|
+
OpenAPI spec version: 2.0
|
|
9
|
+
Contact: support@trackside.fr
|
|
10
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
from __future__ import absolute_import
|
|
14
|
+
|
|
15
|
+
import re # noqa: F401
|
|
16
|
+
|
|
17
|
+
# python 2 and python 3 compatibility library
|
|
18
|
+
import six
|
|
19
|
+
|
|
20
|
+
from teamdbapi.api_client import ApiClient
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class NotesAuthorizationApi(object):
|
|
24
|
+
"""NOTE: This class is auto generated by the swagger code generator program.
|
|
25
|
+
|
|
26
|
+
Do not edit the class manually.
|
|
27
|
+
Ref: https://github.com/swagger-api/swagger-codegen
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
def __init__(self, api_client=None):
|
|
31
|
+
if api_client is None:
|
|
32
|
+
api_client = ApiClient()
|
|
33
|
+
self.api_client = api_client
|
|
34
|
+
|
|
35
|
+
def get_notes_authorizations(self, itembase_id, **kwargs): # noqa: E501
|
|
36
|
+
"""Get the list of authorizations for a given Id corresponding to an Event or a Car # noqa: E501
|
|
37
|
+
|
|
38
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
39
|
+
asynchronous HTTP request, please pass async_req=True
|
|
40
|
+
>>> thread = api.get_notes_authorizations(itembase_id, async_req=True)
|
|
41
|
+
>>> result = thread.get()
|
|
42
|
+
|
|
43
|
+
:param async_req bool
|
|
44
|
+
:param str itembase_id: Unique Id corresponding to an Event or a Car (required)
|
|
45
|
+
:return: list[NotesAuthorization]
|
|
46
|
+
If the method is called asynchronously,
|
|
47
|
+
returns the request thread.
|
|
48
|
+
"""
|
|
49
|
+
kwargs['_return_http_data_only'] = True
|
|
50
|
+
if kwargs.get('async_req'):
|
|
51
|
+
return self.get_notes_authorizations_with_http_info(itembase_id, **kwargs) # noqa: E501
|
|
52
|
+
else:
|
|
53
|
+
(data) = self.get_notes_authorizations_with_http_info(itembase_id, **kwargs) # noqa: E501
|
|
54
|
+
return data
|
|
55
|
+
|
|
56
|
+
def get_notes_authorizations_with_http_info(self, itembase_id, **kwargs): # noqa: E501
|
|
57
|
+
"""Get the list of authorizations for a given Id corresponding to an Event or a Car # noqa: E501
|
|
58
|
+
|
|
59
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
60
|
+
asynchronous HTTP request, please pass async_req=True
|
|
61
|
+
>>> thread = api.get_notes_authorizations_with_http_info(itembase_id, async_req=True)
|
|
62
|
+
>>> result = thread.get()
|
|
63
|
+
|
|
64
|
+
:param async_req bool
|
|
65
|
+
:param str itembase_id: Unique Id corresponding to an Event or a Car (required)
|
|
66
|
+
:return: list[NotesAuthorization]
|
|
67
|
+
If the method is called asynchronously,
|
|
68
|
+
returns the request thread.
|
|
69
|
+
"""
|
|
70
|
+
|
|
71
|
+
all_params = ['itembase_id'] # noqa: E501
|
|
72
|
+
all_params.append('async_req')
|
|
73
|
+
all_params.append('_return_http_data_only')
|
|
74
|
+
all_params.append('_preload_content')
|
|
75
|
+
all_params.append('_request_timeout')
|
|
76
|
+
|
|
77
|
+
params = locals()
|
|
78
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
79
|
+
if key not in all_params:
|
|
80
|
+
raise TypeError(
|
|
81
|
+
"Got an unexpected keyword argument '%s'"
|
|
82
|
+
" to method get_notes_authorizations" % key
|
|
83
|
+
)
|
|
84
|
+
params[key] = val
|
|
85
|
+
del params['kwargs']
|
|
86
|
+
# verify the required parameter 'itembase_id' is set
|
|
87
|
+
if ('itembase_id' not in params or
|
|
88
|
+
params['itembase_id'] is None):
|
|
89
|
+
raise ValueError("Missing the required parameter `itembase_id` when calling `get_notes_authorizations`") # noqa: E501
|
|
90
|
+
|
|
91
|
+
collection_formats = {}
|
|
92
|
+
|
|
93
|
+
path_params = {}
|
|
94
|
+
if 'itembase_id' in params:
|
|
95
|
+
path_params['itembaseId'] = params['itembase_id'] # noqa: E501
|
|
96
|
+
|
|
97
|
+
query_params = []
|
|
98
|
+
|
|
99
|
+
header_params = {}
|
|
100
|
+
|
|
101
|
+
form_params = []
|
|
102
|
+
local_var_files = {}
|
|
103
|
+
|
|
104
|
+
body_params = None
|
|
105
|
+
# HTTP header `Accept`
|
|
106
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
107
|
+
['application/json', 'text/json']) # noqa: E501
|
|
108
|
+
|
|
109
|
+
# Authentication setting
|
|
110
|
+
auth_settings = [] # noqa: E501
|
|
111
|
+
|
|
112
|
+
return self.api_client.call_api(
|
|
113
|
+
'/teamdbapi/v2.0/itembase/{itembaseId}/notesauthorizations', 'GET',
|
|
114
|
+
path_params,
|
|
115
|
+
query_params,
|
|
116
|
+
header_params,
|
|
117
|
+
body=body_params,
|
|
118
|
+
post_params=form_params,
|
|
119
|
+
files=local_var_files,
|
|
120
|
+
response_type='list[NotesAuthorization]', # noqa: E501
|
|
121
|
+
auth_settings=auth_settings,
|
|
122
|
+
async_req=params.get('async_req'),
|
|
123
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
124
|
+
_preload_content=params.get('_preload_content', True),
|
|
125
|
+
_request_timeout=params.get('_request_timeout'),
|
|
126
|
+
collection_formats=collection_formats)
|
|
127
|
+
|
|
128
|
+
def has_acces(self, itembase_id, user_or_group_id, **kwargs): # noqa: E501
|
|
129
|
+
"""Returns true if the user or group has access to the event or car # noqa: E501
|
|
130
|
+
|
|
131
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
132
|
+
asynchronous HTTP request, please pass async_req=True
|
|
133
|
+
>>> thread = api.has_acces(itembase_id, user_or_group_id, async_req=True)
|
|
134
|
+
>>> result = thread.get()
|
|
135
|
+
|
|
136
|
+
:param async_req bool
|
|
137
|
+
:param str itembase_id: Unique Id corresponding to an Event or a Car (required)
|
|
138
|
+
:param str user_or_group_id: Unique Id corresponding to a User or a Group (required)
|
|
139
|
+
:return: bool
|
|
140
|
+
If the method is called asynchronously,
|
|
141
|
+
returns the request thread.
|
|
142
|
+
"""
|
|
143
|
+
kwargs['_return_http_data_only'] = True
|
|
144
|
+
if kwargs.get('async_req'):
|
|
145
|
+
return self.has_acces_with_http_info(itembase_id, user_or_group_id, **kwargs) # noqa: E501
|
|
146
|
+
else:
|
|
147
|
+
(data) = self.has_acces_with_http_info(itembase_id, user_or_group_id, **kwargs) # noqa: E501
|
|
148
|
+
return data
|
|
149
|
+
|
|
150
|
+
def has_acces_with_http_info(self, itembase_id, user_or_group_id, **kwargs): # noqa: E501
|
|
151
|
+
"""Returns true if the user or group has access to the event or car # noqa: E501
|
|
152
|
+
|
|
153
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
154
|
+
asynchronous HTTP request, please pass async_req=True
|
|
155
|
+
>>> thread = api.has_acces_with_http_info(itembase_id, user_or_group_id, async_req=True)
|
|
156
|
+
>>> result = thread.get()
|
|
157
|
+
|
|
158
|
+
:param async_req bool
|
|
159
|
+
:param str itembase_id: Unique Id corresponding to an Event or a Car (required)
|
|
160
|
+
:param str user_or_group_id: Unique Id corresponding to a User or a Group (required)
|
|
161
|
+
:return: bool
|
|
162
|
+
If the method is called asynchronously,
|
|
163
|
+
returns the request thread.
|
|
164
|
+
"""
|
|
165
|
+
|
|
166
|
+
all_params = ['itembase_id', 'user_or_group_id'] # noqa: E501
|
|
167
|
+
all_params.append('async_req')
|
|
168
|
+
all_params.append('_return_http_data_only')
|
|
169
|
+
all_params.append('_preload_content')
|
|
170
|
+
all_params.append('_request_timeout')
|
|
171
|
+
|
|
172
|
+
params = locals()
|
|
173
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
174
|
+
if key not in all_params:
|
|
175
|
+
raise TypeError(
|
|
176
|
+
"Got an unexpected keyword argument '%s'"
|
|
177
|
+
" to method has_acces" % key
|
|
178
|
+
)
|
|
179
|
+
params[key] = val
|
|
180
|
+
del params['kwargs']
|
|
181
|
+
# verify the required parameter 'itembase_id' is set
|
|
182
|
+
if ('itembase_id' not in params or
|
|
183
|
+
params['itembase_id'] is None):
|
|
184
|
+
raise ValueError("Missing the required parameter `itembase_id` when calling `has_acces`") # noqa: E501
|
|
185
|
+
# verify the required parameter 'user_or_group_id' is set
|
|
186
|
+
if ('user_or_group_id' not in params or
|
|
187
|
+
params['user_or_group_id'] is None):
|
|
188
|
+
raise ValueError("Missing the required parameter `user_or_group_id` when calling `has_acces`") # noqa: E501
|
|
189
|
+
|
|
190
|
+
collection_formats = {}
|
|
191
|
+
|
|
192
|
+
path_params = {}
|
|
193
|
+
if 'itembase_id' in params:
|
|
194
|
+
path_params['itembaseId'] = params['itembase_id'] # noqa: E501
|
|
195
|
+
|
|
196
|
+
query_params = []
|
|
197
|
+
if 'user_or_group_id' in params:
|
|
198
|
+
query_params.append(('userOrGroupId', params['user_or_group_id'])) # noqa: E501
|
|
199
|
+
|
|
200
|
+
header_params = {}
|
|
201
|
+
|
|
202
|
+
form_params = []
|
|
203
|
+
local_var_files = {}
|
|
204
|
+
|
|
205
|
+
body_params = None
|
|
206
|
+
# HTTP header `Accept`
|
|
207
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
208
|
+
['application/json', 'text/json']) # noqa: E501
|
|
209
|
+
|
|
210
|
+
# Authentication setting
|
|
211
|
+
auth_settings = [] # noqa: E501
|
|
212
|
+
|
|
213
|
+
return self.api_client.call_api(
|
|
214
|
+
'/teamdbapi/v2.0/itembase/{itembaseId}/hasacces', 'GET',
|
|
215
|
+
path_params,
|
|
216
|
+
query_params,
|
|
217
|
+
header_params,
|
|
218
|
+
body=body_params,
|
|
219
|
+
post_params=form_params,
|
|
220
|
+
files=local_var_files,
|
|
221
|
+
response_type='bool', # noqa: E501
|
|
222
|
+
auth_settings=auth_settings,
|
|
223
|
+
async_req=params.get('async_req'),
|
|
224
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
225
|
+
_preload_content=params.get('_preload_content', True),
|
|
226
|
+
_request_timeout=params.get('_request_timeout'),
|
|
227
|
+
collection_formats=collection_formats)
|
|
228
|
+
|
|
229
|
+
def set_notes_authorizations(self, body, **kwargs): # noqa: E501
|
|
230
|
+
"""[Command] Set an authorization to a user or a group for an event or a car. To give acces to a user or group you have to fill the ConcernedEntityId (user or group Id), ConcernedEntityIsGroup (true if group), ItembaseId (event or car id) and set HasAccess to true. To remove the access to a user or group you have to fill the Id (the existing authorization unique id), ConcernedEntityId (user or group Id), ConcernedEntityIsGroup (true if group), ItembaseId (event or car id) and set HasAccess to false. Notice : you have to load the event or car data before to set the authorization. Event or car data must be loaded locally first to any action. # noqa: E501
|
|
231
|
+
|
|
232
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
233
|
+
asynchronous HTTP request, please pass async_req=True
|
|
234
|
+
>>> thread = api.set_notes_authorizations(body, async_req=True)
|
|
235
|
+
>>> result = thread.get()
|
|
236
|
+
|
|
237
|
+
:param async_req bool
|
|
238
|
+
:param NotesAuthorization body: The authorization to set (required)
|
|
239
|
+
:return: None
|
|
240
|
+
If the method is called asynchronously,
|
|
241
|
+
returns the request thread.
|
|
242
|
+
"""
|
|
243
|
+
kwargs['_return_http_data_only'] = True
|
|
244
|
+
if kwargs.get('async_req'):
|
|
245
|
+
return self.set_notes_authorizations_with_http_info(body, **kwargs) # noqa: E501
|
|
246
|
+
else:
|
|
247
|
+
(data) = self.set_notes_authorizations_with_http_info(body, **kwargs) # noqa: E501
|
|
248
|
+
return data
|
|
249
|
+
|
|
250
|
+
def set_notes_authorizations_with_http_info(self, body, **kwargs): # noqa: E501
|
|
251
|
+
"""[Command] Set an authorization to a user or a group for an event or a car. To give acces to a user or group you have to fill the ConcernedEntityId (user or group Id), ConcernedEntityIsGroup (true if group), ItembaseId (event or car id) and set HasAccess to true. To remove the access to a user or group you have to fill the Id (the existing authorization unique id), ConcernedEntityId (user or group Id), ConcernedEntityIsGroup (true if group), ItembaseId (event or car id) and set HasAccess to false. Notice : you have to load the event or car data before to set the authorization. Event or car data must be loaded locally first to any action. # noqa: E501
|
|
252
|
+
|
|
253
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
254
|
+
asynchronous HTTP request, please pass async_req=True
|
|
255
|
+
>>> thread = api.set_notes_authorizations_with_http_info(body, async_req=True)
|
|
256
|
+
>>> result = thread.get()
|
|
257
|
+
|
|
258
|
+
:param async_req bool
|
|
259
|
+
:param NotesAuthorization body: The authorization to set (required)
|
|
260
|
+
:return: None
|
|
261
|
+
If the method is called asynchronously,
|
|
262
|
+
returns the request thread.
|
|
263
|
+
"""
|
|
264
|
+
|
|
265
|
+
all_params = ['body'] # noqa: E501
|
|
266
|
+
all_params.append('async_req')
|
|
267
|
+
all_params.append('_return_http_data_only')
|
|
268
|
+
all_params.append('_preload_content')
|
|
269
|
+
all_params.append('_request_timeout')
|
|
270
|
+
|
|
271
|
+
params = locals()
|
|
272
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
273
|
+
if key not in all_params:
|
|
274
|
+
raise TypeError(
|
|
275
|
+
"Got an unexpected keyword argument '%s'"
|
|
276
|
+
" to method set_notes_authorizations" % key
|
|
277
|
+
)
|
|
278
|
+
params[key] = val
|
|
279
|
+
del params['kwargs']
|
|
280
|
+
# verify the required parameter 'body' is set
|
|
281
|
+
if ('body' not in params or
|
|
282
|
+
params['body'] is None):
|
|
283
|
+
raise ValueError("Missing the required parameter `body` when calling `set_notes_authorizations`") # noqa: E501
|
|
284
|
+
|
|
285
|
+
collection_formats = {}
|
|
286
|
+
|
|
287
|
+
path_params = {}
|
|
288
|
+
|
|
289
|
+
query_params = []
|
|
290
|
+
|
|
291
|
+
header_params = {}
|
|
292
|
+
|
|
293
|
+
form_params = []
|
|
294
|
+
local_var_files = {}
|
|
295
|
+
|
|
296
|
+
body_params = None
|
|
297
|
+
if 'body' in params:
|
|
298
|
+
body_params = params['body']
|
|
299
|
+
# HTTP header `Accept`
|
|
300
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
301
|
+
['application/json', 'text/json']) # noqa: E501
|
|
302
|
+
|
|
303
|
+
# HTTP header `Content-Type`
|
|
304
|
+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
305
|
+
['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) # noqa: E501
|
|
306
|
+
|
|
307
|
+
# Authentication setting
|
|
308
|
+
auth_settings = [] # noqa: E501
|
|
309
|
+
|
|
310
|
+
return self.api_client.call_api(
|
|
311
|
+
'/teamdbapi/v2.0/notesauthorizations', 'POST',
|
|
312
|
+
path_params,
|
|
313
|
+
query_params,
|
|
314
|
+
header_params,
|
|
315
|
+
body=body_params,
|
|
316
|
+
post_params=form_params,
|
|
317
|
+
files=local_var_files,
|
|
318
|
+
response_type=None, # noqa: E501
|
|
319
|
+
auth_settings=auth_settings,
|
|
320
|
+
async_req=params.get('async_req'),
|
|
321
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
322
|
+
_preload_content=params.get('_preload_content', True),
|
|
323
|
+
_request_timeout=params.get('_request_timeout'),
|
|
324
|
+
collection_formats=collection_formats)
|