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
teamdbapi/api/target_api.py
CHANGED
|
@@ -1,415 +1,415 @@
|
|
|
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 TargetApi(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 create_target(self, body, **kwargs): # noqa: E501
|
|
36
|
-
"""Create a target # noqa: E501
|
|
37
|
-
|
|
38
|
-
Set the Target.Id to Guid.Empty (00000000-0000-0000-0000-000000000000) if you want to create a new target. The id will be generated by the server. # noqa: E501
|
|
39
|
-
This method makes a synchronous HTTP request by default. To make an
|
|
40
|
-
asynchronous HTTP request, please pass async_req=True
|
|
41
|
-
>>> thread = api.create_target(body, async_req=True)
|
|
42
|
-
>>> result = thread.get()
|
|
43
|
-
|
|
44
|
-
:param async_req bool
|
|
45
|
-
:param Target body: The target to create. (required)
|
|
46
|
-
:return: Target
|
|
47
|
-
If the method is called asynchronously,
|
|
48
|
-
returns the request thread.
|
|
49
|
-
"""
|
|
50
|
-
kwargs['_return_http_data_only'] = True
|
|
51
|
-
if kwargs.get('async_req'):
|
|
52
|
-
return self.create_target_with_http_info(body, **kwargs) # noqa: E501
|
|
53
|
-
else:
|
|
54
|
-
(data) = self.create_target_with_http_info(body, **kwargs) # noqa: E501
|
|
55
|
-
return data
|
|
56
|
-
|
|
57
|
-
def create_target_with_http_info(self, body, **kwargs): # noqa: E501
|
|
58
|
-
"""Create a target # noqa: E501
|
|
59
|
-
|
|
60
|
-
Set the Target.Id to Guid.Empty (00000000-0000-0000-0000-000000000000) if you want to create a new target. The id will be generated by the server. # noqa: E501
|
|
61
|
-
This method makes a synchronous HTTP request by default. To make an
|
|
62
|
-
asynchronous HTTP request, please pass async_req=True
|
|
63
|
-
>>> thread = api.create_target_with_http_info(body, async_req=True)
|
|
64
|
-
>>> result = thread.get()
|
|
65
|
-
|
|
66
|
-
:param async_req bool
|
|
67
|
-
:param Target body: The target to create. (required)
|
|
68
|
-
:return: Target
|
|
69
|
-
If the method is called asynchronously,
|
|
70
|
-
returns the request thread.
|
|
71
|
-
"""
|
|
72
|
-
|
|
73
|
-
all_params = ['body'] # noqa: E501
|
|
74
|
-
all_params.append('async_req')
|
|
75
|
-
all_params.append('_return_http_data_only')
|
|
76
|
-
all_params.append('_preload_content')
|
|
77
|
-
all_params.append('_request_timeout')
|
|
78
|
-
|
|
79
|
-
params = locals()
|
|
80
|
-
for key, val in six.iteritems(params['kwargs']):
|
|
81
|
-
if key not in all_params:
|
|
82
|
-
raise TypeError(
|
|
83
|
-
"Got an unexpected keyword argument '%s'"
|
|
84
|
-
" to method create_target" % key
|
|
85
|
-
)
|
|
86
|
-
params[key] = val
|
|
87
|
-
del params['kwargs']
|
|
88
|
-
# verify the required parameter 'body' is set
|
|
89
|
-
if ('body' not in params or
|
|
90
|
-
params['body'] is None):
|
|
91
|
-
raise ValueError("Missing the required parameter `body` when calling `create_target`") # noqa: E501
|
|
92
|
-
|
|
93
|
-
collection_formats = {}
|
|
94
|
-
|
|
95
|
-
path_params = {}
|
|
96
|
-
|
|
97
|
-
query_params = []
|
|
98
|
-
|
|
99
|
-
header_params = {}
|
|
100
|
-
|
|
101
|
-
form_params = []
|
|
102
|
-
local_var_files = {}
|
|
103
|
-
|
|
104
|
-
body_params = None
|
|
105
|
-
if 'body' in params:
|
|
106
|
-
body_params = params['body']
|
|
107
|
-
# HTTP header `Accept`
|
|
108
|
-
header_params['Accept'] = self.api_client.select_header_accept(
|
|
109
|
-
['application/json', 'text/json']) # noqa: E501
|
|
110
|
-
|
|
111
|
-
# HTTP header `Content-Type`
|
|
112
|
-
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
113
|
-
['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) # noqa: E501
|
|
114
|
-
|
|
115
|
-
# Authentication setting
|
|
116
|
-
auth_settings = [] # noqa: E501
|
|
117
|
-
|
|
118
|
-
return self.api_client.call_api(
|
|
119
|
-
'/teamdbapi/v2.0/target', 'POST',
|
|
120
|
-
path_params,
|
|
121
|
-
query_params,
|
|
122
|
-
header_params,
|
|
123
|
-
body=body_params,
|
|
124
|
-
post_params=form_params,
|
|
125
|
-
files=local_var_files,
|
|
126
|
-
response_type='Target', # noqa: E501
|
|
127
|
-
auth_settings=auth_settings,
|
|
128
|
-
async_req=params.get('async_req'),
|
|
129
|
-
_return_http_data_only=params.get('_return_http_data_only'),
|
|
130
|
-
_preload_content=params.get('_preload_content', True),
|
|
131
|
-
_request_timeout=params.get('_request_timeout'),
|
|
132
|
-
collection_formats=collection_formats)
|
|
133
|
-
|
|
134
|
-
def get_target(self, id, **kwargs): # noqa: E501
|
|
135
|
-
"""Get a target corresponding to a unique id # noqa: E501
|
|
136
|
-
|
|
137
|
-
This method makes a synchronous HTTP request by default. To make an
|
|
138
|
-
asynchronous HTTP request, please pass async_req=True
|
|
139
|
-
>>> thread = api.get_target(id, async_req=True)
|
|
140
|
-
>>> result = thread.get()
|
|
141
|
-
|
|
142
|
-
:param async_req bool
|
|
143
|
-
:param str id: The unique target id that corresponds to the searched target (required)
|
|
144
|
-
:return: Target
|
|
145
|
-
If the method is called asynchronously,
|
|
146
|
-
returns the request thread.
|
|
147
|
-
"""
|
|
148
|
-
kwargs['_return_http_data_only'] = True
|
|
149
|
-
if kwargs.get('async_req'):
|
|
150
|
-
return self.get_target_with_http_info(id, **kwargs) # noqa: E501
|
|
151
|
-
else:
|
|
152
|
-
(data) = self.get_target_with_http_info(id, **kwargs) # noqa: E501
|
|
153
|
-
return data
|
|
154
|
-
|
|
155
|
-
def get_target_with_http_info(self, id, **kwargs): # noqa: E501
|
|
156
|
-
"""Get a target corresponding to a unique id # noqa: E501
|
|
157
|
-
|
|
158
|
-
This method makes a synchronous HTTP request by default. To make an
|
|
159
|
-
asynchronous HTTP request, please pass async_req=True
|
|
160
|
-
>>> thread = api.get_target_with_http_info(id, async_req=True)
|
|
161
|
-
>>> result = thread.get()
|
|
162
|
-
|
|
163
|
-
:param async_req bool
|
|
164
|
-
:param str id: The unique target id that corresponds to the searched target (required)
|
|
165
|
-
:return: Target
|
|
166
|
-
If the method is called asynchronously,
|
|
167
|
-
returns the request thread.
|
|
168
|
-
"""
|
|
169
|
-
|
|
170
|
-
all_params = ['id'] # noqa: E501
|
|
171
|
-
all_params.append('async_req')
|
|
172
|
-
all_params.append('_return_http_data_only')
|
|
173
|
-
all_params.append('_preload_content')
|
|
174
|
-
all_params.append('_request_timeout')
|
|
175
|
-
|
|
176
|
-
params = locals()
|
|
177
|
-
for key, val in six.iteritems(params['kwargs']):
|
|
178
|
-
if key not in all_params:
|
|
179
|
-
raise TypeError(
|
|
180
|
-
"Got an unexpected keyword argument '%s'"
|
|
181
|
-
" to method get_target" % key
|
|
182
|
-
)
|
|
183
|
-
params[key] = val
|
|
184
|
-
del params['kwargs']
|
|
185
|
-
# verify the required parameter 'id' is set
|
|
186
|
-
if ('id' not in params or
|
|
187
|
-
params['id'] is None):
|
|
188
|
-
raise ValueError("Missing the required parameter `id` when calling `get_target`") # noqa: E501
|
|
189
|
-
|
|
190
|
-
collection_formats = {}
|
|
191
|
-
|
|
192
|
-
path_params = {}
|
|
193
|
-
if 'id' in params:
|
|
194
|
-
path_params['id'] = params['id'] # noqa: E501
|
|
195
|
-
|
|
196
|
-
query_params = []
|
|
197
|
-
|
|
198
|
-
header_params = {}
|
|
199
|
-
|
|
200
|
-
form_params = []
|
|
201
|
-
local_var_files = {}
|
|
202
|
-
|
|
203
|
-
body_params = None
|
|
204
|
-
# HTTP header `Accept`
|
|
205
|
-
header_params['Accept'] = self.api_client.select_header_accept(
|
|
206
|
-
['application/json', 'text/json']) # noqa: E501
|
|
207
|
-
|
|
208
|
-
# Authentication setting
|
|
209
|
-
auth_settings = [] # noqa: E501
|
|
210
|
-
|
|
211
|
-
return self.api_client.call_api(
|
|
212
|
-
'/teamdbapi/v2.0/target/{id}', 'GET',
|
|
213
|
-
path_params,
|
|
214
|
-
query_params,
|
|
215
|
-
header_params,
|
|
216
|
-
body=body_params,
|
|
217
|
-
post_params=form_params,
|
|
218
|
-
files=local_var_files,
|
|
219
|
-
response_type='Target', # noqa: E501
|
|
220
|
-
auth_settings=auth_settings,
|
|
221
|
-
async_req=params.get('async_req'),
|
|
222
|
-
_return_http_data_only=params.get('_return_http_data_only'),
|
|
223
|
-
_preload_content=params.get('_preload_content', True),
|
|
224
|
-
_request_timeout=params.get('_request_timeout'),
|
|
225
|
-
collection_formats=collection_formats)
|
|
226
|
-
|
|
227
|
-
def get_targets(self, **kwargs): # noqa: E501
|
|
228
|
-
"""Get the list of all targets depending on your rights. # noqa: E501
|
|
229
|
-
|
|
230
|
-
This method makes a synchronous HTTP request by default. To make an
|
|
231
|
-
asynchronous HTTP request, please pass async_req=True
|
|
232
|
-
>>> thread = api.get_targets(async_req=True)
|
|
233
|
-
>>> result = thread.get()
|
|
234
|
-
|
|
235
|
-
:param async_req bool
|
|
236
|
-
:return: list[Target]
|
|
237
|
-
If the method is called asynchronously,
|
|
238
|
-
returns the request thread.
|
|
239
|
-
"""
|
|
240
|
-
kwargs['_return_http_data_only'] = True
|
|
241
|
-
if kwargs.get('async_req'):
|
|
242
|
-
return self.get_targets_with_http_info(**kwargs) # noqa: E501
|
|
243
|
-
else:
|
|
244
|
-
(data) = self.get_targets_with_http_info(**kwargs) # noqa: E501
|
|
245
|
-
return data
|
|
246
|
-
|
|
247
|
-
def get_targets_with_http_info(self, **kwargs): # noqa: E501
|
|
248
|
-
"""Get the list of all targets depending on your rights. # noqa: E501
|
|
249
|
-
|
|
250
|
-
This method makes a synchronous HTTP request by default. To make an
|
|
251
|
-
asynchronous HTTP request, please pass async_req=True
|
|
252
|
-
>>> thread = api.get_targets_with_http_info(async_req=True)
|
|
253
|
-
>>> result = thread.get()
|
|
254
|
-
|
|
255
|
-
:param async_req bool
|
|
256
|
-
:return: list[Target]
|
|
257
|
-
If the method is called asynchronously,
|
|
258
|
-
returns the request thread.
|
|
259
|
-
"""
|
|
260
|
-
|
|
261
|
-
all_params = [] # noqa: E501
|
|
262
|
-
all_params.append('async_req')
|
|
263
|
-
all_params.append('_return_http_data_only')
|
|
264
|
-
all_params.append('_preload_content')
|
|
265
|
-
all_params.append('_request_timeout')
|
|
266
|
-
|
|
267
|
-
params = locals()
|
|
268
|
-
for key, val in six.iteritems(params['kwargs']):
|
|
269
|
-
if key not in all_params:
|
|
270
|
-
raise TypeError(
|
|
271
|
-
"Got an unexpected keyword argument '%s'"
|
|
272
|
-
" to method get_targets" % key
|
|
273
|
-
)
|
|
274
|
-
params[key] = val
|
|
275
|
-
del params['kwargs']
|
|
276
|
-
|
|
277
|
-
collection_formats = {}
|
|
278
|
-
|
|
279
|
-
path_params = {}
|
|
280
|
-
|
|
281
|
-
query_params = []
|
|
282
|
-
|
|
283
|
-
header_params = {}
|
|
284
|
-
|
|
285
|
-
form_params = []
|
|
286
|
-
local_var_files = {}
|
|
287
|
-
|
|
288
|
-
body_params = None
|
|
289
|
-
# HTTP header `Accept`
|
|
290
|
-
header_params['Accept'] = self.api_client.select_header_accept(
|
|
291
|
-
['application/json', 'text/json']) # noqa: E501
|
|
292
|
-
|
|
293
|
-
# Authentication setting
|
|
294
|
-
auth_settings = [] # noqa: E501
|
|
295
|
-
|
|
296
|
-
return self.api_client.call_api(
|
|
297
|
-
'/teamdbapi/v2.0/targets', 'GET',
|
|
298
|
-
path_params,
|
|
299
|
-
query_params,
|
|
300
|
-
header_params,
|
|
301
|
-
body=body_params,
|
|
302
|
-
post_params=form_params,
|
|
303
|
-
files=local_var_files,
|
|
304
|
-
response_type='list[Target]', # noqa: E501
|
|
305
|
-
auth_settings=auth_settings,
|
|
306
|
-
async_req=params.get('async_req'),
|
|
307
|
-
_return_http_data_only=params.get('_return_http_data_only'),
|
|
308
|
-
_preload_content=params.get('_preload_content', True),
|
|
309
|
-
_request_timeout=params.get('_request_timeout'),
|
|
310
|
-
collection_formats=collection_formats)
|
|
311
|
-
|
|
312
|
-
def update_target(self, body, target_id, **kwargs): # noqa: E501
|
|
313
|
-
"""Update a target # noqa: E501
|
|
314
|
-
|
|
315
|
-
This method makes a synchronous HTTP request by default. To make an
|
|
316
|
-
asynchronous HTTP request, please pass async_req=True
|
|
317
|
-
>>> thread = api.update_target(body, target_id, async_req=True)
|
|
318
|
-
>>> result = thread.get()
|
|
319
|
-
|
|
320
|
-
:param async_req bool
|
|
321
|
-
:param Target body: The target to update. (required)
|
|
322
|
-
:param str target_id: The target id corresponding to the target you want to update (required)
|
|
323
|
-
:return: Target
|
|
324
|
-
If the method is called asynchronously,
|
|
325
|
-
returns the request thread.
|
|
326
|
-
"""
|
|
327
|
-
kwargs['_return_http_data_only'] = True
|
|
328
|
-
if kwargs.get('async_req'):
|
|
329
|
-
return self.update_target_with_http_info(body, target_id, **kwargs) # noqa: E501
|
|
330
|
-
else:
|
|
331
|
-
(data) = self.update_target_with_http_info(body, target_id, **kwargs) # noqa: E501
|
|
332
|
-
return data
|
|
333
|
-
|
|
334
|
-
def update_target_with_http_info(self, body, target_id, **kwargs): # noqa: E501
|
|
335
|
-
"""Update a target # noqa: E501
|
|
336
|
-
|
|
337
|
-
This method makes a synchronous HTTP request by default. To make an
|
|
338
|
-
asynchronous HTTP request, please pass async_req=True
|
|
339
|
-
>>> thread = api.update_target_with_http_info(body, target_id, async_req=True)
|
|
340
|
-
>>> result = thread.get()
|
|
341
|
-
|
|
342
|
-
:param async_req bool
|
|
343
|
-
:param Target body: The target to update. (required)
|
|
344
|
-
:param str target_id: The target id corresponding to the target you want to update (required)
|
|
345
|
-
:return: Target
|
|
346
|
-
If the method is called asynchronously,
|
|
347
|
-
returns the request thread.
|
|
348
|
-
"""
|
|
349
|
-
|
|
350
|
-
all_params = ['body', 'target_id'] # noqa: E501
|
|
351
|
-
all_params.append('async_req')
|
|
352
|
-
all_params.append('_return_http_data_only')
|
|
353
|
-
all_params.append('_preload_content')
|
|
354
|
-
all_params.append('_request_timeout')
|
|
355
|
-
|
|
356
|
-
params = locals()
|
|
357
|
-
for key, val in six.iteritems(params['kwargs']):
|
|
358
|
-
if key not in all_params:
|
|
359
|
-
raise TypeError(
|
|
360
|
-
"Got an unexpected keyword argument '%s'"
|
|
361
|
-
" to method update_target" % key
|
|
362
|
-
)
|
|
363
|
-
params[key] = val
|
|
364
|
-
del params['kwargs']
|
|
365
|
-
# verify the required parameter 'body' is set
|
|
366
|
-
if ('body' not in params or
|
|
367
|
-
params['body'] is None):
|
|
368
|
-
raise ValueError("Missing the required parameter `body` when calling `update_target`") # noqa: E501
|
|
369
|
-
# verify the required parameter 'target_id' is set
|
|
370
|
-
if ('target_id' not in params or
|
|
371
|
-
params['target_id'] is None):
|
|
372
|
-
raise ValueError("Missing the required parameter `target_id` when calling `update_target`") # noqa: E501
|
|
373
|
-
|
|
374
|
-
collection_formats = {}
|
|
375
|
-
|
|
376
|
-
path_params = {}
|
|
377
|
-
if 'target_id' in params:
|
|
378
|
-
path_params['targetId'] = params['target_id'] # noqa: E501
|
|
379
|
-
|
|
380
|
-
query_params = []
|
|
381
|
-
|
|
382
|
-
header_params = {}
|
|
383
|
-
|
|
384
|
-
form_params = []
|
|
385
|
-
local_var_files = {}
|
|
386
|
-
|
|
387
|
-
body_params = None
|
|
388
|
-
if 'body' in params:
|
|
389
|
-
body_params = params['body']
|
|
390
|
-
# HTTP header `Accept`
|
|
391
|
-
header_params['Accept'] = self.api_client.select_header_accept(
|
|
392
|
-
['application/json', 'text/json']) # noqa: E501
|
|
393
|
-
|
|
394
|
-
# HTTP header `Content-Type`
|
|
395
|
-
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
396
|
-
['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) # noqa: E501
|
|
397
|
-
|
|
398
|
-
# Authentication setting
|
|
399
|
-
auth_settings = [] # noqa: E501
|
|
400
|
-
|
|
401
|
-
return self.api_client.call_api(
|
|
402
|
-
'/teamdbapi/v2.0/target/{targetId}', 'PUT',
|
|
403
|
-
path_params,
|
|
404
|
-
query_params,
|
|
405
|
-
header_params,
|
|
406
|
-
body=body_params,
|
|
407
|
-
post_params=form_params,
|
|
408
|
-
files=local_var_files,
|
|
409
|
-
response_type='Target', # noqa: E501
|
|
410
|
-
auth_settings=auth_settings,
|
|
411
|
-
async_req=params.get('async_req'),
|
|
412
|
-
_return_http_data_only=params.get('_return_http_data_only'),
|
|
413
|
-
_preload_content=params.get('_preload_content', True),
|
|
414
|
-
_request_timeout=params.get('_request_timeout'),
|
|
415
|
-
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 TargetApi(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 create_target(self, body, **kwargs): # noqa: E501
|
|
36
|
+
"""Create a target # noqa: E501
|
|
37
|
+
|
|
38
|
+
Set the Target.Id to Guid.Empty (00000000-0000-0000-0000-000000000000) if you want to create a new target. The id will be generated by the server. # noqa: E501
|
|
39
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
40
|
+
asynchronous HTTP request, please pass async_req=True
|
|
41
|
+
>>> thread = api.create_target(body, async_req=True)
|
|
42
|
+
>>> result = thread.get()
|
|
43
|
+
|
|
44
|
+
:param async_req bool
|
|
45
|
+
:param Target body: The target to create. (required)
|
|
46
|
+
:return: Target
|
|
47
|
+
If the method is called asynchronously,
|
|
48
|
+
returns the request thread.
|
|
49
|
+
"""
|
|
50
|
+
kwargs['_return_http_data_only'] = True
|
|
51
|
+
if kwargs.get('async_req'):
|
|
52
|
+
return self.create_target_with_http_info(body, **kwargs) # noqa: E501
|
|
53
|
+
else:
|
|
54
|
+
(data) = self.create_target_with_http_info(body, **kwargs) # noqa: E501
|
|
55
|
+
return data
|
|
56
|
+
|
|
57
|
+
def create_target_with_http_info(self, body, **kwargs): # noqa: E501
|
|
58
|
+
"""Create a target # noqa: E501
|
|
59
|
+
|
|
60
|
+
Set the Target.Id to Guid.Empty (00000000-0000-0000-0000-000000000000) if you want to create a new target. The id will be generated by the server. # noqa: E501
|
|
61
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
62
|
+
asynchronous HTTP request, please pass async_req=True
|
|
63
|
+
>>> thread = api.create_target_with_http_info(body, async_req=True)
|
|
64
|
+
>>> result = thread.get()
|
|
65
|
+
|
|
66
|
+
:param async_req bool
|
|
67
|
+
:param Target body: The target to create. (required)
|
|
68
|
+
:return: Target
|
|
69
|
+
If the method is called asynchronously,
|
|
70
|
+
returns the request thread.
|
|
71
|
+
"""
|
|
72
|
+
|
|
73
|
+
all_params = ['body'] # noqa: E501
|
|
74
|
+
all_params.append('async_req')
|
|
75
|
+
all_params.append('_return_http_data_only')
|
|
76
|
+
all_params.append('_preload_content')
|
|
77
|
+
all_params.append('_request_timeout')
|
|
78
|
+
|
|
79
|
+
params = locals()
|
|
80
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
81
|
+
if key not in all_params:
|
|
82
|
+
raise TypeError(
|
|
83
|
+
"Got an unexpected keyword argument '%s'"
|
|
84
|
+
" to method create_target" % key
|
|
85
|
+
)
|
|
86
|
+
params[key] = val
|
|
87
|
+
del params['kwargs']
|
|
88
|
+
# verify the required parameter 'body' is set
|
|
89
|
+
if ('body' not in params or
|
|
90
|
+
params['body'] is None):
|
|
91
|
+
raise ValueError("Missing the required parameter `body` when calling `create_target`") # noqa: E501
|
|
92
|
+
|
|
93
|
+
collection_formats = {}
|
|
94
|
+
|
|
95
|
+
path_params = {}
|
|
96
|
+
|
|
97
|
+
query_params = []
|
|
98
|
+
|
|
99
|
+
header_params = {}
|
|
100
|
+
|
|
101
|
+
form_params = []
|
|
102
|
+
local_var_files = {}
|
|
103
|
+
|
|
104
|
+
body_params = None
|
|
105
|
+
if 'body' in params:
|
|
106
|
+
body_params = params['body']
|
|
107
|
+
# HTTP header `Accept`
|
|
108
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
109
|
+
['application/json', 'text/json']) # noqa: E501
|
|
110
|
+
|
|
111
|
+
# HTTP header `Content-Type`
|
|
112
|
+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
113
|
+
['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) # noqa: E501
|
|
114
|
+
|
|
115
|
+
# Authentication setting
|
|
116
|
+
auth_settings = [] # noqa: E501
|
|
117
|
+
|
|
118
|
+
return self.api_client.call_api(
|
|
119
|
+
'/teamdbapi/v2.0/target', 'POST',
|
|
120
|
+
path_params,
|
|
121
|
+
query_params,
|
|
122
|
+
header_params,
|
|
123
|
+
body=body_params,
|
|
124
|
+
post_params=form_params,
|
|
125
|
+
files=local_var_files,
|
|
126
|
+
response_type='Target', # noqa: E501
|
|
127
|
+
auth_settings=auth_settings,
|
|
128
|
+
async_req=params.get('async_req'),
|
|
129
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
130
|
+
_preload_content=params.get('_preload_content', True),
|
|
131
|
+
_request_timeout=params.get('_request_timeout'),
|
|
132
|
+
collection_formats=collection_formats)
|
|
133
|
+
|
|
134
|
+
def get_target(self, id, **kwargs): # noqa: E501
|
|
135
|
+
"""Get a target corresponding to a unique id # noqa: E501
|
|
136
|
+
|
|
137
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
138
|
+
asynchronous HTTP request, please pass async_req=True
|
|
139
|
+
>>> thread = api.get_target(id, async_req=True)
|
|
140
|
+
>>> result = thread.get()
|
|
141
|
+
|
|
142
|
+
:param async_req bool
|
|
143
|
+
:param str id: The unique target id that corresponds to the searched target (required)
|
|
144
|
+
:return: Target
|
|
145
|
+
If the method is called asynchronously,
|
|
146
|
+
returns the request thread.
|
|
147
|
+
"""
|
|
148
|
+
kwargs['_return_http_data_only'] = True
|
|
149
|
+
if kwargs.get('async_req'):
|
|
150
|
+
return self.get_target_with_http_info(id, **kwargs) # noqa: E501
|
|
151
|
+
else:
|
|
152
|
+
(data) = self.get_target_with_http_info(id, **kwargs) # noqa: E501
|
|
153
|
+
return data
|
|
154
|
+
|
|
155
|
+
def get_target_with_http_info(self, id, **kwargs): # noqa: E501
|
|
156
|
+
"""Get a target corresponding to a unique id # noqa: E501
|
|
157
|
+
|
|
158
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
159
|
+
asynchronous HTTP request, please pass async_req=True
|
|
160
|
+
>>> thread = api.get_target_with_http_info(id, async_req=True)
|
|
161
|
+
>>> result = thread.get()
|
|
162
|
+
|
|
163
|
+
:param async_req bool
|
|
164
|
+
:param str id: The unique target id that corresponds to the searched target (required)
|
|
165
|
+
:return: Target
|
|
166
|
+
If the method is called asynchronously,
|
|
167
|
+
returns the request thread.
|
|
168
|
+
"""
|
|
169
|
+
|
|
170
|
+
all_params = ['id'] # noqa: E501
|
|
171
|
+
all_params.append('async_req')
|
|
172
|
+
all_params.append('_return_http_data_only')
|
|
173
|
+
all_params.append('_preload_content')
|
|
174
|
+
all_params.append('_request_timeout')
|
|
175
|
+
|
|
176
|
+
params = locals()
|
|
177
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
178
|
+
if key not in all_params:
|
|
179
|
+
raise TypeError(
|
|
180
|
+
"Got an unexpected keyword argument '%s'"
|
|
181
|
+
" to method get_target" % key
|
|
182
|
+
)
|
|
183
|
+
params[key] = val
|
|
184
|
+
del params['kwargs']
|
|
185
|
+
# verify the required parameter 'id' is set
|
|
186
|
+
if ('id' not in params or
|
|
187
|
+
params['id'] is None):
|
|
188
|
+
raise ValueError("Missing the required parameter `id` when calling `get_target`") # noqa: E501
|
|
189
|
+
|
|
190
|
+
collection_formats = {}
|
|
191
|
+
|
|
192
|
+
path_params = {}
|
|
193
|
+
if 'id' in params:
|
|
194
|
+
path_params['id'] = params['id'] # noqa: E501
|
|
195
|
+
|
|
196
|
+
query_params = []
|
|
197
|
+
|
|
198
|
+
header_params = {}
|
|
199
|
+
|
|
200
|
+
form_params = []
|
|
201
|
+
local_var_files = {}
|
|
202
|
+
|
|
203
|
+
body_params = None
|
|
204
|
+
# HTTP header `Accept`
|
|
205
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
206
|
+
['application/json', 'text/json']) # noqa: E501
|
|
207
|
+
|
|
208
|
+
# Authentication setting
|
|
209
|
+
auth_settings = [] # noqa: E501
|
|
210
|
+
|
|
211
|
+
return self.api_client.call_api(
|
|
212
|
+
'/teamdbapi/v2.0/target/{id}', 'GET',
|
|
213
|
+
path_params,
|
|
214
|
+
query_params,
|
|
215
|
+
header_params,
|
|
216
|
+
body=body_params,
|
|
217
|
+
post_params=form_params,
|
|
218
|
+
files=local_var_files,
|
|
219
|
+
response_type='Target', # noqa: E501
|
|
220
|
+
auth_settings=auth_settings,
|
|
221
|
+
async_req=params.get('async_req'),
|
|
222
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
223
|
+
_preload_content=params.get('_preload_content', True),
|
|
224
|
+
_request_timeout=params.get('_request_timeout'),
|
|
225
|
+
collection_formats=collection_formats)
|
|
226
|
+
|
|
227
|
+
def get_targets(self, **kwargs): # noqa: E501
|
|
228
|
+
"""Get the list of all targets depending on your rights. # noqa: E501
|
|
229
|
+
|
|
230
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
231
|
+
asynchronous HTTP request, please pass async_req=True
|
|
232
|
+
>>> thread = api.get_targets(async_req=True)
|
|
233
|
+
>>> result = thread.get()
|
|
234
|
+
|
|
235
|
+
:param async_req bool
|
|
236
|
+
:return: list[Target]
|
|
237
|
+
If the method is called asynchronously,
|
|
238
|
+
returns the request thread.
|
|
239
|
+
"""
|
|
240
|
+
kwargs['_return_http_data_only'] = True
|
|
241
|
+
if kwargs.get('async_req'):
|
|
242
|
+
return self.get_targets_with_http_info(**kwargs) # noqa: E501
|
|
243
|
+
else:
|
|
244
|
+
(data) = self.get_targets_with_http_info(**kwargs) # noqa: E501
|
|
245
|
+
return data
|
|
246
|
+
|
|
247
|
+
def get_targets_with_http_info(self, **kwargs): # noqa: E501
|
|
248
|
+
"""Get the list of all targets depending on your rights. # noqa: E501
|
|
249
|
+
|
|
250
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
251
|
+
asynchronous HTTP request, please pass async_req=True
|
|
252
|
+
>>> thread = api.get_targets_with_http_info(async_req=True)
|
|
253
|
+
>>> result = thread.get()
|
|
254
|
+
|
|
255
|
+
:param async_req bool
|
|
256
|
+
:return: list[Target]
|
|
257
|
+
If the method is called asynchronously,
|
|
258
|
+
returns the request thread.
|
|
259
|
+
"""
|
|
260
|
+
|
|
261
|
+
all_params = [] # noqa: E501
|
|
262
|
+
all_params.append('async_req')
|
|
263
|
+
all_params.append('_return_http_data_only')
|
|
264
|
+
all_params.append('_preload_content')
|
|
265
|
+
all_params.append('_request_timeout')
|
|
266
|
+
|
|
267
|
+
params = locals()
|
|
268
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
269
|
+
if key not in all_params:
|
|
270
|
+
raise TypeError(
|
|
271
|
+
"Got an unexpected keyword argument '%s'"
|
|
272
|
+
" to method get_targets" % key
|
|
273
|
+
)
|
|
274
|
+
params[key] = val
|
|
275
|
+
del params['kwargs']
|
|
276
|
+
|
|
277
|
+
collection_formats = {}
|
|
278
|
+
|
|
279
|
+
path_params = {}
|
|
280
|
+
|
|
281
|
+
query_params = []
|
|
282
|
+
|
|
283
|
+
header_params = {}
|
|
284
|
+
|
|
285
|
+
form_params = []
|
|
286
|
+
local_var_files = {}
|
|
287
|
+
|
|
288
|
+
body_params = None
|
|
289
|
+
# HTTP header `Accept`
|
|
290
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
291
|
+
['application/json', 'text/json']) # noqa: E501
|
|
292
|
+
|
|
293
|
+
# Authentication setting
|
|
294
|
+
auth_settings = [] # noqa: E501
|
|
295
|
+
|
|
296
|
+
return self.api_client.call_api(
|
|
297
|
+
'/teamdbapi/v2.0/targets', 'GET',
|
|
298
|
+
path_params,
|
|
299
|
+
query_params,
|
|
300
|
+
header_params,
|
|
301
|
+
body=body_params,
|
|
302
|
+
post_params=form_params,
|
|
303
|
+
files=local_var_files,
|
|
304
|
+
response_type='list[Target]', # noqa: E501
|
|
305
|
+
auth_settings=auth_settings,
|
|
306
|
+
async_req=params.get('async_req'),
|
|
307
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
308
|
+
_preload_content=params.get('_preload_content', True),
|
|
309
|
+
_request_timeout=params.get('_request_timeout'),
|
|
310
|
+
collection_formats=collection_formats)
|
|
311
|
+
|
|
312
|
+
def update_target(self, body, target_id, **kwargs): # noqa: E501
|
|
313
|
+
"""Update a target # noqa: E501
|
|
314
|
+
|
|
315
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
316
|
+
asynchronous HTTP request, please pass async_req=True
|
|
317
|
+
>>> thread = api.update_target(body, target_id, async_req=True)
|
|
318
|
+
>>> result = thread.get()
|
|
319
|
+
|
|
320
|
+
:param async_req bool
|
|
321
|
+
:param Target body: The target to update. (required)
|
|
322
|
+
:param str target_id: The target id corresponding to the target you want to update (required)
|
|
323
|
+
:return: Target
|
|
324
|
+
If the method is called asynchronously,
|
|
325
|
+
returns the request thread.
|
|
326
|
+
"""
|
|
327
|
+
kwargs['_return_http_data_only'] = True
|
|
328
|
+
if kwargs.get('async_req'):
|
|
329
|
+
return self.update_target_with_http_info(body, target_id, **kwargs) # noqa: E501
|
|
330
|
+
else:
|
|
331
|
+
(data) = self.update_target_with_http_info(body, target_id, **kwargs) # noqa: E501
|
|
332
|
+
return data
|
|
333
|
+
|
|
334
|
+
def update_target_with_http_info(self, body, target_id, **kwargs): # noqa: E501
|
|
335
|
+
"""Update a target # noqa: E501
|
|
336
|
+
|
|
337
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
338
|
+
asynchronous HTTP request, please pass async_req=True
|
|
339
|
+
>>> thread = api.update_target_with_http_info(body, target_id, async_req=True)
|
|
340
|
+
>>> result = thread.get()
|
|
341
|
+
|
|
342
|
+
:param async_req bool
|
|
343
|
+
:param Target body: The target to update. (required)
|
|
344
|
+
:param str target_id: The target id corresponding to the target you want to update (required)
|
|
345
|
+
:return: Target
|
|
346
|
+
If the method is called asynchronously,
|
|
347
|
+
returns the request thread.
|
|
348
|
+
"""
|
|
349
|
+
|
|
350
|
+
all_params = ['body', 'target_id'] # noqa: E501
|
|
351
|
+
all_params.append('async_req')
|
|
352
|
+
all_params.append('_return_http_data_only')
|
|
353
|
+
all_params.append('_preload_content')
|
|
354
|
+
all_params.append('_request_timeout')
|
|
355
|
+
|
|
356
|
+
params = locals()
|
|
357
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
358
|
+
if key not in all_params:
|
|
359
|
+
raise TypeError(
|
|
360
|
+
"Got an unexpected keyword argument '%s'"
|
|
361
|
+
" to method update_target" % key
|
|
362
|
+
)
|
|
363
|
+
params[key] = val
|
|
364
|
+
del params['kwargs']
|
|
365
|
+
# verify the required parameter 'body' is set
|
|
366
|
+
if ('body' not in params or
|
|
367
|
+
params['body'] is None):
|
|
368
|
+
raise ValueError("Missing the required parameter `body` when calling `update_target`") # noqa: E501
|
|
369
|
+
# verify the required parameter 'target_id' is set
|
|
370
|
+
if ('target_id' not in params or
|
|
371
|
+
params['target_id'] is None):
|
|
372
|
+
raise ValueError("Missing the required parameter `target_id` when calling `update_target`") # noqa: E501
|
|
373
|
+
|
|
374
|
+
collection_formats = {}
|
|
375
|
+
|
|
376
|
+
path_params = {}
|
|
377
|
+
if 'target_id' in params:
|
|
378
|
+
path_params['targetId'] = params['target_id'] # noqa: E501
|
|
379
|
+
|
|
380
|
+
query_params = []
|
|
381
|
+
|
|
382
|
+
header_params = {}
|
|
383
|
+
|
|
384
|
+
form_params = []
|
|
385
|
+
local_var_files = {}
|
|
386
|
+
|
|
387
|
+
body_params = None
|
|
388
|
+
if 'body' in params:
|
|
389
|
+
body_params = params['body']
|
|
390
|
+
# HTTP header `Accept`
|
|
391
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
392
|
+
['application/json', 'text/json']) # noqa: E501
|
|
393
|
+
|
|
394
|
+
# HTTP header `Content-Type`
|
|
395
|
+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
396
|
+
['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) # noqa: E501
|
|
397
|
+
|
|
398
|
+
# Authentication setting
|
|
399
|
+
auth_settings = [] # noqa: E501
|
|
400
|
+
|
|
401
|
+
return self.api_client.call_api(
|
|
402
|
+
'/teamdbapi/v2.0/target/{targetId}', 'PUT',
|
|
403
|
+
path_params,
|
|
404
|
+
query_params,
|
|
405
|
+
header_params,
|
|
406
|
+
body=body_params,
|
|
407
|
+
post_params=form_params,
|
|
408
|
+
files=local_var_files,
|
|
409
|
+
response_type='Target', # noqa: E501
|
|
410
|
+
auth_settings=auth_settings,
|
|
411
|
+
async_req=params.get('async_req'),
|
|
412
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
413
|
+
_preload_content=params.get('_preload_content', True),
|
|
414
|
+
_request_timeout=params.get('_request_timeout'),
|
|
415
|
+
collection_formats=collection_formats)
|