tesla-api-sdk 1.0.0__py3-none-any.whl → 1.0.2__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.
- {tesla_api_sdk-1.0.0.dist-info → tesla_api_sdk-1.0.2.dist-info}/METADATA +40 -34
- {tesla_api_sdk-1.0.0.dist-info → tesla_api_sdk-1.0.2.dist-info}/RECORD +34 -24
- {tesla_api_sdk-1.0.0.dist-info → tesla_api_sdk-1.0.2.dist-info}/WHEEL +1 -1
- teslafleetmanagementapi/configuration.py +13 -11
- teslafleetmanagementapi/controllers/__init__.py +2 -1
- teslafleetmanagementapi/controllers/base_controller.py +1 -1
- teslafleetmanagementapi/controllers/charging_controller.py +6 -3
- teslafleetmanagementapi/controllers/energy_controller.py +14 -11
- teslafleetmanagementapi/controllers/{oauth_authorization_controller.py → o_auth_authorization_controller.py} +24 -24
- teslafleetmanagementapi/controllers/partner_controller.py +7 -4
- teslafleetmanagementapi/controllers/user_controller.py +7 -4
- teslafleetmanagementapi/controllers/vehicle_commands_controller.py +891 -0
- teslafleetmanagementapi/controllers/vehicles_controller.py +24 -21
- teslafleetmanagementapi/exceptions/__init__.py +1 -1
- teslafleetmanagementapi/exceptions/{oauth_provider_exception.py → o_auth_provider_exception.py} +3 -3
- teslafleetmanagementapi/http/auth/__init__.py +1 -1
- teslafleetmanagementapi/http/auth/{oauth_2.py → thirdpartytoken.py} +111 -82
- teslafleetmanagementapi/models/__init__.py +12 -3
- teslafleetmanagementapi/models/actuate_trunk_request.py +92 -0
- teslafleetmanagementapi/models/add_charge_schedule_request.py +272 -0
- teslafleetmanagementapi/models/add_precondition_schedule_request.py +203 -0
- teslafleetmanagementapi/models/adjust_volume_request.py +92 -0
- teslafleetmanagementapi/models/api_1_vehicles_response_get_vehicle.py +1 -1
- teslafleetmanagementapi/models/command_response.py +109 -0
- teslafleetmanagementapi/models/command_result.py +105 -0
- teslafleetmanagementapi/models/guest_mode_request.py +92 -0
- teslafleetmanagementapi/models/kind_get_wall_connector_charging_history.py +1 -1
- teslafleetmanagementapi/models/{oauth_provider_error.py → o_auth_provider_error.py} +1 -1
- teslafleetmanagementapi/models/o_auth_scope_thirdpartytoken.py +84 -0
- teslafleetmanagementapi/models/{oauth_token.py → o_auth_token.py} +2 -2
- teslafleetmanagementapi/models/which_trunk.py +45 -0
- teslafleetmanagementapi/teslafleetmanagementapi_client.py +23 -14
- {tesla_api_sdk-1.0.0.dist-info → tesla_api_sdk-1.0.2.dist-info}/licenses/LICENSE +0 -0
- {tesla_api_sdk-1.0.0.dist-info → tesla_api_sdk-1.0.2.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,891 @@
|
|
|
1
|
+
"""teslafleetmanagementapi.
|
|
2
|
+
|
|
3
|
+
This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
# ruff: noqa: D410, E501, E101, D206
|
|
7
|
+
from apimatic_core.authentication.multiple.and_auth_group import (
|
|
8
|
+
And,
|
|
9
|
+
)
|
|
10
|
+
from apimatic_core.authentication.multiple.single_auth import (
|
|
11
|
+
Single,
|
|
12
|
+
)
|
|
13
|
+
from apimatic_core.request_builder import RequestBuilder
|
|
14
|
+
from apimatic_core.response_handler import ResponseHandler
|
|
15
|
+
from apimatic_core.types.parameter import Parameter
|
|
16
|
+
|
|
17
|
+
from teslafleetmanagementapi.api_helper import (
|
|
18
|
+
APIHelper,
|
|
19
|
+
)
|
|
20
|
+
from teslafleetmanagementapi.configuration import (
|
|
21
|
+
Server,
|
|
22
|
+
)
|
|
23
|
+
from teslafleetmanagementapi.controllers.base_controller import (
|
|
24
|
+
BaseController,
|
|
25
|
+
)
|
|
26
|
+
from teslafleetmanagementapi.http.http_method_enum import (
|
|
27
|
+
HttpMethodEnum,
|
|
28
|
+
)
|
|
29
|
+
from teslafleetmanagementapi.models.command_response import (
|
|
30
|
+
CommandResponse,
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class VehicleCommandsController(BaseController):
|
|
35
|
+
"""A Controller to access Endpoints in the teslafleetmanagementapi API."""
|
|
36
|
+
|
|
37
|
+
def __init__(self, config):
|
|
38
|
+
"""Initialize VehicleCommandsController object."""
|
|
39
|
+
super(VehicleCommandsController, self).__init__(config)
|
|
40
|
+
|
|
41
|
+
def actuate_trunk(self,
|
|
42
|
+
vehicle_tag,
|
|
43
|
+
body):
|
|
44
|
+
"""Perform a POST request to
|
|
45
|
+
/api/1/vehicles/{vehicle_tag}/command/actuate_trunk.
|
|
46
|
+
|
|
47
|
+
Controls the front or rear trunk
|
|
48
|
+
|
|
49
|
+
Args:
|
|
50
|
+
vehicle_tag (str): The request template parameter.
|
|
51
|
+
body (ActuateTrunkRequest): The request body parameter.
|
|
52
|
+
|
|
53
|
+
Returns:
|
|
54
|
+
ApiResponse: An object with the response value as well as other useful
|
|
55
|
+
information such as status codes and headers. Vehicle command response
|
|
56
|
+
|
|
57
|
+
Raises:
|
|
58
|
+
ApiException: When an error occurs while fetching the data from the
|
|
59
|
+
remote API. This exception includes the HTTP Response code, an error
|
|
60
|
+
message, and the HTTP body that was received in the request.
|
|
61
|
+
|
|
62
|
+
"""
|
|
63
|
+
return super().new_api_call_builder.request(
|
|
64
|
+
RequestBuilder().server(Server.DEFAULT)
|
|
65
|
+
.path("/api/1/vehicles/{vehicle_tag}/command/actuate_trunk")
|
|
66
|
+
.http_method(HttpMethodEnum.POST)
|
|
67
|
+
.template_param(Parameter()
|
|
68
|
+
.key("vehicle_tag")
|
|
69
|
+
.value(vehicle_tag)
|
|
70
|
+
.is_required(True)
|
|
71
|
+
.should_encode(True))
|
|
72
|
+
.header_param(Parameter()
|
|
73
|
+
.key("Content-Type")
|
|
74
|
+
.value("application/json"))
|
|
75
|
+
.body_param(Parameter()
|
|
76
|
+
.value(body)
|
|
77
|
+
.is_required(True))
|
|
78
|
+
.header_param(Parameter()
|
|
79
|
+
.key("accept")
|
|
80
|
+
.value("application/json"))
|
|
81
|
+
.body_serializer(APIHelper.json_serialize)
|
|
82
|
+
.auth(And(Single("bearerAuth"), Single("thirdpartytoken"))),
|
|
83
|
+
).response(
|
|
84
|
+
ResponseHandler()
|
|
85
|
+
.deserializer(APIHelper.json_deserialize)
|
|
86
|
+
.deserialize_into(CommandResponse.from_dictionary)
|
|
87
|
+
.is_api_response(True),
|
|
88
|
+
).execute()
|
|
89
|
+
|
|
90
|
+
def add_charge_schedule(self,
|
|
91
|
+
vehicle_tag,
|
|
92
|
+
body):
|
|
93
|
+
"""Perform a POST request to
|
|
94
|
+
/api/1/vehicles/{vehicle_tag}/command/add_charge_schedule.
|
|
95
|
+
|
|
96
|
+
Args:
|
|
97
|
+
vehicle_tag (str): The request template parameter.
|
|
98
|
+
body (AddChargeScheduleRequest): The request body parameter.
|
|
99
|
+
|
|
100
|
+
Returns:
|
|
101
|
+
ApiResponse: An object with the response value as well as other useful
|
|
102
|
+
information such as status codes and headers. Vehicle command response
|
|
103
|
+
|
|
104
|
+
Raises:
|
|
105
|
+
ApiException: When an error occurs while fetching the data from the
|
|
106
|
+
remote API. This exception includes the HTTP Response code, an error
|
|
107
|
+
message, and the HTTP body that was received in the request.
|
|
108
|
+
|
|
109
|
+
"""
|
|
110
|
+
return super().new_api_call_builder.request(
|
|
111
|
+
RequestBuilder().server(Server.DEFAULT)
|
|
112
|
+
.path("/api/1/vehicles/{vehicle_tag}/command/add_charge_schedule")
|
|
113
|
+
.http_method(HttpMethodEnum.POST)
|
|
114
|
+
.template_param(Parameter()
|
|
115
|
+
.key("vehicle_tag")
|
|
116
|
+
.value(vehicle_tag)
|
|
117
|
+
.is_required(True)
|
|
118
|
+
.should_encode(True))
|
|
119
|
+
.header_param(Parameter()
|
|
120
|
+
.key("Content-Type")
|
|
121
|
+
.value("application/json"))
|
|
122
|
+
.body_param(Parameter()
|
|
123
|
+
.value(body)
|
|
124
|
+
.is_required(True))
|
|
125
|
+
.header_param(Parameter()
|
|
126
|
+
.key("accept")
|
|
127
|
+
.value("application/json"))
|
|
128
|
+
.body_serializer(APIHelper.json_serialize)
|
|
129
|
+
.auth(And(Single("bearerAuth"), Single("thirdpartytoken"))),
|
|
130
|
+
).response(
|
|
131
|
+
ResponseHandler()
|
|
132
|
+
.deserializer(APIHelper.json_deserialize)
|
|
133
|
+
.deserialize_into(CommandResponse.from_dictionary)
|
|
134
|
+
.is_api_response(True),
|
|
135
|
+
).execute()
|
|
136
|
+
|
|
137
|
+
def add_precondition_schedule(self,
|
|
138
|
+
vehicle_tag,
|
|
139
|
+
body):
|
|
140
|
+
"""Perform a POST request to
|
|
141
|
+
/api/1/vehicles/{vehicle_tag}/command/add_precondition_schedule.
|
|
142
|
+
|
|
143
|
+
Args:
|
|
144
|
+
vehicle_tag (str): The request template parameter.
|
|
145
|
+
body (AddPreconditionScheduleRequest): The request body parameter.
|
|
146
|
+
|
|
147
|
+
Returns:
|
|
148
|
+
ApiResponse: An object with the response value as well as other useful
|
|
149
|
+
information such as status codes and headers. Vehicle command response
|
|
150
|
+
|
|
151
|
+
Raises:
|
|
152
|
+
ApiException: When an error occurs while fetching the data from the
|
|
153
|
+
remote API. This exception includes the HTTP Response code, an error
|
|
154
|
+
message, and the HTTP body that was received in the request.
|
|
155
|
+
|
|
156
|
+
"""
|
|
157
|
+
return super().new_api_call_builder.request(
|
|
158
|
+
RequestBuilder().server(Server.DEFAULT)
|
|
159
|
+
.path("/api/1/vehicles/{vehicle_tag}/command/add_precondition_schedule")
|
|
160
|
+
.http_method(HttpMethodEnum.POST)
|
|
161
|
+
.template_param(Parameter()
|
|
162
|
+
.key("vehicle_tag")
|
|
163
|
+
.value(vehicle_tag)
|
|
164
|
+
.is_required(True)
|
|
165
|
+
.should_encode(True))
|
|
166
|
+
.header_param(Parameter()
|
|
167
|
+
.key("Content-Type")
|
|
168
|
+
.value("application/json"))
|
|
169
|
+
.body_param(Parameter()
|
|
170
|
+
.value(body)
|
|
171
|
+
.is_required(True))
|
|
172
|
+
.header_param(Parameter()
|
|
173
|
+
.key("accept")
|
|
174
|
+
.value("application/json"))
|
|
175
|
+
.body_serializer(APIHelper.json_serialize)
|
|
176
|
+
.auth(And(Single("bearerAuth"), Single("thirdpartytoken"))),
|
|
177
|
+
).response(
|
|
178
|
+
ResponseHandler()
|
|
179
|
+
.deserializer(APIHelper.json_deserialize)
|
|
180
|
+
.deserialize_into(CommandResponse.from_dictionary)
|
|
181
|
+
.is_api_response(True),
|
|
182
|
+
).execute()
|
|
183
|
+
|
|
184
|
+
def adjust_media_volume(self,
|
|
185
|
+
vehicle_tag,
|
|
186
|
+
body):
|
|
187
|
+
"""Perform a POST request to
|
|
188
|
+
/api/1/vehicles/{vehicle_tag}/command/adjust_volume.
|
|
189
|
+
|
|
190
|
+
Args:
|
|
191
|
+
vehicle_tag (str): The request template parameter.
|
|
192
|
+
body (AdjustVolumeRequest): The request body parameter.
|
|
193
|
+
|
|
194
|
+
Returns:
|
|
195
|
+
ApiResponse: An object with the response value as well as other useful
|
|
196
|
+
information such as status codes and headers. Vehicle command response
|
|
197
|
+
|
|
198
|
+
Raises:
|
|
199
|
+
ApiException: When an error occurs while fetching the data from the
|
|
200
|
+
remote API. This exception includes the HTTP Response code, an error
|
|
201
|
+
message, and the HTTP body that was received in the request.
|
|
202
|
+
|
|
203
|
+
"""
|
|
204
|
+
return super().new_api_call_builder.request(
|
|
205
|
+
RequestBuilder().server(Server.DEFAULT)
|
|
206
|
+
.path("/api/1/vehicles/{vehicle_tag}/command/adjust_volume")
|
|
207
|
+
.http_method(HttpMethodEnum.POST)
|
|
208
|
+
.template_param(Parameter()
|
|
209
|
+
.key("vehicle_tag")
|
|
210
|
+
.value(vehicle_tag)
|
|
211
|
+
.is_required(True)
|
|
212
|
+
.should_encode(True))
|
|
213
|
+
.header_param(Parameter()
|
|
214
|
+
.key("Content-Type")
|
|
215
|
+
.value("application/json"))
|
|
216
|
+
.body_param(Parameter()
|
|
217
|
+
.value(body)
|
|
218
|
+
.is_required(True))
|
|
219
|
+
.header_param(Parameter()
|
|
220
|
+
.key("accept")
|
|
221
|
+
.value("application/json"))
|
|
222
|
+
.body_serializer(APIHelper.json_serialize)
|
|
223
|
+
.auth(And(Single("bearerAuth"), Single("thirdpartytoken"))),
|
|
224
|
+
).response(
|
|
225
|
+
ResponseHandler()
|
|
226
|
+
.deserializer(APIHelper.json_deserialize)
|
|
227
|
+
.deserialize_into(CommandResponse.from_dictionary)
|
|
228
|
+
.is_api_response(True),
|
|
229
|
+
).execute()
|
|
230
|
+
|
|
231
|
+
def start_climate_preconditioning(self,
|
|
232
|
+
vehicle_tag):
|
|
233
|
+
"""Perform a POST request to
|
|
234
|
+
/api/1/vehicles/{vehicle_tag}/command/auto_conditioning_start.
|
|
235
|
+
|
|
236
|
+
Args:
|
|
237
|
+
vehicle_tag (str): The request template parameter.
|
|
238
|
+
|
|
239
|
+
Returns:
|
|
240
|
+
ApiResponse: An object with the response value as well as other useful
|
|
241
|
+
information such as status codes and headers. Vehicle command response
|
|
242
|
+
|
|
243
|
+
Raises:
|
|
244
|
+
ApiException: When an error occurs while fetching the data from the
|
|
245
|
+
remote API. This exception includes the HTTP Response code, an error
|
|
246
|
+
message, and the HTTP body that was received in the request.
|
|
247
|
+
|
|
248
|
+
"""
|
|
249
|
+
return super().new_api_call_builder.request(
|
|
250
|
+
RequestBuilder().server(Server.DEFAULT)
|
|
251
|
+
.path("/api/1/vehicles/{vehicle_tag}/command/auto_conditioning_start")
|
|
252
|
+
.http_method(HttpMethodEnum.POST)
|
|
253
|
+
.template_param(Parameter()
|
|
254
|
+
.key("vehicle_tag")
|
|
255
|
+
.value(vehicle_tag)
|
|
256
|
+
.is_required(True)
|
|
257
|
+
.should_encode(True))
|
|
258
|
+
.header_param(Parameter()
|
|
259
|
+
.key("accept")
|
|
260
|
+
.value("application/json"))
|
|
261
|
+
.auth(And(Single("bearerAuth"), Single("thirdpartytoken"))),
|
|
262
|
+
).response(
|
|
263
|
+
ResponseHandler()
|
|
264
|
+
.deserializer(APIHelper.json_deserialize)
|
|
265
|
+
.deserialize_into(CommandResponse.from_dictionary)
|
|
266
|
+
.is_api_response(True),
|
|
267
|
+
).execute()
|
|
268
|
+
|
|
269
|
+
def stop_climate_preconditioning(self,
|
|
270
|
+
vehicle_tag):
|
|
271
|
+
"""Perform a POST request to
|
|
272
|
+
/api/1/vehicles/{vehicle_tag}/command/auto_conditioning_stop.
|
|
273
|
+
|
|
274
|
+
Args:
|
|
275
|
+
vehicle_tag (str): The request template parameter.
|
|
276
|
+
|
|
277
|
+
Returns:
|
|
278
|
+
ApiResponse: An object with the response value as well as other useful
|
|
279
|
+
information such as status codes and headers. Vehicle command response
|
|
280
|
+
|
|
281
|
+
Raises:
|
|
282
|
+
ApiException: When an error occurs while fetching the data from the
|
|
283
|
+
remote API. This exception includes the HTTP Response code, an error
|
|
284
|
+
message, and the HTTP body that was received in the request.
|
|
285
|
+
|
|
286
|
+
"""
|
|
287
|
+
return super().new_api_call_builder.request(
|
|
288
|
+
RequestBuilder().server(Server.DEFAULT)
|
|
289
|
+
.path("/api/1/vehicles/{vehicle_tag}/command/auto_conditioning_stop")
|
|
290
|
+
.http_method(HttpMethodEnum.POST)
|
|
291
|
+
.template_param(Parameter()
|
|
292
|
+
.key("vehicle_tag")
|
|
293
|
+
.value(vehicle_tag)
|
|
294
|
+
.is_required(True)
|
|
295
|
+
.should_encode(True))
|
|
296
|
+
.header_param(Parameter()
|
|
297
|
+
.key("accept")
|
|
298
|
+
.value("application/json"))
|
|
299
|
+
.auth(And(Single("bearerAuth"), Single("thirdpartytoken"))),
|
|
300
|
+
).response(
|
|
301
|
+
ResponseHandler()
|
|
302
|
+
.deserializer(APIHelper.json_deserialize)
|
|
303
|
+
.deserialize_into(CommandResponse.from_dictionary)
|
|
304
|
+
.is_api_response(True),
|
|
305
|
+
).execute()
|
|
306
|
+
|
|
307
|
+
def cancel_software_update(self,
|
|
308
|
+
vehicle_tag):
|
|
309
|
+
"""Perform a POST request to
|
|
310
|
+
/api/1/vehicles/{vehicle_tag}/command/cancel_software_update.
|
|
311
|
+
|
|
312
|
+
Args:
|
|
313
|
+
vehicle_tag (str): The request template parameter.
|
|
314
|
+
|
|
315
|
+
Returns:
|
|
316
|
+
ApiResponse: An object with the response value as well as other useful
|
|
317
|
+
information such as status codes and headers. Vehicle command response
|
|
318
|
+
|
|
319
|
+
Raises:
|
|
320
|
+
ApiException: When an error occurs while fetching the data from the
|
|
321
|
+
remote API. This exception includes the HTTP Response code, an error
|
|
322
|
+
message, and the HTTP body that was received in the request.
|
|
323
|
+
|
|
324
|
+
"""
|
|
325
|
+
return super().new_api_call_builder.request(
|
|
326
|
+
RequestBuilder().server(Server.DEFAULT)
|
|
327
|
+
.path("/api/1/vehicles/{vehicle_tag}/command/cancel_software_update")
|
|
328
|
+
.http_method(HttpMethodEnum.POST)
|
|
329
|
+
.template_param(Parameter()
|
|
330
|
+
.key("vehicle_tag")
|
|
331
|
+
.value(vehicle_tag)
|
|
332
|
+
.is_required(True)
|
|
333
|
+
.should_encode(True))
|
|
334
|
+
.header_param(Parameter()
|
|
335
|
+
.key("accept")
|
|
336
|
+
.value("application/json"))
|
|
337
|
+
.auth(And(Single("bearerAuth"), Single("thirdpartytoken"))),
|
|
338
|
+
).response(
|
|
339
|
+
ResponseHandler()
|
|
340
|
+
.deserializer(APIHelper.json_deserialize)
|
|
341
|
+
.deserialize_into(CommandResponse.from_dictionary)
|
|
342
|
+
.is_api_response(True),
|
|
343
|
+
).execute()
|
|
344
|
+
|
|
345
|
+
def charge_max_range(self,
|
|
346
|
+
vehicle_tag):
|
|
347
|
+
"""Perform a POST request to
|
|
348
|
+
/api/1/vehicles/{vehicle_tag}/command/charge_max_range.
|
|
349
|
+
|
|
350
|
+
Args:
|
|
351
|
+
vehicle_tag (str): The request template parameter.
|
|
352
|
+
|
|
353
|
+
Returns:
|
|
354
|
+
ApiResponse: An object with the response value as well as other useful
|
|
355
|
+
information such as status codes and headers. Vehicle command response
|
|
356
|
+
|
|
357
|
+
Raises:
|
|
358
|
+
ApiException: When an error occurs while fetching the data from the
|
|
359
|
+
remote API. This exception includes the HTTP Response code, an error
|
|
360
|
+
message, and the HTTP body that was received in the request.
|
|
361
|
+
|
|
362
|
+
"""
|
|
363
|
+
return super().new_api_call_builder.request(
|
|
364
|
+
RequestBuilder().server(Server.DEFAULT)
|
|
365
|
+
.path("/api/1/vehicles/{vehicle_tag}/command/charge_max_range")
|
|
366
|
+
.http_method(HttpMethodEnum.POST)
|
|
367
|
+
.template_param(Parameter()
|
|
368
|
+
.key("vehicle_tag")
|
|
369
|
+
.value(vehicle_tag)
|
|
370
|
+
.is_required(True)
|
|
371
|
+
.should_encode(True))
|
|
372
|
+
.header_param(Parameter()
|
|
373
|
+
.key("accept")
|
|
374
|
+
.value("application/json"))
|
|
375
|
+
.auth(And(Single("bearerAuth"), Single("thirdpartytoken"))),
|
|
376
|
+
).response(
|
|
377
|
+
ResponseHandler()
|
|
378
|
+
.deserializer(APIHelper.json_deserialize)
|
|
379
|
+
.deserialize_into(CommandResponse.from_dictionary)
|
|
380
|
+
.is_api_response(True),
|
|
381
|
+
).execute()
|
|
382
|
+
|
|
383
|
+
def open_charge_port_door(self,
|
|
384
|
+
vehicle_tag):
|
|
385
|
+
"""Perform a POST request to
|
|
386
|
+
/api/1/vehicles/{vehicle_tag}/command/charge_port_door_open.
|
|
387
|
+
|
|
388
|
+
Args:
|
|
389
|
+
vehicle_tag (str): The request template parameter.
|
|
390
|
+
|
|
391
|
+
Returns:
|
|
392
|
+
ApiResponse: An object with the response value as well as other useful
|
|
393
|
+
information such as status codes and headers. Vehicle command response
|
|
394
|
+
|
|
395
|
+
Raises:
|
|
396
|
+
ApiException: When an error occurs while fetching the data from the
|
|
397
|
+
remote API. This exception includes the HTTP Response code, an error
|
|
398
|
+
message, and the HTTP body that was received in the request.
|
|
399
|
+
|
|
400
|
+
"""
|
|
401
|
+
return super().new_api_call_builder.request(
|
|
402
|
+
RequestBuilder().server(Server.DEFAULT)
|
|
403
|
+
.path("/api/1/vehicles/{vehicle_tag}/command/charge_port_door_open")
|
|
404
|
+
.http_method(HttpMethodEnum.POST)
|
|
405
|
+
.template_param(Parameter()
|
|
406
|
+
.key("vehicle_tag")
|
|
407
|
+
.value(vehicle_tag)
|
|
408
|
+
.is_required(True)
|
|
409
|
+
.should_encode(True))
|
|
410
|
+
.header_param(Parameter()
|
|
411
|
+
.key("accept")
|
|
412
|
+
.value("application/json"))
|
|
413
|
+
.auth(And(Single("bearerAuth"), Single("thirdpartytoken"))),
|
|
414
|
+
).response(
|
|
415
|
+
ResponseHandler()
|
|
416
|
+
.deserializer(APIHelper.json_deserialize)
|
|
417
|
+
.deserialize_into(CommandResponse.from_dictionary)
|
|
418
|
+
.is_api_response(True),
|
|
419
|
+
).execute()
|
|
420
|
+
|
|
421
|
+
def close_charge_port_door(self,
|
|
422
|
+
vehicle_tag):
|
|
423
|
+
"""Perform a POST request to
|
|
424
|
+
/api/1/vehicles/{vehicle_tag}/command/charge_port_door_close.
|
|
425
|
+
|
|
426
|
+
Args:
|
|
427
|
+
vehicle_tag (str): The request template parameter.
|
|
428
|
+
|
|
429
|
+
Returns:
|
|
430
|
+
ApiResponse: An object with the response value as well as other useful
|
|
431
|
+
information such as status codes and headers. Vehicle command response
|
|
432
|
+
|
|
433
|
+
Raises:
|
|
434
|
+
ApiException: When an error occurs while fetching the data from the
|
|
435
|
+
remote API. This exception includes the HTTP Response code, an error
|
|
436
|
+
message, and the HTTP body that was received in the request.
|
|
437
|
+
|
|
438
|
+
"""
|
|
439
|
+
return super().new_api_call_builder.request(
|
|
440
|
+
RequestBuilder().server(Server.DEFAULT)
|
|
441
|
+
.path("/api/1/vehicles/{vehicle_tag}/command/charge_port_door_close")
|
|
442
|
+
.http_method(HttpMethodEnum.POST)
|
|
443
|
+
.template_param(Parameter()
|
|
444
|
+
.key("vehicle_tag")
|
|
445
|
+
.value(vehicle_tag)
|
|
446
|
+
.is_required(True)
|
|
447
|
+
.should_encode(True))
|
|
448
|
+
.header_param(Parameter()
|
|
449
|
+
.key("accept")
|
|
450
|
+
.value("application/json"))
|
|
451
|
+
.auth(And(Single("bearerAuth"), Single("thirdpartytoken"))),
|
|
452
|
+
).response(
|
|
453
|
+
ResponseHandler()
|
|
454
|
+
.deserializer(APIHelper.json_deserialize)
|
|
455
|
+
.deserialize_into(CommandResponse.from_dictionary)
|
|
456
|
+
.is_api_response(True),
|
|
457
|
+
).execute()
|
|
458
|
+
|
|
459
|
+
def charge_standard(self,
|
|
460
|
+
vehicle_tag):
|
|
461
|
+
"""Perform a POST request to
|
|
462
|
+
/api/1/vehicles/{vehicle_tag}/command/charge_standard.
|
|
463
|
+
|
|
464
|
+
Args:
|
|
465
|
+
vehicle_tag (str): The request template parameter.
|
|
466
|
+
|
|
467
|
+
Returns:
|
|
468
|
+
ApiResponse: An object with the response value as well as other useful
|
|
469
|
+
information such as status codes and headers. Vehicle command response
|
|
470
|
+
|
|
471
|
+
Raises:
|
|
472
|
+
ApiException: When an error occurs while fetching the data from the
|
|
473
|
+
remote API. This exception includes the HTTP Response code, an error
|
|
474
|
+
message, and the HTTP body that was received in the request.
|
|
475
|
+
|
|
476
|
+
"""
|
|
477
|
+
return super().new_api_call_builder.request(
|
|
478
|
+
RequestBuilder().server(Server.DEFAULT)
|
|
479
|
+
.path("/api/1/vehicles/{vehicle_tag}/command/charge_standard")
|
|
480
|
+
.http_method(HttpMethodEnum.POST)
|
|
481
|
+
.template_param(Parameter()
|
|
482
|
+
.key("vehicle_tag")
|
|
483
|
+
.value(vehicle_tag)
|
|
484
|
+
.is_required(True)
|
|
485
|
+
.should_encode(True))
|
|
486
|
+
.header_param(Parameter()
|
|
487
|
+
.key("accept")
|
|
488
|
+
.value("application/json"))
|
|
489
|
+
.auth(And(Single("bearerAuth"), Single("thirdpartytoken"))),
|
|
490
|
+
).response(
|
|
491
|
+
ResponseHandler()
|
|
492
|
+
.deserializer(APIHelper.json_deserialize)
|
|
493
|
+
.deserialize_into(CommandResponse.from_dictionary)
|
|
494
|
+
.is_api_response(True),
|
|
495
|
+
).execute()
|
|
496
|
+
|
|
497
|
+
def start_charging(self,
|
|
498
|
+
vehicle_tag):
|
|
499
|
+
"""Perform a POST request to
|
|
500
|
+
/api/1/vehicles/{vehicle_tag}/command/charge_start.
|
|
501
|
+
|
|
502
|
+
Args:
|
|
503
|
+
vehicle_tag (str): The request template parameter.
|
|
504
|
+
|
|
505
|
+
Returns:
|
|
506
|
+
ApiResponse: An object with the response value as well as other useful
|
|
507
|
+
information such as status codes and headers. Vehicle command response
|
|
508
|
+
|
|
509
|
+
Raises:
|
|
510
|
+
ApiException: When an error occurs while fetching the data from the
|
|
511
|
+
remote API. This exception includes the HTTP Response code, an error
|
|
512
|
+
message, and the HTTP body that was received in the request.
|
|
513
|
+
|
|
514
|
+
"""
|
|
515
|
+
return super().new_api_call_builder.request(
|
|
516
|
+
RequestBuilder().server(Server.DEFAULT)
|
|
517
|
+
.path("/api/1/vehicles/{vehicle_tag}/command/charge_start")
|
|
518
|
+
.http_method(HttpMethodEnum.POST)
|
|
519
|
+
.template_param(Parameter()
|
|
520
|
+
.key("vehicle_tag")
|
|
521
|
+
.value(vehicle_tag)
|
|
522
|
+
.is_required(True)
|
|
523
|
+
.should_encode(True))
|
|
524
|
+
.header_param(Parameter()
|
|
525
|
+
.key("accept")
|
|
526
|
+
.value("application/json"))
|
|
527
|
+
.auth(And(Single("bearerAuth"), Single("thirdpartytoken"))),
|
|
528
|
+
).response(
|
|
529
|
+
ResponseHandler()
|
|
530
|
+
.deserializer(APIHelper.json_deserialize)
|
|
531
|
+
.deserialize_into(CommandResponse.from_dictionary)
|
|
532
|
+
.is_api_response(True),
|
|
533
|
+
).execute()
|
|
534
|
+
|
|
535
|
+
def stop_charging(self,
|
|
536
|
+
vehicle_tag):
|
|
537
|
+
"""Perform a POST request to
|
|
538
|
+
/api/1/vehicles/{vehicle_tag}/command/charge_stop.
|
|
539
|
+
|
|
540
|
+
Args:
|
|
541
|
+
vehicle_tag (str): The request template parameter.
|
|
542
|
+
|
|
543
|
+
Returns:
|
|
544
|
+
ApiResponse: An object with the response value as well as other useful
|
|
545
|
+
information such as status codes and headers. Vehicle command response
|
|
546
|
+
|
|
547
|
+
Raises:
|
|
548
|
+
ApiException: When an error occurs while fetching the data from the
|
|
549
|
+
remote API. This exception includes the HTTP Response code, an error
|
|
550
|
+
message, and the HTTP body that was received in the request.
|
|
551
|
+
|
|
552
|
+
"""
|
|
553
|
+
return super().new_api_call_builder.request(
|
|
554
|
+
RequestBuilder().server(Server.DEFAULT)
|
|
555
|
+
.path("/api/1/vehicles/{vehicle_tag}/command/charge_stop")
|
|
556
|
+
.http_method(HttpMethodEnum.POST)
|
|
557
|
+
.template_param(Parameter()
|
|
558
|
+
.key("vehicle_tag")
|
|
559
|
+
.value(vehicle_tag)
|
|
560
|
+
.is_required(True)
|
|
561
|
+
.should_encode(True))
|
|
562
|
+
.header_param(Parameter()
|
|
563
|
+
.key("accept")
|
|
564
|
+
.value("application/json"))
|
|
565
|
+
.auth(And(Single("bearerAuth"), Single("thirdpartytoken"))),
|
|
566
|
+
).response(
|
|
567
|
+
ResponseHandler()
|
|
568
|
+
.deserializer(APIHelper.json_deserialize)
|
|
569
|
+
.deserialize_into(CommandResponse.from_dictionary)
|
|
570
|
+
.is_api_response(True),
|
|
571
|
+
).execute()
|
|
572
|
+
|
|
573
|
+
def clear_pin_to_drive_admin(self,
|
|
574
|
+
vehicle_tag):
|
|
575
|
+
"""Perform a POST request to
|
|
576
|
+
/api/1/vehicles/{vehicle_tag}/command/clear_pin_to_drive_admin.
|
|
577
|
+
|
|
578
|
+
Deactivates PIN to Drive and resets the associated PIN for supported firmware
|
|
579
|
+
versions.
|
|
580
|
+
|
|
581
|
+
Args:
|
|
582
|
+
vehicle_tag (str): The request template parameter.
|
|
583
|
+
|
|
584
|
+
Returns:
|
|
585
|
+
ApiResponse: An object with the response value as well as other useful
|
|
586
|
+
information such as status codes and headers. Vehicle command response
|
|
587
|
+
|
|
588
|
+
Raises:
|
|
589
|
+
ApiException: When an error occurs while fetching the data from the
|
|
590
|
+
remote API. This exception includes the HTTP Response code, an error
|
|
591
|
+
message, and the HTTP body that was received in the request.
|
|
592
|
+
|
|
593
|
+
"""
|
|
594
|
+
return super().new_api_call_builder.request(
|
|
595
|
+
RequestBuilder().server(Server.DEFAULT)
|
|
596
|
+
.path("/api/1/vehicles/{vehicle_tag}/command/clear_pin_to_drive_admin")
|
|
597
|
+
.http_method(HttpMethodEnum.POST)
|
|
598
|
+
.template_param(Parameter()
|
|
599
|
+
.key("vehicle_tag")
|
|
600
|
+
.value(vehicle_tag)
|
|
601
|
+
.is_required(True)
|
|
602
|
+
.should_encode(True))
|
|
603
|
+
.header_param(Parameter()
|
|
604
|
+
.key("accept")
|
|
605
|
+
.value("application/json"))
|
|
606
|
+
.auth(And(Single("bearerAuth"), Single("thirdpartytoken"))),
|
|
607
|
+
).response(
|
|
608
|
+
ResponseHandler()
|
|
609
|
+
.deserializer(APIHelper.json_deserialize)
|
|
610
|
+
.deserialize_into(CommandResponse.from_dictionary)
|
|
611
|
+
.is_api_response(True),
|
|
612
|
+
).execute()
|
|
613
|
+
|
|
614
|
+
def lock_doors(self,
|
|
615
|
+
vehicle_tag):
|
|
616
|
+
"""Perform a POST request to
|
|
617
|
+
/api/1/vehicles/{vehicle_tag}/command/door_lock.
|
|
618
|
+
|
|
619
|
+
Args:
|
|
620
|
+
vehicle_tag (str): The request template parameter.
|
|
621
|
+
|
|
622
|
+
Returns:
|
|
623
|
+
ApiResponse: An object with the response value as well as other useful
|
|
624
|
+
information such as status codes and headers. Vehicle command response
|
|
625
|
+
|
|
626
|
+
Raises:
|
|
627
|
+
ApiException: When an error occurs while fetching the data from the
|
|
628
|
+
remote API. This exception includes the HTTP Response code, an error
|
|
629
|
+
message, and the HTTP body that was received in the request.
|
|
630
|
+
|
|
631
|
+
"""
|
|
632
|
+
return super().new_api_call_builder.request(
|
|
633
|
+
RequestBuilder().server(Server.DEFAULT)
|
|
634
|
+
.path("/api/1/vehicles/{vehicle_tag}/command/door_lock")
|
|
635
|
+
.http_method(HttpMethodEnum.POST)
|
|
636
|
+
.template_param(Parameter()
|
|
637
|
+
.key("vehicle_tag")
|
|
638
|
+
.value(vehicle_tag)
|
|
639
|
+
.is_required(True)
|
|
640
|
+
.should_encode(True))
|
|
641
|
+
.header_param(Parameter()
|
|
642
|
+
.key("accept")
|
|
643
|
+
.value("application/json"))
|
|
644
|
+
.auth(And(Single("bearerAuth"), Single("thirdpartytoken"))),
|
|
645
|
+
).response(
|
|
646
|
+
ResponseHandler()
|
|
647
|
+
.deserializer(APIHelper.json_deserialize)
|
|
648
|
+
.deserialize_into(CommandResponse.from_dictionary)
|
|
649
|
+
.is_api_response(True),
|
|
650
|
+
).execute()
|
|
651
|
+
|
|
652
|
+
def unlock_doors(self,
|
|
653
|
+
vehicle_tag):
|
|
654
|
+
"""Perform a POST request to
|
|
655
|
+
/api/1/vehicles/{vehicle_tag}/command/door_unlock.
|
|
656
|
+
|
|
657
|
+
Args:
|
|
658
|
+
vehicle_tag (str): The request template parameter.
|
|
659
|
+
|
|
660
|
+
Returns:
|
|
661
|
+
ApiResponse: An object with the response value as well as other useful
|
|
662
|
+
information such as status codes and headers. Vehicle command response
|
|
663
|
+
|
|
664
|
+
Raises:
|
|
665
|
+
ApiException: When an error occurs while fetching the data from the
|
|
666
|
+
remote API. This exception includes the HTTP Response code, an error
|
|
667
|
+
message, and the HTTP body that was received in the request.
|
|
668
|
+
|
|
669
|
+
"""
|
|
670
|
+
return super().new_api_call_builder.request(
|
|
671
|
+
RequestBuilder().server(Server.DEFAULT)
|
|
672
|
+
.path("/api/1/vehicles/{vehicle_tag}/command/door_unlock")
|
|
673
|
+
.http_method(HttpMethodEnum.POST)
|
|
674
|
+
.template_param(Parameter()
|
|
675
|
+
.key("vehicle_tag")
|
|
676
|
+
.value(vehicle_tag)
|
|
677
|
+
.is_required(True)
|
|
678
|
+
.should_encode(True))
|
|
679
|
+
.header_param(Parameter()
|
|
680
|
+
.key("accept")
|
|
681
|
+
.value("application/json"))
|
|
682
|
+
.auth(And(Single("bearerAuth"), Single("thirdpartytoken"))),
|
|
683
|
+
).response(
|
|
684
|
+
ResponseHandler()
|
|
685
|
+
.deserializer(APIHelper.json_deserialize)
|
|
686
|
+
.deserialize_into(CommandResponse.from_dictionary)
|
|
687
|
+
.is_api_response(True),
|
|
688
|
+
).execute()
|
|
689
|
+
|
|
690
|
+
def erase_user_data(self,
|
|
691
|
+
vehicle_tag):
|
|
692
|
+
"""Perform a POST request to
|
|
693
|
+
/api/1/vehicles/{vehicle_tag}/command/erase_user_data.
|
|
694
|
+
|
|
695
|
+
Erases user data from the vehicle UI. Requires Guest Mode.
|
|
696
|
+
|
|
697
|
+
Args:
|
|
698
|
+
vehicle_tag (str): The request template parameter.
|
|
699
|
+
|
|
700
|
+
Returns:
|
|
701
|
+
ApiResponse: An object with the response value as well as other useful
|
|
702
|
+
information such as status codes and headers. Vehicle command response
|
|
703
|
+
|
|
704
|
+
Raises:
|
|
705
|
+
ApiException: When an error occurs while fetching the data from the
|
|
706
|
+
remote API. This exception includes the HTTP Response code, an error
|
|
707
|
+
message, and the HTTP body that was received in the request.
|
|
708
|
+
|
|
709
|
+
"""
|
|
710
|
+
return super().new_api_call_builder.request(
|
|
711
|
+
RequestBuilder().server(Server.DEFAULT)
|
|
712
|
+
.path("/api/1/vehicles/{vehicle_tag}/command/erase_user_data")
|
|
713
|
+
.http_method(HttpMethodEnum.POST)
|
|
714
|
+
.template_param(Parameter()
|
|
715
|
+
.key("vehicle_tag")
|
|
716
|
+
.value(vehicle_tag)
|
|
717
|
+
.is_required(True)
|
|
718
|
+
.should_encode(True))
|
|
719
|
+
.header_param(Parameter()
|
|
720
|
+
.key("accept")
|
|
721
|
+
.value("application/json"))
|
|
722
|
+
.auth(And(Single("bearerAuth"), Single("thirdpartytoken"))),
|
|
723
|
+
).response(
|
|
724
|
+
ResponseHandler()
|
|
725
|
+
.deserializer(APIHelper.json_deserialize)
|
|
726
|
+
.deserialize_into(CommandResponse.from_dictionary)
|
|
727
|
+
.is_api_response(True),
|
|
728
|
+
).execute()
|
|
729
|
+
|
|
730
|
+
def flash_lights(self,
|
|
731
|
+
vehicle_tag):
|
|
732
|
+
"""Perform a POST request to
|
|
733
|
+
/api/1/vehicles/{vehicle_tag}/command/flash_lights.
|
|
734
|
+
|
|
735
|
+
Briefly flashes vehicle headlights.
|
|
736
|
+
|
|
737
|
+
Args:
|
|
738
|
+
vehicle_tag (str): The request template parameter.
|
|
739
|
+
|
|
740
|
+
Returns:
|
|
741
|
+
ApiResponse: An object with the response value as well as other useful
|
|
742
|
+
information such as status codes and headers. Vehicle command response
|
|
743
|
+
|
|
744
|
+
Raises:
|
|
745
|
+
ApiException: When an error occurs while fetching the data from the
|
|
746
|
+
remote API. This exception includes the HTTP Response code, an error
|
|
747
|
+
message, and the HTTP body that was received in the request.
|
|
748
|
+
|
|
749
|
+
"""
|
|
750
|
+
return super().new_api_call_builder.request(
|
|
751
|
+
RequestBuilder().server(Server.DEFAULT)
|
|
752
|
+
.path("/api/1/vehicles/{vehicle_tag}/command/flash_lights")
|
|
753
|
+
.http_method(HttpMethodEnum.POST)
|
|
754
|
+
.template_param(Parameter()
|
|
755
|
+
.key("vehicle_tag")
|
|
756
|
+
.value(vehicle_tag)
|
|
757
|
+
.is_required(True)
|
|
758
|
+
.should_encode(True))
|
|
759
|
+
.header_param(Parameter()
|
|
760
|
+
.key("accept")
|
|
761
|
+
.value("application/json"))
|
|
762
|
+
.auth(And(Single("bearerAuth"), Single("thirdpartytoken"))),
|
|
763
|
+
).response(
|
|
764
|
+
ResponseHandler()
|
|
765
|
+
.deserializer(APIHelper.json_deserialize)
|
|
766
|
+
.deserialize_into(CommandResponse.from_dictionary)
|
|
767
|
+
.is_api_response(True),
|
|
768
|
+
).execute()
|
|
769
|
+
|
|
770
|
+
def enable_or_disable_guest_mode(self,
|
|
771
|
+
vehicle_tag,
|
|
772
|
+
body):
|
|
773
|
+
"""Perform a POST request to
|
|
774
|
+
/api/1/vehicles/{vehicle_tag}/command/guest_mode.
|
|
775
|
+
|
|
776
|
+
Args:
|
|
777
|
+
vehicle_tag (str): The request template parameter.
|
|
778
|
+
body (GuestModeRequest): The request body parameter.
|
|
779
|
+
|
|
780
|
+
Returns:
|
|
781
|
+
ApiResponse: An object with the response value as well as other useful
|
|
782
|
+
information such as status codes and headers. Vehicle command response
|
|
783
|
+
|
|
784
|
+
Raises:
|
|
785
|
+
ApiException: When an error occurs while fetching the data from the
|
|
786
|
+
remote API. This exception includes the HTTP Response code, an error
|
|
787
|
+
message, and the HTTP body that was received in the request.
|
|
788
|
+
|
|
789
|
+
"""
|
|
790
|
+
return super().new_api_call_builder.request(
|
|
791
|
+
RequestBuilder().server(Server.DEFAULT)
|
|
792
|
+
.path("/api/1/vehicles/{vehicle_tag}/command/guest_mode")
|
|
793
|
+
.http_method(HttpMethodEnum.POST)
|
|
794
|
+
.template_param(Parameter()
|
|
795
|
+
.key("vehicle_tag")
|
|
796
|
+
.value(vehicle_tag)
|
|
797
|
+
.is_required(True)
|
|
798
|
+
.should_encode(True))
|
|
799
|
+
.header_param(Parameter()
|
|
800
|
+
.key("Content-Type")
|
|
801
|
+
.value("application/json"))
|
|
802
|
+
.body_param(Parameter()
|
|
803
|
+
.value(body)
|
|
804
|
+
.is_required(True))
|
|
805
|
+
.header_param(Parameter()
|
|
806
|
+
.key("accept")
|
|
807
|
+
.value("application/json"))
|
|
808
|
+
.body_serializer(APIHelper.json_serialize)
|
|
809
|
+
.auth(And(Single("bearerAuth"), Single("thirdpartytoken"))),
|
|
810
|
+
).response(
|
|
811
|
+
ResponseHandler()
|
|
812
|
+
.deserializer(APIHelper.json_deserialize)
|
|
813
|
+
.deserialize_into(CommandResponse.from_dictionary)
|
|
814
|
+
.is_api_response(True),
|
|
815
|
+
).execute()
|
|
816
|
+
|
|
817
|
+
def honk_horn(self,
|
|
818
|
+
vehicle_tag):
|
|
819
|
+
"""Perform a POST request to
|
|
820
|
+
/api/1/vehicles/{vehicle_tag}/command/honk_horn.
|
|
821
|
+
|
|
822
|
+
Args:
|
|
823
|
+
vehicle_tag (str): The request template parameter.
|
|
824
|
+
|
|
825
|
+
Returns:
|
|
826
|
+
ApiResponse: An object with the response value as well as other useful
|
|
827
|
+
information such as status codes and headers. Vehicle command response
|
|
828
|
+
|
|
829
|
+
Raises:
|
|
830
|
+
ApiException: When an error occurs while fetching the data from the
|
|
831
|
+
remote API. This exception includes the HTTP Response code, an error
|
|
832
|
+
message, and the HTTP body that was received in the request.
|
|
833
|
+
|
|
834
|
+
"""
|
|
835
|
+
return super().new_api_call_builder.request(
|
|
836
|
+
RequestBuilder().server(Server.DEFAULT)
|
|
837
|
+
.path("/api/1/vehicles/{vehicle_tag}/command/honk_horn")
|
|
838
|
+
.http_method(HttpMethodEnum.POST)
|
|
839
|
+
.template_param(Parameter()
|
|
840
|
+
.key("vehicle_tag")
|
|
841
|
+
.value(vehicle_tag)
|
|
842
|
+
.is_required(True)
|
|
843
|
+
.should_encode(True))
|
|
844
|
+
.header_param(Parameter()
|
|
845
|
+
.key("accept")
|
|
846
|
+
.value("application/json"))
|
|
847
|
+
.auth(And(Single("bearerAuth"), Single("thirdpartytoken"))),
|
|
848
|
+
).response(
|
|
849
|
+
ResponseHandler()
|
|
850
|
+
.deserializer(APIHelper.json_deserialize)
|
|
851
|
+
.deserialize_into(CommandResponse.from_dictionary)
|
|
852
|
+
.is_api_response(True),
|
|
853
|
+
).execute()
|
|
854
|
+
|
|
855
|
+
def next_favorite_media_track(self,
|
|
856
|
+
vehicle_tag):
|
|
857
|
+
"""Perform a POST request to
|
|
858
|
+
/api/1/vehicles/{vehicle_tag}/command/media_next_fav.
|
|
859
|
+
|
|
860
|
+
Args:
|
|
861
|
+
vehicle_tag (str): The request template parameter.
|
|
862
|
+
|
|
863
|
+
Returns:
|
|
864
|
+
ApiResponse: An object with the response value as well as other useful
|
|
865
|
+
information such as status codes and headers. Vehicle command response
|
|
866
|
+
|
|
867
|
+
Raises:
|
|
868
|
+
ApiException: When an error occurs while fetching the data from the
|
|
869
|
+
remote API. This exception includes the HTTP Response code, an error
|
|
870
|
+
message, and the HTTP body that was received in the request.
|
|
871
|
+
|
|
872
|
+
"""
|
|
873
|
+
return super().new_api_call_builder.request(
|
|
874
|
+
RequestBuilder().server(Server.DEFAULT)
|
|
875
|
+
.path("/api/1/vehicles/{vehicle_tag}/command/media_next_fav")
|
|
876
|
+
.http_method(HttpMethodEnum.POST)
|
|
877
|
+
.template_param(Parameter()
|
|
878
|
+
.key("vehicle_tag")
|
|
879
|
+
.value(vehicle_tag)
|
|
880
|
+
.is_required(True)
|
|
881
|
+
.should_encode(True))
|
|
882
|
+
.header_param(Parameter()
|
|
883
|
+
.key("accept")
|
|
884
|
+
.value("application/json"))
|
|
885
|
+
.auth(And(Single("bearerAuth"), Single("thirdpartytoken"))),
|
|
886
|
+
).response(
|
|
887
|
+
ResponseHandler()
|
|
888
|
+
.deserializer(APIHelper.json_deserialize)
|
|
889
|
+
.deserialize_into(CommandResponse.from_dictionary)
|
|
890
|
+
.is_api_response(True),
|
|
891
|
+
).execute()
|