tesla-fleet-api 0.5.15__py3-none-any.whl → 0.5.16__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_fleet_api/const.py +1 -1
- tesla_fleet_api/exceptions.py +31 -7
- {tesla_fleet_api-0.5.15.dist-info → tesla_fleet_api-0.5.16.dist-info}/METADATA +1 -1
- {tesla_fleet_api-0.5.15.dist-info → tesla_fleet_api-0.5.16.dist-info}/RECORD +7 -7
- {tesla_fleet_api-0.5.15.dist-info → tesla_fleet_api-0.5.16.dist-info}/LICENSE +0 -0
- {tesla_fleet_api-0.5.15.dist-info → tesla_fleet_api-0.5.16.dist-info}/WHEEL +0 -0
- {tesla_fleet_api-0.5.15.dist-info → tesla_fleet_api-0.5.16.dist-info}/top_level.txt +0 -0
tesla_fleet_api/const.py
CHANGED
tesla_fleet_api/exceptions.py
CHANGED
@@ -78,22 +78,44 @@ class MobileAccessDisabled(TeslaFleetError):
|
|
78
78
|
key = "mobile_access_disabled"
|
79
79
|
|
80
80
|
|
81
|
-
class MissingToken(TeslaFleetError):
|
82
|
-
"""
|
81
|
+
class MissingToken(TeslaFleetError):
|
82
|
+
"""Third party specific error when no access token is provided."""
|
83
83
|
|
84
84
|
message = "Missing access token."
|
85
85
|
status = 401
|
86
|
+
|
87
|
+
|
88
|
+
class MissingTeslemetryToken(MissingToken):
|
89
|
+
"""Teslemetry specific error when no access token is provided."""
|
90
|
+
|
86
91
|
key = "missing_token"
|
87
92
|
|
88
93
|
|
89
|
-
class
|
90
|
-
"""
|
94
|
+
class MissingTessieToken(MissingToken):
|
95
|
+
"""Tessie specific error when no access token is provided."""
|
96
|
+
|
97
|
+
key = "Access token is required"
|
98
|
+
|
91
99
|
|
92
|
-
|
100
|
+
class InvalidToken(TeslaFleetError):
|
101
|
+
"""Third party specific error for invalid access token."""
|
102
|
+
|
103
|
+
message = "Invalid access token."
|
93
104
|
status = 401
|
105
|
+
|
106
|
+
|
107
|
+
class InvalidTeslemetryToken(InvalidToken):
|
108
|
+
"""Teslemetry specific error for invalid access token."""
|
109
|
+
|
94
110
|
key = "invalid_token"
|
95
111
|
|
96
112
|
|
113
|
+
class InvalidTessieToken(InvalidToken):
|
114
|
+
"""Tessie specific error for invalid access token."""
|
115
|
+
|
116
|
+
key = "Invalid access token"
|
117
|
+
|
118
|
+
|
97
119
|
class OAuthExpired(TeslaFleetError):
|
98
120
|
"""The OAuth token has expired."""
|
99
121
|
|
@@ -301,8 +323,10 @@ async def raise_for_status(resp: aiohttp.ClientResponse) -> None:
|
|
301
323
|
OAuthExpired,
|
302
324
|
MobileAccessDisabled,
|
303
325
|
LoginRequired,
|
304
|
-
|
305
|
-
|
326
|
+
MissingTeslemetryToken,
|
327
|
+
MissingTessieToken,
|
328
|
+
InvalidTeslemetryToken,
|
329
|
+
InvalidTessieToken,
|
306
330
|
]:
|
307
331
|
if error == exception.key:
|
308
332
|
raise exception(data)
|
@@ -1,9 +1,9 @@
|
|
1
1
|
tesla_fleet_api/__init__.py,sha256=0MON9vh3AShIiX16FZ6NU3yZ7kyXFh5GxA0rY8CzVRM,584
|
2
2
|
tesla_fleet_api/charging.py,sha256=N_mc8axrXj3iduqLj_jCt4Vx86tHqe3xqQT4R1R7HvU,1689
|
3
|
-
tesla_fleet_api/const.py,sha256
|
3
|
+
tesla_fleet_api/const.py,sha256=-MYIW8BaV-B0w7dxx--sZyF7bZQslLsEtxZZ_vIYPy8,9278
|
4
4
|
tesla_fleet_api/energy.py,sha256=kE-HDupzhgatIsizJoer1MAALP-wH6jjjGliiRQN0Os,5285
|
5
5
|
tesla_fleet_api/energyspecific.py,sha256=kICxdeDoWR9JHlgjHvnmjJ1ErLOWJT8bCSESoXo9axU,3732
|
6
|
-
tesla_fleet_api/exceptions.py,sha256=
|
6
|
+
tesla_fleet_api/exceptions.py,sha256=3QUqIqA2wBqr-dpatDtmz8nOnqKN-pJ4gnIy6PMDQPs,10927
|
7
7
|
tesla_fleet_api/partner.py,sha256=1vIBUaxKLIfqcC0X6VXZN0dMAzj_CLNPUMjA6QVqZ1k,1223
|
8
8
|
tesla_fleet_api/teslafleetapi.py,sha256=KYtfkqthYxWuKpctLbyAcE32sN5yMpJaCsMSWM7bX2E,5199
|
9
9
|
tesla_fleet_api/teslafleetoauth.py,sha256=FfLnuqZMxF2HsZ5miLNtm3pRwKDoQKi2GD-oXgKxZgA,3594
|
@@ -12,8 +12,8 @@ tesla_fleet_api/tessie.py,sha256=Aso7pGcypG19Vgh8UBACJEdinbF5135e1aWdmrOxw7s,218
|
|
12
12
|
tesla_fleet_api/user.py,sha256=TZE2oh-n5zrhKXmGRuiNL9voKVODD7rBhGE_IObYVGA,1179
|
13
13
|
tesla_fleet_api/vehicle.py,sha256=qM0lD4JnZOrlqHCLnXEpTQoVGUTiWr--tdTB8wKJrfA,32871
|
14
14
|
tesla_fleet_api/vehiclespecific.py,sha256=Oaz5InhWwXuKgyoQSYWpLLsMPjZ2iF0bShlnDLxEk5k,21506
|
15
|
-
tesla_fleet_api-0.5.
|
16
|
-
tesla_fleet_api-0.5.
|
17
|
-
tesla_fleet_api-0.5.
|
18
|
-
tesla_fleet_api-0.5.
|
19
|
-
tesla_fleet_api-0.5.
|
15
|
+
tesla_fleet_api-0.5.16.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
16
|
+
tesla_fleet_api-0.5.16.dist-info/METADATA,sha256=Poyg10sjR6EfdB02U6m5fBWf6LrSzGBmHKv07JTir34,3962
|
17
|
+
tesla_fleet_api-0.5.16.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
18
|
+
tesla_fleet_api-0.5.16.dist-info/top_level.txt,sha256=jeNbog_1saXBFrGpom9WyPWmilxsyP3szL_G7JLWQfM,16
|
19
|
+
tesla_fleet_api-0.5.16.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|