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.
Files changed (94) hide show
  1. teamdbapi/__init__.py +11 -0
  2. teamdbapi/api/__init__.py +39 -34
  3. teamdbapi/api/assembly_api.py +2108 -2108
  4. teamdbapi/api/car_api.py +874 -874
  5. teamdbapi/api/component_api.py +954 -0
  6. teamdbapi/api/config_api.py +118 -118
  7. teamdbapi/api/criteria_api.py +126 -0
  8. teamdbapi/api/edit_api.py +433 -433
  9. teamdbapi/api/event_api.py +878 -878
  10. teamdbapi/api/fixed_field_api.py +320 -320
  11. teamdbapi/api/group_api.py +609 -609
  12. teamdbapi/api/import_export_api.py +828 -743
  13. teamdbapi/api/lap_api.py +708 -708
  14. teamdbapi/api/lap_report_api.py +490 -486
  15. teamdbapi/api/model_field_api.py +708 -708
  16. teamdbapi/api/mounting_api.py +219 -0
  17. teamdbapi/api/notes_authorization_api.py +324 -324
  18. teamdbapi/api/parameter_api.py +1176 -1176
  19. teamdbapi/api/part_api.py +304 -0
  20. teamdbapi/api/report_api.py +142 -142
  21. teamdbapi/api/revision_api.py +1420 -1420
  22. teamdbapi/api/revision_editor_selector_api.py +990 -990
  23. teamdbapi/api/run_api.py +603 -603
  24. teamdbapi/api/script_api.py +490 -490
  25. teamdbapi/api/session_api.py +720 -720
  26. teamdbapi/api/target_api.py +415 -415
  27. teamdbapi/api/team_db_list_api.py +987 -987
  28. teamdbapi/api/team_db_view_api.py +482 -482
  29. teamdbapi/api/tire_api.py +599 -599
  30. teamdbapi/api/tire_set_api.py +514 -514
  31. teamdbapi/api/track_api.py +506 -506
  32. teamdbapi/api/track_layout_api.py +514 -514
  33. teamdbapi/api/update_request_api.py +235 -0
  34. teamdbapi/api/user_api.py +474 -474
  35. teamdbapi/api/value_field_api.py +558 -558
  36. teamdbapi/api/version_api.py +449 -449
  37. teamdbapi/api_client.py +4 -8
  38. teamdbapi/configuration.py +6 -13
  39. teamdbapi/models/__init__.py +6 -0
  40. teamdbapi/models/assembly.py +1 -0
  41. teamdbapi/models/bleed_adjustment.py +1 -0
  42. teamdbapi/models/calibration.py +1 -0
  43. teamdbapi/models/car.py +1 -0
  44. teamdbapi/models/car_parameters_context.py +1 -0
  45. teamdbapi/models/compare_options.py +1 -0
  46. teamdbapi/models/compare_result.py +1 -0
  47. teamdbapi/models/compare_result_detail.py +2 -0
  48. teamdbapi/models/component.py +1217 -0
  49. teamdbapi/models/copy_from_tags_args.py +2 -0
  50. teamdbapi/models/couple_guid_text.py +1 -0
  51. teamdbapi/models/criteria.py +430 -0
  52. teamdbapi/models/criteria_value.py +197 -0
  53. teamdbapi/models/event.py +1 -0
  54. teamdbapi/models/fixed_field.py +2 -1
  55. teamdbapi/models/group.py +1 -0
  56. teamdbapi/models/import_parameters_args.py +1 -0
  57. teamdbapi/models/import_parameters_results.py +2 -0
  58. teamdbapi/models/item_value.py +1 -0
  59. teamdbapi/models/item_value_key.py +1 -0
  60. teamdbapi/models/lap.py +1 -0
  61. teamdbapi/models/lap_report_options.py +1 -0
  62. teamdbapi/models/model_field.py +3 -1
  63. teamdbapi/models/model_field_authorization.py +1 -0
  64. teamdbapi/models/mounting.py +489 -0
  65. teamdbapi/models/notes_authorization.py +1 -0
  66. teamdbapi/models/notes_context.py +1 -0
  67. teamdbapi/models/parameter.py +2 -0
  68. teamdbapi/models/parameter_cross_table.py +1 -0
  69. teamdbapi/models/part.py +963 -0
  70. teamdbapi/models/part_count.py +228 -0
  71. teamdbapi/models/problem_details.py +2 -6
  72. teamdbapi/models/revision.py +88 -3
  73. teamdbapi/models/revision_value.py +1 -0
  74. teamdbapi/models/run.py +1 -0
  75. teamdbapi/models/script.py +1 -0
  76. teamdbapi/models/session.py +1 -0
  77. teamdbapi/models/string_with_font_style.py +1 -0
  78. teamdbapi/models/target.py +64 -7
  79. teamdbapi/models/team_db_list.py +1 -0
  80. teamdbapi/models/team_db_list_item.py +1 -0
  81. teamdbapi/models/tire.py +2 -0
  82. teamdbapi/models/tire_set.py +2 -0
  83. teamdbapi/models/track.py +1 -0
  84. teamdbapi/models/track_layout.py +1 -0
  85. teamdbapi/models/user.py +1 -0
  86. teamdbapi/models/user_group.py +1 -0
  87. teamdbapi/models/value_field.py +1 -0
  88. teamdbapi/models/version.py +1 -0
  89. teamdbapi/rest.py +6 -1
  90. {teamdbapi-2.37.1.dist-info → teamdbapi-3.0.0.dist-info}/METADATA +5 -5
  91. teamdbapi-3.0.0.dist-info/RECORD +93 -0
  92. teamdbapi-2.37.1.dist-info/RECORD +0 -82
  93. {teamdbapi-2.37.1.dist-info → teamdbapi-3.0.0.dist-info}/LICENSE +0 -0
  94. {teamdbapi-2.37.1.dist-info → teamdbapi-3.0.0.dist-info}/WHEEL +0 -0
@@ -1,720 +1,720 @@
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 SessionApi(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_session(self, body, car_id, **kwargs): # noqa: E501
36
- """Create a new session # 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.create_session(body, car_id, async_req=True)
41
- >>> result = thread.get()
42
-
43
- :param async_req bool
44
- :param Session body: The session to create. (required)
45
- :param str car_id: The parent car. (required)
46
- :return: Session
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_session_with_http_info(body, car_id, **kwargs) # noqa: E501
53
- else:
54
- (data) = self.create_session_with_http_info(body, car_id, **kwargs) # noqa: E501
55
- return data
56
-
57
- def create_session_with_http_info(self, body, car_id, **kwargs): # noqa: E501
58
- """Create a new session # noqa: E501
59
-
60
- This method makes a synchronous HTTP request by default. To make an
61
- asynchronous HTTP request, please pass async_req=True
62
- >>> thread = api.create_session_with_http_info(body, car_id, async_req=True)
63
- >>> result = thread.get()
64
-
65
- :param async_req bool
66
- :param Session body: The session to create. (required)
67
- :param str car_id: The parent car. (required)
68
- :return: Session
69
- If the method is called asynchronously,
70
- returns the request thread.
71
- """
72
-
73
- all_params = ['body', 'car_id'] # 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_session" % 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_session`") # noqa: E501
92
- # verify the required parameter 'car_id' is set
93
- if ('car_id' not in params or
94
- params['car_id'] is None):
95
- raise ValueError("Missing the required parameter `car_id` when calling `create_session`") # noqa: E501
96
-
97
- collection_formats = {}
98
-
99
- path_params = {}
100
- if 'car_id' in params:
101
- path_params['carId'] = params['car_id'] # noqa: E501
102
-
103
- query_params = []
104
-
105
- header_params = {}
106
-
107
- form_params = []
108
- local_var_files = {}
109
-
110
- body_params = None
111
- if 'body' in params:
112
- body_params = params['body']
113
- # HTTP header `Accept`
114
- header_params['Accept'] = self.api_client.select_header_accept(
115
- ['application/json', 'text/json']) # noqa: E501
116
-
117
- # HTTP header `Content-Type`
118
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
119
- ['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) # noqa: E501
120
-
121
- # Authentication setting
122
- auth_settings = [] # noqa: E501
123
-
124
- return self.api_client.call_api(
125
- '/teamdbapi/v2.0/car/{carId}/session', 'POST',
126
- path_params,
127
- query_params,
128
- header_params,
129
- body=body_params,
130
- post_params=form_params,
131
- files=local_var_files,
132
- response_type='Session', # noqa: E501
133
- auth_settings=auth_settings,
134
- async_req=params.get('async_req'),
135
- _return_http_data_only=params.get('_return_http_data_only'),
136
- _preload_content=params.get('_preload_content', True),
137
- _request_timeout=params.get('_request_timeout'),
138
- collection_formats=collection_formats)
139
-
140
- def delete_session(self, session_id, **kwargs): # noqa: E501
141
- """Delete an existing session # noqa: E501
142
-
143
- This method makes a synchronous HTTP request by default. To make an
144
- asynchronous HTTP request, please pass async_req=True
145
- >>> thread = api.delete_session(session_id, async_req=True)
146
- >>> result = thread.get()
147
-
148
- :param async_req bool
149
- :param str session_id: The unique session id for which you want to delete the session (required)
150
- :return: None
151
- If the method is called asynchronously,
152
- returns the request thread.
153
- """
154
- kwargs['_return_http_data_only'] = True
155
- if kwargs.get('async_req'):
156
- return self.delete_session_with_http_info(session_id, **kwargs) # noqa: E501
157
- else:
158
- (data) = self.delete_session_with_http_info(session_id, **kwargs) # noqa: E501
159
- return data
160
-
161
- def delete_session_with_http_info(self, session_id, **kwargs): # noqa: E501
162
- """Delete an existing session # noqa: E501
163
-
164
- This method makes a synchronous HTTP request by default. To make an
165
- asynchronous HTTP request, please pass async_req=True
166
- >>> thread = api.delete_session_with_http_info(session_id, async_req=True)
167
- >>> result = thread.get()
168
-
169
- :param async_req bool
170
- :param str session_id: The unique session id for which you want to delete the session (required)
171
- :return: None
172
- If the method is called asynchronously,
173
- returns the request thread.
174
- """
175
-
176
- all_params = ['session_id'] # noqa: E501
177
- all_params.append('async_req')
178
- all_params.append('_return_http_data_only')
179
- all_params.append('_preload_content')
180
- all_params.append('_request_timeout')
181
-
182
- params = locals()
183
- for key, val in six.iteritems(params['kwargs']):
184
- if key not in all_params:
185
- raise TypeError(
186
- "Got an unexpected keyword argument '%s'"
187
- " to method delete_session" % key
188
- )
189
- params[key] = val
190
- del params['kwargs']
191
- # verify the required parameter 'session_id' is set
192
- if ('session_id' not in params or
193
- params['session_id'] is None):
194
- raise ValueError("Missing the required parameter `session_id` when calling `delete_session`") # noqa: E501
195
-
196
- collection_formats = {}
197
-
198
- path_params = {}
199
- if 'session_id' in params:
200
- path_params['sessionId'] = params['session_id'] # noqa: E501
201
-
202
- query_params = []
203
-
204
- header_params = {}
205
-
206
- form_params = []
207
- local_var_files = {}
208
-
209
- body_params = None
210
- # HTTP header `Accept`
211
- header_params['Accept'] = self.api_client.select_header_accept(
212
- ['application/json', 'text/json']) # noqa: E501
213
-
214
- # Authentication setting
215
- auth_settings = [] # noqa: E501
216
-
217
- return self.api_client.call_api(
218
- '/teamdbapi/v2.0/session/{sessionId}', 'DELETE',
219
- path_params,
220
- query_params,
221
- header_params,
222
- body=body_params,
223
- post_params=form_params,
224
- files=local_var_files,
225
- response_type=None, # noqa: E501
226
- auth_settings=auth_settings,
227
- async_req=params.get('async_req'),
228
- _return_http_data_only=params.get('_return_http_data_only'),
229
- _preload_content=params.get('_preload_content', True),
230
- _request_timeout=params.get('_request_timeout'),
231
- collection_formats=collection_formats)
232
-
233
- def get_current_session(self, **kwargs): # noqa: E501
234
- """Get the current session. # noqa: E501
235
-
236
- This method makes a synchronous HTTP request by default. To make an
237
- asynchronous HTTP request, please pass async_req=True
238
- >>> thread = api.get_current_session(async_req=True)
239
- >>> result = thread.get()
240
-
241
- :param async_req bool
242
- :return: Session
243
- If the method is called asynchronously,
244
- returns the request thread.
245
- """
246
- kwargs['_return_http_data_only'] = True
247
- if kwargs.get('async_req'):
248
- return self.get_current_session_with_http_info(**kwargs) # noqa: E501
249
- else:
250
- (data) = self.get_current_session_with_http_info(**kwargs) # noqa: E501
251
- return data
252
-
253
- def get_current_session_with_http_info(self, **kwargs): # noqa: E501
254
- """Get the current session. # noqa: E501
255
-
256
- This method makes a synchronous HTTP request by default. To make an
257
- asynchronous HTTP request, please pass async_req=True
258
- >>> thread = api.get_current_session_with_http_info(async_req=True)
259
- >>> result = thread.get()
260
-
261
- :param async_req bool
262
- :return: Session
263
- If the method is called asynchronously,
264
- returns the request thread.
265
- """
266
-
267
- all_params = [] # noqa: E501
268
- all_params.append('async_req')
269
- all_params.append('_return_http_data_only')
270
- all_params.append('_preload_content')
271
- all_params.append('_request_timeout')
272
-
273
- params = locals()
274
- for key, val in six.iteritems(params['kwargs']):
275
- if key not in all_params:
276
- raise TypeError(
277
- "Got an unexpected keyword argument '%s'"
278
- " to method get_current_session" % key
279
- )
280
- params[key] = val
281
- del params['kwargs']
282
-
283
- collection_formats = {}
284
-
285
- path_params = {}
286
-
287
- query_params = []
288
-
289
- header_params = {}
290
-
291
- form_params = []
292
- local_var_files = {}
293
-
294
- body_params = None
295
- # HTTP header `Accept`
296
- header_params['Accept'] = self.api_client.select_header_accept(
297
- ['application/json', 'text/json']) # noqa: E501
298
-
299
- # Authentication setting
300
- auth_settings = [] # noqa: E501
301
-
302
- return self.api_client.call_api(
303
- '/teamdbapi/v2.0/session/current', 'GET',
304
- path_params,
305
- query_params,
306
- header_params,
307
- body=body_params,
308
- post_params=form_params,
309
- files=local_var_files,
310
- response_type='Session', # noqa: E501
311
- auth_settings=auth_settings,
312
- async_req=params.get('async_req'),
313
- _return_http_data_only=params.get('_return_http_data_only'),
314
- _preload_content=params.get('_preload_content', True),
315
- _request_timeout=params.get('_request_timeout'),
316
- collection_formats=collection_formats)
317
-
318
- def get_session(self, session_id, **kwargs): # noqa: E501
319
- """Get a session via a unique id. # noqa: E501
320
-
321
- This method makes a synchronous HTTP request by default. To make an
322
- asynchronous HTTP request, please pass async_req=True
323
- >>> thread = api.get_session(session_id, async_req=True)
324
- >>> result = thread.get()
325
-
326
- :param async_req bool
327
- :param str session_id: The unique session id for which you want to get the session (required)
328
- :return: Session
329
- If the method is called asynchronously,
330
- returns the request thread.
331
- """
332
- kwargs['_return_http_data_only'] = True
333
- if kwargs.get('async_req'):
334
- return self.get_session_with_http_info(session_id, **kwargs) # noqa: E501
335
- else:
336
- (data) = self.get_session_with_http_info(session_id, **kwargs) # noqa: E501
337
- return data
338
-
339
- def get_session_with_http_info(self, session_id, **kwargs): # noqa: E501
340
- """Get a session via a unique id. # noqa: E501
341
-
342
- This method makes a synchronous HTTP request by default. To make an
343
- asynchronous HTTP request, please pass async_req=True
344
- >>> thread = api.get_session_with_http_info(session_id, async_req=True)
345
- >>> result = thread.get()
346
-
347
- :param async_req bool
348
- :param str session_id: The unique session id for which you want to get the session (required)
349
- :return: Session
350
- If the method is called asynchronously,
351
- returns the request thread.
352
- """
353
-
354
- all_params = ['session_id'] # noqa: E501
355
- all_params.append('async_req')
356
- all_params.append('_return_http_data_only')
357
- all_params.append('_preload_content')
358
- all_params.append('_request_timeout')
359
-
360
- params = locals()
361
- for key, val in six.iteritems(params['kwargs']):
362
- if key not in all_params:
363
- raise TypeError(
364
- "Got an unexpected keyword argument '%s'"
365
- " to method get_session" % key
366
- )
367
- params[key] = val
368
- del params['kwargs']
369
- # verify the required parameter 'session_id' is set
370
- if ('session_id' not in params or
371
- params['session_id'] is None):
372
- raise ValueError("Missing the required parameter `session_id` when calling `get_session`") # noqa: E501
373
-
374
- collection_formats = {}
375
-
376
- path_params = {}
377
- if 'session_id' in params:
378
- path_params['sessionId'] = params['session_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
- # HTTP header `Accept`
389
- header_params['Accept'] = self.api_client.select_header_accept(
390
- ['application/json', 'text/json']) # noqa: E501
391
-
392
- # Authentication setting
393
- auth_settings = [] # noqa: E501
394
-
395
- return self.api_client.call_api(
396
- '/teamdbapi/v2.0/session/{sessionId}', 'GET',
397
- path_params,
398
- query_params,
399
- header_params,
400
- body=body_params,
401
- post_params=form_params,
402
- files=local_var_files,
403
- response_type='Session', # noqa: E501
404
- auth_settings=auth_settings,
405
- async_req=params.get('async_req'),
406
- _return_http_data_only=params.get('_return_http_data_only'),
407
- _preload_content=params.get('_preload_content', True),
408
- _request_timeout=params.get('_request_timeout'),
409
- collection_formats=collection_formats)
410
-
411
- def get_session_list(self, car_id, **kwargs): # noqa: E501
412
- """Get the list of all sessions for an car. # noqa: E501
413
-
414
- This method makes a synchronous HTTP request by default. To make an
415
- asynchronous HTTP request, please pass async_req=True
416
- >>> thread = api.get_session_list(car_id, async_req=True)
417
- >>> result = thread.get()
418
-
419
- :param async_req bool
420
- :param str car_id: The unique car id for which you want to get the session list (required)
421
- :return: list[CoupleGuidText]
422
- If the method is called asynchronously,
423
- returns the request thread.
424
- """
425
- kwargs['_return_http_data_only'] = True
426
- if kwargs.get('async_req'):
427
- return self.get_session_list_with_http_info(car_id, **kwargs) # noqa: E501
428
- else:
429
- (data) = self.get_session_list_with_http_info(car_id, **kwargs) # noqa: E501
430
- return data
431
-
432
- def get_session_list_with_http_info(self, car_id, **kwargs): # noqa: E501
433
- """Get the list of all sessions for an car. # noqa: E501
434
-
435
- This method makes a synchronous HTTP request by default. To make an
436
- asynchronous HTTP request, please pass async_req=True
437
- >>> thread = api.get_session_list_with_http_info(car_id, async_req=True)
438
- >>> result = thread.get()
439
-
440
- :param async_req bool
441
- :param str car_id: The unique car id for which you want to get the session list (required)
442
- :return: list[CoupleGuidText]
443
- If the method is called asynchronously,
444
- returns the request thread.
445
- """
446
-
447
- all_params = ['car_id'] # noqa: E501
448
- all_params.append('async_req')
449
- all_params.append('_return_http_data_only')
450
- all_params.append('_preload_content')
451
- all_params.append('_request_timeout')
452
-
453
- params = locals()
454
- for key, val in six.iteritems(params['kwargs']):
455
- if key not in all_params:
456
- raise TypeError(
457
- "Got an unexpected keyword argument '%s'"
458
- " to method get_session_list" % key
459
- )
460
- params[key] = val
461
- del params['kwargs']
462
- # verify the required parameter 'car_id' is set
463
- if ('car_id' not in params or
464
- params['car_id'] is None):
465
- raise ValueError("Missing the required parameter `car_id` when calling `get_session_list`") # noqa: E501
466
-
467
- collection_formats = {}
468
-
469
- path_params = {}
470
- if 'car_id' in params:
471
- path_params['carId'] = params['car_id'] # noqa: E501
472
-
473
- query_params = []
474
-
475
- header_params = {}
476
-
477
- form_params = []
478
- local_var_files = {}
479
-
480
- body_params = None
481
- # HTTP header `Accept`
482
- header_params['Accept'] = self.api_client.select_header_accept(
483
- ['application/json', 'text/json']) # noqa: E501
484
-
485
- # Authentication setting
486
- auth_settings = [] # noqa: E501
487
-
488
- return self.api_client.call_api(
489
- '/teamdbapi/v2.0/car/{carId}/sessions', 'GET',
490
- path_params,
491
- query_params,
492
- header_params,
493
- body=body_params,
494
- post_params=form_params,
495
- files=local_var_files,
496
- response_type='list[CoupleGuidText]', # noqa: E501
497
- auth_settings=auth_settings,
498
- async_req=params.get('async_req'),
499
- _return_http_data_only=params.get('_return_http_data_only'),
500
- _preload_content=params.get('_preload_content', True),
501
- _request_timeout=params.get('_request_timeout'),
502
- collection_formats=collection_formats)
503
-
504
- def update_session(self, body, session_id, **kwargs): # noqa: E501
505
- """Update an existing session # noqa: E501
506
-
507
- This method makes a synchronous HTTP request by default. To make an
508
- asynchronous HTTP request, please pass async_req=True
509
- >>> thread = api.update_session(body, session_id, async_req=True)
510
- >>> result = thread.get()
511
-
512
- :param async_req bool
513
- :param Session body: The session to update. (required)
514
- :param str session_id: The unique session id for which you want to update the session (required)
515
- :return: Session
516
- If the method is called asynchronously,
517
- returns the request thread.
518
- """
519
- kwargs['_return_http_data_only'] = True
520
- if kwargs.get('async_req'):
521
- return self.update_session_with_http_info(body, session_id, **kwargs) # noqa: E501
522
- else:
523
- (data) = self.update_session_with_http_info(body, session_id, **kwargs) # noqa: E501
524
- return data
525
-
526
- def update_session_with_http_info(self, body, session_id, **kwargs): # noqa: E501
527
- """Update an existing session # noqa: E501
528
-
529
- This method makes a synchronous HTTP request by default. To make an
530
- asynchronous HTTP request, please pass async_req=True
531
- >>> thread = api.update_session_with_http_info(body, session_id, async_req=True)
532
- >>> result = thread.get()
533
-
534
- :param async_req bool
535
- :param Session body: The session to update. (required)
536
- :param str session_id: The unique session id for which you want to update the session (required)
537
- :return: Session
538
- If the method is called asynchronously,
539
- returns the request thread.
540
- """
541
-
542
- all_params = ['body', 'session_id'] # noqa: E501
543
- all_params.append('async_req')
544
- all_params.append('_return_http_data_only')
545
- all_params.append('_preload_content')
546
- all_params.append('_request_timeout')
547
-
548
- params = locals()
549
- for key, val in six.iteritems(params['kwargs']):
550
- if key not in all_params:
551
- raise TypeError(
552
- "Got an unexpected keyword argument '%s'"
553
- " to method update_session" % key
554
- )
555
- params[key] = val
556
- del params['kwargs']
557
- # verify the required parameter 'body' is set
558
- if ('body' not in params or
559
- params['body'] is None):
560
- raise ValueError("Missing the required parameter `body` when calling `update_session`") # noqa: E501
561
- # verify the required parameter 'session_id' is set
562
- if ('session_id' not in params or
563
- params['session_id'] is None):
564
- raise ValueError("Missing the required parameter `session_id` when calling `update_session`") # noqa: E501
565
-
566
- collection_formats = {}
567
-
568
- path_params = {}
569
- if 'session_id' in params:
570
- path_params['sessionId'] = params['session_id'] # noqa: E501
571
-
572
- query_params = []
573
-
574
- header_params = {}
575
-
576
- form_params = []
577
- local_var_files = {}
578
-
579
- body_params = None
580
- if 'body' in params:
581
- body_params = params['body']
582
- # HTTP header `Accept`
583
- header_params['Accept'] = self.api_client.select_header_accept(
584
- ['application/json', 'text/json']) # noqa: E501
585
-
586
- # HTTP header `Content-Type`
587
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
588
- ['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) # noqa: E501
589
-
590
- # Authentication setting
591
- auth_settings = [] # noqa: E501
592
-
593
- return self.api_client.call_api(
594
- '/teamdbapi/v2.0/session/{sessionId}', 'PUT',
595
- path_params,
596
- query_params,
597
- header_params,
598
- body=body_params,
599
- post_params=form_params,
600
- files=local_var_files,
601
- response_type='Session', # noqa: E501
602
- auth_settings=auth_settings,
603
- async_req=params.get('async_req'),
604
- _return_http_data_only=params.get('_return_http_data_only'),
605
- _preload_content=params.get('_preload_content', True),
606
- _request_timeout=params.get('_request_timeout'),
607
- collection_formats=collection_formats)
608
-
609
- def update_session_property(self, body, session_id, property_name, **kwargs): # noqa: E501
610
- """Update a property value for an existing session # noqa: E501
611
-
612
- This method makes a synchronous HTTP request by default. To make an
613
- asynchronous HTTP request, please pass async_req=True
614
- >>> thread = api.update_session_property(body, session_id, property_name, async_req=True)
615
- >>> result = thread.get()
616
-
617
- :param async_req bool
618
- :param object body: The new value. For SessionDate, you need to wrap the date around " for instance : "2018-12-20T09:31:25.111Z" (required)
619
- :param str session_id: The unique session id (required)
620
- :param str property_name: The property name to update (required)
621
- :return: Session
622
- If the method is called asynchronously,
623
- returns the request thread.
624
- """
625
- kwargs['_return_http_data_only'] = True
626
- if kwargs.get('async_req'):
627
- return self.update_session_property_with_http_info(body, session_id, property_name, **kwargs) # noqa: E501
628
- else:
629
- (data) = self.update_session_property_with_http_info(body, session_id, property_name, **kwargs) # noqa: E501
630
- return data
631
-
632
- def update_session_property_with_http_info(self, body, session_id, property_name, **kwargs): # noqa: E501
633
- """Update a property value for an existing session # noqa: E501
634
-
635
- This method makes a synchronous HTTP request by default. To make an
636
- asynchronous HTTP request, please pass async_req=True
637
- >>> thread = api.update_session_property_with_http_info(body, session_id, property_name, async_req=True)
638
- >>> result = thread.get()
639
-
640
- :param async_req bool
641
- :param object body: The new value. For SessionDate, you need to wrap the date around " for instance : "2018-12-20T09:31:25.111Z" (required)
642
- :param str session_id: The unique session id (required)
643
- :param str property_name: The property name to update (required)
644
- :return: Session
645
- If the method is called asynchronously,
646
- returns the request thread.
647
- """
648
-
649
- all_params = ['body', 'session_id', 'property_name'] # noqa: E501
650
- all_params.append('async_req')
651
- all_params.append('_return_http_data_only')
652
- all_params.append('_preload_content')
653
- all_params.append('_request_timeout')
654
-
655
- params = locals()
656
- for key, val in six.iteritems(params['kwargs']):
657
- if key not in all_params:
658
- raise TypeError(
659
- "Got an unexpected keyword argument '%s'"
660
- " to method update_session_property" % key
661
- )
662
- params[key] = val
663
- del params['kwargs']
664
- # verify the required parameter 'body' is set
665
- if ('body' not in params or
666
- params['body'] is None):
667
- raise ValueError("Missing the required parameter `body` when calling `update_session_property`") # noqa: E501
668
- # verify the required parameter 'session_id' is set
669
- if ('session_id' not in params or
670
- params['session_id'] is None):
671
- raise ValueError("Missing the required parameter `session_id` when calling `update_session_property`") # noqa: E501
672
- # verify the required parameter 'property_name' is set
673
- if ('property_name' not in params or
674
- params['property_name'] is None):
675
- raise ValueError("Missing the required parameter `property_name` when calling `update_session_property`") # noqa: E501
676
-
677
- collection_formats = {}
678
-
679
- path_params = {}
680
- if 'session_id' in params:
681
- path_params['sessionId'] = params['session_id'] # noqa: E501
682
- if 'property_name' in params:
683
- path_params['propertyName'] = params['property_name'] # noqa: E501
684
-
685
- query_params = []
686
-
687
- header_params = {}
688
-
689
- form_params = []
690
- local_var_files = {}
691
-
692
- body_params = None
693
- if 'body' in params:
694
- body_params = params['body']
695
- # HTTP header `Accept`
696
- header_params['Accept'] = self.api_client.select_header_accept(
697
- ['application/json', 'text/json']) # noqa: E501
698
-
699
- # HTTP header `Content-Type`
700
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
701
- ['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) # noqa: E501
702
-
703
- # Authentication setting
704
- auth_settings = [] # noqa: E501
705
-
706
- return self.api_client.call_api(
707
- '/teamdbapi/v2.0/session/{sessionId}/propertyName/{propertyName}', 'PUT',
708
- path_params,
709
- query_params,
710
- header_params,
711
- body=body_params,
712
- post_params=form_params,
713
- files=local_var_files,
714
- response_type='Session', # noqa: E501
715
- auth_settings=auth_settings,
716
- async_req=params.get('async_req'),
717
- _return_http_data_only=params.get('_return_http_data_only'),
718
- _preload_content=params.get('_preload_content', True),
719
- _request_timeout=params.get('_request_timeout'),
720
- 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 SessionApi(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_session(self, body, car_id, **kwargs): # noqa: E501
36
+ """Create a new session # 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.create_session(body, car_id, async_req=True)
41
+ >>> result = thread.get()
42
+
43
+ :param async_req bool
44
+ :param Session body: The session to create. (required)
45
+ :param str car_id: The parent car. (required)
46
+ :return: Session
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_session_with_http_info(body, car_id, **kwargs) # noqa: E501
53
+ else:
54
+ (data) = self.create_session_with_http_info(body, car_id, **kwargs) # noqa: E501
55
+ return data
56
+
57
+ def create_session_with_http_info(self, body, car_id, **kwargs): # noqa: E501
58
+ """Create a new session # noqa: E501
59
+
60
+ This method makes a synchronous HTTP request by default. To make an
61
+ asynchronous HTTP request, please pass async_req=True
62
+ >>> thread = api.create_session_with_http_info(body, car_id, async_req=True)
63
+ >>> result = thread.get()
64
+
65
+ :param async_req bool
66
+ :param Session body: The session to create. (required)
67
+ :param str car_id: The parent car. (required)
68
+ :return: Session
69
+ If the method is called asynchronously,
70
+ returns the request thread.
71
+ """
72
+
73
+ all_params = ['body', 'car_id'] # 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_session" % 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_session`") # noqa: E501
92
+ # verify the required parameter 'car_id' is set
93
+ if ('car_id' not in params or
94
+ params['car_id'] is None):
95
+ raise ValueError("Missing the required parameter `car_id` when calling `create_session`") # noqa: E501
96
+
97
+ collection_formats = {}
98
+
99
+ path_params = {}
100
+ if 'car_id' in params:
101
+ path_params['carId'] = params['car_id'] # noqa: E501
102
+
103
+ query_params = []
104
+
105
+ header_params = {}
106
+
107
+ form_params = []
108
+ local_var_files = {}
109
+
110
+ body_params = None
111
+ if 'body' in params:
112
+ body_params = params['body']
113
+ # HTTP header `Accept`
114
+ header_params['Accept'] = self.api_client.select_header_accept(
115
+ ['application/json', 'text/json']) # noqa: E501
116
+
117
+ # HTTP header `Content-Type`
118
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
119
+ ['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) # noqa: E501
120
+
121
+ # Authentication setting
122
+ auth_settings = [] # noqa: E501
123
+
124
+ return self.api_client.call_api(
125
+ '/teamdbapi/v2.0/car/{carId}/session', 'POST',
126
+ path_params,
127
+ query_params,
128
+ header_params,
129
+ body=body_params,
130
+ post_params=form_params,
131
+ files=local_var_files,
132
+ response_type='Session', # noqa: E501
133
+ auth_settings=auth_settings,
134
+ async_req=params.get('async_req'),
135
+ _return_http_data_only=params.get('_return_http_data_only'),
136
+ _preload_content=params.get('_preload_content', True),
137
+ _request_timeout=params.get('_request_timeout'),
138
+ collection_formats=collection_formats)
139
+
140
+ def delete_session(self, session_id, **kwargs): # noqa: E501
141
+ """Delete an existing session # noqa: E501
142
+
143
+ This method makes a synchronous HTTP request by default. To make an
144
+ asynchronous HTTP request, please pass async_req=True
145
+ >>> thread = api.delete_session(session_id, async_req=True)
146
+ >>> result = thread.get()
147
+
148
+ :param async_req bool
149
+ :param str session_id: The unique session id for which you want to delete the session (required)
150
+ :return: None
151
+ If the method is called asynchronously,
152
+ returns the request thread.
153
+ """
154
+ kwargs['_return_http_data_only'] = True
155
+ if kwargs.get('async_req'):
156
+ return self.delete_session_with_http_info(session_id, **kwargs) # noqa: E501
157
+ else:
158
+ (data) = self.delete_session_with_http_info(session_id, **kwargs) # noqa: E501
159
+ return data
160
+
161
+ def delete_session_with_http_info(self, session_id, **kwargs): # noqa: E501
162
+ """Delete an existing session # noqa: E501
163
+
164
+ This method makes a synchronous HTTP request by default. To make an
165
+ asynchronous HTTP request, please pass async_req=True
166
+ >>> thread = api.delete_session_with_http_info(session_id, async_req=True)
167
+ >>> result = thread.get()
168
+
169
+ :param async_req bool
170
+ :param str session_id: The unique session id for which you want to delete the session (required)
171
+ :return: None
172
+ If the method is called asynchronously,
173
+ returns the request thread.
174
+ """
175
+
176
+ all_params = ['session_id'] # noqa: E501
177
+ all_params.append('async_req')
178
+ all_params.append('_return_http_data_only')
179
+ all_params.append('_preload_content')
180
+ all_params.append('_request_timeout')
181
+
182
+ params = locals()
183
+ for key, val in six.iteritems(params['kwargs']):
184
+ if key not in all_params:
185
+ raise TypeError(
186
+ "Got an unexpected keyword argument '%s'"
187
+ " to method delete_session" % key
188
+ )
189
+ params[key] = val
190
+ del params['kwargs']
191
+ # verify the required parameter 'session_id' is set
192
+ if ('session_id' not in params or
193
+ params['session_id'] is None):
194
+ raise ValueError("Missing the required parameter `session_id` when calling `delete_session`") # noqa: E501
195
+
196
+ collection_formats = {}
197
+
198
+ path_params = {}
199
+ if 'session_id' in params:
200
+ path_params['sessionId'] = params['session_id'] # noqa: E501
201
+
202
+ query_params = []
203
+
204
+ header_params = {}
205
+
206
+ form_params = []
207
+ local_var_files = {}
208
+
209
+ body_params = None
210
+ # HTTP header `Accept`
211
+ header_params['Accept'] = self.api_client.select_header_accept(
212
+ ['application/json', 'text/json']) # noqa: E501
213
+
214
+ # Authentication setting
215
+ auth_settings = [] # noqa: E501
216
+
217
+ return self.api_client.call_api(
218
+ '/teamdbapi/v2.0/session/{sessionId}', 'DELETE',
219
+ path_params,
220
+ query_params,
221
+ header_params,
222
+ body=body_params,
223
+ post_params=form_params,
224
+ files=local_var_files,
225
+ response_type=None, # noqa: E501
226
+ auth_settings=auth_settings,
227
+ async_req=params.get('async_req'),
228
+ _return_http_data_only=params.get('_return_http_data_only'),
229
+ _preload_content=params.get('_preload_content', True),
230
+ _request_timeout=params.get('_request_timeout'),
231
+ collection_formats=collection_formats)
232
+
233
+ def get_current_session(self, **kwargs): # noqa: E501
234
+ """Get the current session. # noqa: E501
235
+
236
+ This method makes a synchronous HTTP request by default. To make an
237
+ asynchronous HTTP request, please pass async_req=True
238
+ >>> thread = api.get_current_session(async_req=True)
239
+ >>> result = thread.get()
240
+
241
+ :param async_req bool
242
+ :return: Session
243
+ If the method is called asynchronously,
244
+ returns the request thread.
245
+ """
246
+ kwargs['_return_http_data_only'] = True
247
+ if kwargs.get('async_req'):
248
+ return self.get_current_session_with_http_info(**kwargs) # noqa: E501
249
+ else:
250
+ (data) = self.get_current_session_with_http_info(**kwargs) # noqa: E501
251
+ return data
252
+
253
+ def get_current_session_with_http_info(self, **kwargs): # noqa: E501
254
+ """Get the current session. # noqa: E501
255
+
256
+ This method makes a synchronous HTTP request by default. To make an
257
+ asynchronous HTTP request, please pass async_req=True
258
+ >>> thread = api.get_current_session_with_http_info(async_req=True)
259
+ >>> result = thread.get()
260
+
261
+ :param async_req bool
262
+ :return: Session
263
+ If the method is called asynchronously,
264
+ returns the request thread.
265
+ """
266
+
267
+ all_params = [] # noqa: E501
268
+ all_params.append('async_req')
269
+ all_params.append('_return_http_data_only')
270
+ all_params.append('_preload_content')
271
+ all_params.append('_request_timeout')
272
+
273
+ params = locals()
274
+ for key, val in six.iteritems(params['kwargs']):
275
+ if key not in all_params:
276
+ raise TypeError(
277
+ "Got an unexpected keyword argument '%s'"
278
+ " to method get_current_session" % key
279
+ )
280
+ params[key] = val
281
+ del params['kwargs']
282
+
283
+ collection_formats = {}
284
+
285
+ path_params = {}
286
+
287
+ query_params = []
288
+
289
+ header_params = {}
290
+
291
+ form_params = []
292
+ local_var_files = {}
293
+
294
+ body_params = None
295
+ # HTTP header `Accept`
296
+ header_params['Accept'] = self.api_client.select_header_accept(
297
+ ['application/json', 'text/json']) # noqa: E501
298
+
299
+ # Authentication setting
300
+ auth_settings = [] # noqa: E501
301
+
302
+ return self.api_client.call_api(
303
+ '/teamdbapi/v2.0/session/current', 'GET',
304
+ path_params,
305
+ query_params,
306
+ header_params,
307
+ body=body_params,
308
+ post_params=form_params,
309
+ files=local_var_files,
310
+ response_type='Session', # noqa: E501
311
+ auth_settings=auth_settings,
312
+ async_req=params.get('async_req'),
313
+ _return_http_data_only=params.get('_return_http_data_only'),
314
+ _preload_content=params.get('_preload_content', True),
315
+ _request_timeout=params.get('_request_timeout'),
316
+ collection_formats=collection_formats)
317
+
318
+ def get_session(self, session_id, **kwargs): # noqa: E501
319
+ """Get a session via a unique id. # noqa: E501
320
+
321
+ This method makes a synchronous HTTP request by default. To make an
322
+ asynchronous HTTP request, please pass async_req=True
323
+ >>> thread = api.get_session(session_id, async_req=True)
324
+ >>> result = thread.get()
325
+
326
+ :param async_req bool
327
+ :param str session_id: The unique session id for which you want to get the session (required)
328
+ :return: Session
329
+ If the method is called asynchronously,
330
+ returns the request thread.
331
+ """
332
+ kwargs['_return_http_data_only'] = True
333
+ if kwargs.get('async_req'):
334
+ return self.get_session_with_http_info(session_id, **kwargs) # noqa: E501
335
+ else:
336
+ (data) = self.get_session_with_http_info(session_id, **kwargs) # noqa: E501
337
+ return data
338
+
339
+ def get_session_with_http_info(self, session_id, **kwargs): # noqa: E501
340
+ """Get a session via a unique id. # noqa: E501
341
+
342
+ This method makes a synchronous HTTP request by default. To make an
343
+ asynchronous HTTP request, please pass async_req=True
344
+ >>> thread = api.get_session_with_http_info(session_id, async_req=True)
345
+ >>> result = thread.get()
346
+
347
+ :param async_req bool
348
+ :param str session_id: The unique session id for which you want to get the session (required)
349
+ :return: Session
350
+ If the method is called asynchronously,
351
+ returns the request thread.
352
+ """
353
+
354
+ all_params = ['session_id'] # noqa: E501
355
+ all_params.append('async_req')
356
+ all_params.append('_return_http_data_only')
357
+ all_params.append('_preload_content')
358
+ all_params.append('_request_timeout')
359
+
360
+ params = locals()
361
+ for key, val in six.iteritems(params['kwargs']):
362
+ if key not in all_params:
363
+ raise TypeError(
364
+ "Got an unexpected keyword argument '%s'"
365
+ " to method get_session" % key
366
+ )
367
+ params[key] = val
368
+ del params['kwargs']
369
+ # verify the required parameter 'session_id' is set
370
+ if ('session_id' not in params or
371
+ params['session_id'] is None):
372
+ raise ValueError("Missing the required parameter `session_id` when calling `get_session`") # noqa: E501
373
+
374
+ collection_formats = {}
375
+
376
+ path_params = {}
377
+ if 'session_id' in params:
378
+ path_params['sessionId'] = params['session_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
+ # HTTP header `Accept`
389
+ header_params['Accept'] = self.api_client.select_header_accept(
390
+ ['application/json', 'text/json']) # noqa: E501
391
+
392
+ # Authentication setting
393
+ auth_settings = [] # noqa: E501
394
+
395
+ return self.api_client.call_api(
396
+ '/teamdbapi/v2.0/session/{sessionId}', 'GET',
397
+ path_params,
398
+ query_params,
399
+ header_params,
400
+ body=body_params,
401
+ post_params=form_params,
402
+ files=local_var_files,
403
+ response_type='Session', # noqa: E501
404
+ auth_settings=auth_settings,
405
+ async_req=params.get('async_req'),
406
+ _return_http_data_only=params.get('_return_http_data_only'),
407
+ _preload_content=params.get('_preload_content', True),
408
+ _request_timeout=params.get('_request_timeout'),
409
+ collection_formats=collection_formats)
410
+
411
+ def get_session_list(self, car_id, **kwargs): # noqa: E501
412
+ """Get the list of all sessions for an car. # noqa: E501
413
+
414
+ This method makes a synchronous HTTP request by default. To make an
415
+ asynchronous HTTP request, please pass async_req=True
416
+ >>> thread = api.get_session_list(car_id, async_req=True)
417
+ >>> result = thread.get()
418
+
419
+ :param async_req bool
420
+ :param str car_id: The unique car id for which you want to get the session list (required)
421
+ :return: list[CoupleGuidText]
422
+ If the method is called asynchronously,
423
+ returns the request thread.
424
+ """
425
+ kwargs['_return_http_data_only'] = True
426
+ if kwargs.get('async_req'):
427
+ return self.get_session_list_with_http_info(car_id, **kwargs) # noqa: E501
428
+ else:
429
+ (data) = self.get_session_list_with_http_info(car_id, **kwargs) # noqa: E501
430
+ return data
431
+
432
+ def get_session_list_with_http_info(self, car_id, **kwargs): # noqa: E501
433
+ """Get the list of all sessions for an car. # noqa: E501
434
+
435
+ This method makes a synchronous HTTP request by default. To make an
436
+ asynchronous HTTP request, please pass async_req=True
437
+ >>> thread = api.get_session_list_with_http_info(car_id, async_req=True)
438
+ >>> result = thread.get()
439
+
440
+ :param async_req bool
441
+ :param str car_id: The unique car id for which you want to get the session list (required)
442
+ :return: list[CoupleGuidText]
443
+ If the method is called asynchronously,
444
+ returns the request thread.
445
+ """
446
+
447
+ all_params = ['car_id'] # noqa: E501
448
+ all_params.append('async_req')
449
+ all_params.append('_return_http_data_only')
450
+ all_params.append('_preload_content')
451
+ all_params.append('_request_timeout')
452
+
453
+ params = locals()
454
+ for key, val in six.iteritems(params['kwargs']):
455
+ if key not in all_params:
456
+ raise TypeError(
457
+ "Got an unexpected keyword argument '%s'"
458
+ " to method get_session_list" % key
459
+ )
460
+ params[key] = val
461
+ del params['kwargs']
462
+ # verify the required parameter 'car_id' is set
463
+ if ('car_id' not in params or
464
+ params['car_id'] is None):
465
+ raise ValueError("Missing the required parameter `car_id` when calling `get_session_list`") # noqa: E501
466
+
467
+ collection_formats = {}
468
+
469
+ path_params = {}
470
+ if 'car_id' in params:
471
+ path_params['carId'] = params['car_id'] # noqa: E501
472
+
473
+ query_params = []
474
+
475
+ header_params = {}
476
+
477
+ form_params = []
478
+ local_var_files = {}
479
+
480
+ body_params = None
481
+ # HTTP header `Accept`
482
+ header_params['Accept'] = self.api_client.select_header_accept(
483
+ ['application/json', 'text/json']) # noqa: E501
484
+
485
+ # Authentication setting
486
+ auth_settings = [] # noqa: E501
487
+
488
+ return self.api_client.call_api(
489
+ '/teamdbapi/v2.0/car/{carId}/sessions', 'GET',
490
+ path_params,
491
+ query_params,
492
+ header_params,
493
+ body=body_params,
494
+ post_params=form_params,
495
+ files=local_var_files,
496
+ response_type='list[CoupleGuidText]', # noqa: E501
497
+ auth_settings=auth_settings,
498
+ async_req=params.get('async_req'),
499
+ _return_http_data_only=params.get('_return_http_data_only'),
500
+ _preload_content=params.get('_preload_content', True),
501
+ _request_timeout=params.get('_request_timeout'),
502
+ collection_formats=collection_formats)
503
+
504
+ def update_session(self, body, session_id, **kwargs): # noqa: E501
505
+ """Update an existing session # noqa: E501
506
+
507
+ This method makes a synchronous HTTP request by default. To make an
508
+ asynchronous HTTP request, please pass async_req=True
509
+ >>> thread = api.update_session(body, session_id, async_req=True)
510
+ >>> result = thread.get()
511
+
512
+ :param async_req bool
513
+ :param Session body: The session to update. (required)
514
+ :param str session_id: The unique session id for which you want to update the session (required)
515
+ :return: Session
516
+ If the method is called asynchronously,
517
+ returns the request thread.
518
+ """
519
+ kwargs['_return_http_data_only'] = True
520
+ if kwargs.get('async_req'):
521
+ return self.update_session_with_http_info(body, session_id, **kwargs) # noqa: E501
522
+ else:
523
+ (data) = self.update_session_with_http_info(body, session_id, **kwargs) # noqa: E501
524
+ return data
525
+
526
+ def update_session_with_http_info(self, body, session_id, **kwargs): # noqa: E501
527
+ """Update an existing session # noqa: E501
528
+
529
+ This method makes a synchronous HTTP request by default. To make an
530
+ asynchronous HTTP request, please pass async_req=True
531
+ >>> thread = api.update_session_with_http_info(body, session_id, async_req=True)
532
+ >>> result = thread.get()
533
+
534
+ :param async_req bool
535
+ :param Session body: The session to update. (required)
536
+ :param str session_id: The unique session id for which you want to update the session (required)
537
+ :return: Session
538
+ If the method is called asynchronously,
539
+ returns the request thread.
540
+ """
541
+
542
+ all_params = ['body', 'session_id'] # noqa: E501
543
+ all_params.append('async_req')
544
+ all_params.append('_return_http_data_only')
545
+ all_params.append('_preload_content')
546
+ all_params.append('_request_timeout')
547
+
548
+ params = locals()
549
+ for key, val in six.iteritems(params['kwargs']):
550
+ if key not in all_params:
551
+ raise TypeError(
552
+ "Got an unexpected keyword argument '%s'"
553
+ " to method update_session" % key
554
+ )
555
+ params[key] = val
556
+ del params['kwargs']
557
+ # verify the required parameter 'body' is set
558
+ if ('body' not in params or
559
+ params['body'] is None):
560
+ raise ValueError("Missing the required parameter `body` when calling `update_session`") # noqa: E501
561
+ # verify the required parameter 'session_id' is set
562
+ if ('session_id' not in params or
563
+ params['session_id'] is None):
564
+ raise ValueError("Missing the required parameter `session_id` when calling `update_session`") # noqa: E501
565
+
566
+ collection_formats = {}
567
+
568
+ path_params = {}
569
+ if 'session_id' in params:
570
+ path_params['sessionId'] = params['session_id'] # noqa: E501
571
+
572
+ query_params = []
573
+
574
+ header_params = {}
575
+
576
+ form_params = []
577
+ local_var_files = {}
578
+
579
+ body_params = None
580
+ if 'body' in params:
581
+ body_params = params['body']
582
+ # HTTP header `Accept`
583
+ header_params['Accept'] = self.api_client.select_header_accept(
584
+ ['application/json', 'text/json']) # noqa: E501
585
+
586
+ # HTTP header `Content-Type`
587
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
588
+ ['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) # noqa: E501
589
+
590
+ # Authentication setting
591
+ auth_settings = [] # noqa: E501
592
+
593
+ return self.api_client.call_api(
594
+ '/teamdbapi/v2.0/session/{sessionId}', 'PUT',
595
+ path_params,
596
+ query_params,
597
+ header_params,
598
+ body=body_params,
599
+ post_params=form_params,
600
+ files=local_var_files,
601
+ response_type='Session', # noqa: E501
602
+ auth_settings=auth_settings,
603
+ async_req=params.get('async_req'),
604
+ _return_http_data_only=params.get('_return_http_data_only'),
605
+ _preload_content=params.get('_preload_content', True),
606
+ _request_timeout=params.get('_request_timeout'),
607
+ collection_formats=collection_formats)
608
+
609
+ def update_session_property(self, body, session_id, property_name, **kwargs): # noqa: E501
610
+ """Update a property value for an existing session # noqa: E501
611
+
612
+ This method makes a synchronous HTTP request by default. To make an
613
+ asynchronous HTTP request, please pass async_req=True
614
+ >>> thread = api.update_session_property(body, session_id, property_name, async_req=True)
615
+ >>> result = thread.get()
616
+
617
+ :param async_req bool
618
+ :param object body: The new value. For SessionDate, you need to wrap the date around " for instance : "2018-12-20T09:31:25.111Z" (required)
619
+ :param str session_id: The unique session id (required)
620
+ :param str property_name: The property name to update (required)
621
+ :return: Session
622
+ If the method is called asynchronously,
623
+ returns the request thread.
624
+ """
625
+ kwargs['_return_http_data_only'] = True
626
+ if kwargs.get('async_req'):
627
+ return self.update_session_property_with_http_info(body, session_id, property_name, **kwargs) # noqa: E501
628
+ else:
629
+ (data) = self.update_session_property_with_http_info(body, session_id, property_name, **kwargs) # noqa: E501
630
+ return data
631
+
632
+ def update_session_property_with_http_info(self, body, session_id, property_name, **kwargs): # noqa: E501
633
+ """Update a property value for an existing session # noqa: E501
634
+
635
+ This method makes a synchronous HTTP request by default. To make an
636
+ asynchronous HTTP request, please pass async_req=True
637
+ >>> thread = api.update_session_property_with_http_info(body, session_id, property_name, async_req=True)
638
+ >>> result = thread.get()
639
+
640
+ :param async_req bool
641
+ :param object body: The new value. For SessionDate, you need to wrap the date around " for instance : "2018-12-20T09:31:25.111Z" (required)
642
+ :param str session_id: The unique session id (required)
643
+ :param str property_name: The property name to update (required)
644
+ :return: Session
645
+ If the method is called asynchronously,
646
+ returns the request thread.
647
+ """
648
+
649
+ all_params = ['body', 'session_id', 'property_name'] # noqa: E501
650
+ all_params.append('async_req')
651
+ all_params.append('_return_http_data_only')
652
+ all_params.append('_preload_content')
653
+ all_params.append('_request_timeout')
654
+
655
+ params = locals()
656
+ for key, val in six.iteritems(params['kwargs']):
657
+ if key not in all_params:
658
+ raise TypeError(
659
+ "Got an unexpected keyword argument '%s'"
660
+ " to method update_session_property" % key
661
+ )
662
+ params[key] = val
663
+ del params['kwargs']
664
+ # verify the required parameter 'body' is set
665
+ if ('body' not in params or
666
+ params['body'] is None):
667
+ raise ValueError("Missing the required parameter `body` when calling `update_session_property`") # noqa: E501
668
+ # verify the required parameter 'session_id' is set
669
+ if ('session_id' not in params or
670
+ params['session_id'] is None):
671
+ raise ValueError("Missing the required parameter `session_id` when calling `update_session_property`") # noqa: E501
672
+ # verify the required parameter 'property_name' is set
673
+ if ('property_name' not in params or
674
+ params['property_name'] is None):
675
+ raise ValueError("Missing the required parameter `property_name` when calling `update_session_property`") # noqa: E501
676
+
677
+ collection_formats = {}
678
+
679
+ path_params = {}
680
+ if 'session_id' in params:
681
+ path_params['sessionId'] = params['session_id'] # noqa: E501
682
+ if 'property_name' in params:
683
+ path_params['propertyName'] = params['property_name'] # noqa: E501
684
+
685
+ query_params = []
686
+
687
+ header_params = {}
688
+
689
+ form_params = []
690
+ local_var_files = {}
691
+
692
+ body_params = None
693
+ if 'body' in params:
694
+ body_params = params['body']
695
+ # HTTP header `Accept`
696
+ header_params['Accept'] = self.api_client.select_header_accept(
697
+ ['application/json', 'text/json']) # noqa: E501
698
+
699
+ # HTTP header `Content-Type`
700
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
701
+ ['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) # noqa: E501
702
+
703
+ # Authentication setting
704
+ auth_settings = [] # noqa: E501
705
+
706
+ return self.api_client.call_api(
707
+ '/teamdbapi/v2.0/session/{sessionId}/propertyName/{propertyName}', 'PUT',
708
+ path_params,
709
+ query_params,
710
+ header_params,
711
+ body=body_params,
712
+ post_params=form_params,
713
+ files=local_var_files,
714
+ response_type='Session', # noqa: E501
715
+ auth_settings=auth_settings,
716
+ async_req=params.get('async_req'),
717
+ _return_http_data_only=params.get('_return_http_data_only'),
718
+ _preload_content=params.get('_preload_content', True),
719
+ _request_timeout=params.get('_request_timeout'),
720
+ collection_formats=collection_formats)