myvsb-developer-api 0.1.2__tar.gz → 0.1.3__tar.gz

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 (26) hide show
  1. {myvsb_developer_api-0.1.2/src/myvsb_developer_api.egg-info → myvsb_developer_api-0.1.3}/PKG-INFO +1 -1
  2. {myvsb_developer_api-0.1.2 → myvsb_developer_api-0.1.3}/pyproject.toml +1 -1
  3. {myvsb_developer_api-0.1.2 → myvsb_developer_api-0.1.3}/src/myskoda_openapi/api_layer/open_api_client.py +38 -3
  4. {myvsb_developer_api-0.1.2 → myvsb_developer_api-0.1.3}/src/myskoda_openapi/api_layer/rest_api.py +7 -7
  5. {myvsb_developer_api-0.1.2 → myvsb_developer_api-0.1.3/src/myvsb_developer_api.egg-info}/PKG-INFO +1 -1
  6. {myvsb_developer_api-0.1.2 → myvsb_developer_api-0.1.3}/LICENSE +0 -0
  7. {myvsb_developer_api-0.1.2 → myvsb_developer_api-0.1.3}/README.md +0 -0
  8. {myvsb_developer_api-0.1.2 → myvsb_developer_api-0.1.3}/setup.cfg +0 -0
  9. {myvsb_developer_api-0.1.2 → myvsb_developer_api-0.1.3}/src/myskoda_openapi/api_layer/const.py +0 -0
  10. {myvsb_developer_api-0.1.2 → myvsb_developer_api-0.1.3}/src/myskoda_openapi/api_layer/exceptions.py +0 -0
  11. {myvsb_developer_api-0.1.2 → myvsb_developer_api-0.1.3}/src/myskoda_openapi/api_layer/utils.py +0 -0
  12. {myvsb_developer_api-0.1.2 → myvsb_developer_api-0.1.3}/src/myskoda_openapi/models/active_ventilation.py +0 -0
  13. {myvsb_developer_api-0.1.2 → myvsb_developer_api-0.1.3}/src/myskoda_openapi/models/air_conditioning.py +0 -0
  14. {myvsb_developer_api-0.1.2 → myvsb_developer_api-0.1.3}/src/myskoda_openapi/models/auxiliary_heating.py +0 -0
  15. {myvsb_developer_api-0.1.2 → myvsb_developer_api-0.1.3}/src/myskoda_openapi/models/base_model.py +0 -0
  16. {myvsb_developer_api-0.1.2 → myvsb_developer_api-0.1.3}/src/myskoda_openapi/models/charging.py +0 -0
  17. {myvsb_developer_api-0.1.2 → myvsb_developer_api-0.1.3}/src/myskoda_openapi/models/common.py +0 -0
  18. {myvsb_developer_api-0.1.2 → myvsb_developer_api-0.1.3}/src/myskoda_openapi/models/driving_range.py +0 -0
  19. {myvsb_developer_api-0.1.2 → myvsb_developer_api-0.1.3}/src/myskoda_openapi/models/enums.py +0 -0
  20. {myvsb_developer_api-0.1.2 → myvsb_developer_api-0.1.3}/src/myskoda_openapi/models/parking_position.py +0 -0
  21. {myvsb_developer_api-0.1.2 → myvsb_developer_api-0.1.3}/src/myskoda_openapi/models/vehicle.py +0 -0
  22. {myvsb_developer_api-0.1.2 → myvsb_developer_api-0.1.3}/src/myskoda_openapi/models/vehicle_status.py +0 -0
  23. {myvsb_developer_api-0.1.2 → myvsb_developer_api-0.1.3}/src/myvsb_developer_api.egg-info/SOURCES.txt +0 -0
  24. {myvsb_developer_api-0.1.2 → myvsb_developer_api-0.1.3}/src/myvsb_developer_api.egg-info/dependency_links.txt +0 -0
  25. {myvsb_developer_api-0.1.2 → myvsb_developer_api-0.1.3}/src/myvsb_developer_api.egg-info/requires.txt +0 -0
  26. {myvsb_developer_api-0.1.2 → myvsb_developer_api-0.1.3}/src/myvsb_developer_api.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: myvsb-developer-api
3
- Version: 0.1.2
3
+ Version: 0.1.3
4
4
  Summary: Asynchronous Python library for the MyVSB Developer API
5
5
  Author-email: net0045 <stepan.netolicky@vsb.cz>
6
6
  Project-URL: Homepage, https://github.com/mobility-lab-vsb/myvsb-developer-api
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "myvsb-developer-api"
7
- version = "0.1.2"
7
+ version = "0.1.3"
8
8
  authors = [
9
9
  { name="net0045", email="stepan.netolicky@vsb.cz" },
10
10
  ]
@@ -2,8 +2,13 @@ import logging
2
2
  from typing import Any, Optional, List
3
3
  from aiohttp import ClientSession
4
4
  from .rest_api import SkodaRestAPI
5
- from models.vehicle import VehicleResponse
5
+ from models.vehicle import VehicleResponse, Odometer
6
6
  from models.vehicle_status import VehicleStatus
7
+ from models.active_ventilation import ActiveVentilation
8
+ from models.air_conditioning import AirConditioning
9
+ from models.parking_position import ParkingPosition
10
+ from models.auxiliary_heating import AuxiliaryHeating
11
+ from models.charging import Charging
7
12
 
8
13
  class OpenAPIClient:
9
14
  """Client for interacting with rest API and used in HomeAssistant."""
@@ -16,9 +21,39 @@ class OpenAPIClient:
16
21
  endpoint_result = await self.rest_api.get_vehicle(vin, include=include)
17
22
  return endpoint_result.result
18
23
 
19
- async def get_vehicle_status(self, vin: str, include: Optional[List[str]] = None) -> VehicleStatus:
24
+ async def get_vehicle_status(self, vin: str) -> VehicleStatus:
20
25
  """Get the actual vehicle status and return the parsed Pydantic model."""
21
- endpoint_result = await self.rest_api.get_vehicle_status(vin, include=include)
26
+ endpoint_result = await self.rest_api.get_vehicle_status(vin)
27
+ return endpoint_result.result
28
+
29
+ async def get_air_conditioning(self, vin: str) -> AirConditioning:
30
+ """Get the actual vehicle status and return the parsed Pydantic model."""
31
+ endpoint_result = await self.rest_api.get_air_conditioning(vin)
32
+ return endpoint_result.result
33
+
34
+ async def get_parking_positions(self, vin: str) -> ParkingPosition:
35
+ """Get the actual vehicle status and return the parsed Pydantic model."""
36
+ endpoint_result = await self.rest_api.get_parking_positions(vin)
37
+ return endpoint_result.result
38
+
39
+ async def get_auxiliary_heating(self, vin: str) -> AuxiliaryHeating:
40
+ """Get the actual vehicle status and return the parsed Pydantic model."""
41
+ endpoint_result = await self.rest_api.get_auxiliary_heating(vin)
42
+ return endpoint_result.result
43
+
44
+ async def get_odometer(self, vin: str) -> Odometer:
45
+ """Get the actual vehicle status and return the parsed Pydantic model."""
46
+ endpoint_result = await self.rest_api.get_odometer(vin)
47
+ return endpoint_result.result
48
+
49
+ async def get_charging(self, vin: str) -> Charging:
50
+ """Get the actual vehicle status and return the parsed Pydantic model."""
51
+ endpoint_result = await self.rest_api.get_charging(vin)
52
+ return endpoint_result.result
53
+
54
+ async def get_active_ventilation(self, vin: str) -> ActiveVentilation:
55
+ """Get the actual vehicle status and return the parsed Pydantic model."""
56
+ endpoint_result = await self.rest_api.get_active_ventilation(vin)
22
57
  return endpoint_result.result
23
58
 
24
59
  async def start_air_conditioning(self, vin: str, temperature: float) -> None:
@@ -110,7 +110,7 @@ class SkodaRestAPI:
110
110
  # Pack and retunr the result in GetEndpointResult
111
111
  return GetEndpointResult(url=url, raw_json=raw_json, result=full_response)
112
112
 
113
- async def get_vehicle_status(self, vin: str, include: Optional[List[str]] = None) -> GetEndpointResult[Optional[VehicleStatus]]:
113
+ async def get_vehicle_status(self, vin: str) -> GetEndpointResult[Optional[VehicleStatus]]:
114
114
  """Retrieve ONLY the vehicle status by filtering via the 'include' parameter."""
115
115
  url = f"/api/v1/vehicles/{vin}"
116
116
  # Set the 'include' parameter to 'status' to retrieve only the vehicle status
@@ -123,7 +123,7 @@ class SkodaRestAPI:
123
123
 
124
124
  return GetEndpointResult(url=url, raw_json=raw_json, result=status_model)
125
125
 
126
- async def get_air_conditioning(self, vin: str, include: Optional[List[str]] = None) -> GetEndpointResult[Optional[AirConditioning]]:
126
+ async def get_air_conditioning(self, vin: str) -> GetEndpointResult[Optional[AirConditioning]]:
127
127
  """Retrieve ONLY the vehicles air conditioning object by filtering via the 'include' parameter."""
128
128
  url = f"/api/v1/vehicles/{vin}"
129
129
  params = {"include": "airConditioning"}
@@ -135,7 +135,7 @@ class SkodaRestAPI:
135
135
 
136
136
  return GetEndpointResult(url=url, raw_json=raw_json, result=status_model)
137
137
 
138
- async def get_parking_positions(self, vin: str, include: Optional[List[str]] = None) -> GetEndpointResult[Optional[ParkingPosition]]:
138
+ async def get_parking_positions(self, vin: str) -> GetEndpointResult[Optional[ParkingPosition]]:
139
139
  """Retrieve ONLY the vehicle parking positions object by filtering via the 'include' parameter."""
140
140
  url = f"/api/v1/vehicles/{vin}"
141
141
  params = {"include": "parkingPosition"}
@@ -147,7 +147,7 @@ class SkodaRestAPI:
147
147
 
148
148
  return GetEndpointResult(url=url, raw_json=raw_json, result=status_model)
149
149
 
150
- async def get_auxiliary_heating(self, vin: str, include: Optional[List[str]] = None) -> GetEndpointResult[Optional[AuxiliaryHeating]]:
150
+ async def get_auxiliary_heating(self, vin: str) -> GetEndpointResult[Optional[AuxiliaryHeating]]:
151
151
  """Retrieve ONLY the vehicle auxiliary heating by filtering via the 'include' parameter."""
152
152
  url = f"/api/v1/vehicles/{vin}"
153
153
  params = {"include": "auxiliaryHeating"}
@@ -159,7 +159,7 @@ class SkodaRestAPI:
159
159
 
160
160
  return GetEndpointResult(url=url, raw_json=raw_json, result=status_model)
161
161
 
162
- async def get_odometer(self, vin: str, include: Optional[List[str]] = None) -> GetEndpointResult[Optional[Odometer]]:
162
+ async def get_odometer(self, vin: str) -> GetEndpointResult[Optional[Odometer]]:
163
163
  """Retrieve ONLY the vehicle odometer object by filtering via the 'include' parameter."""
164
164
  url = f"/api/v1/vehicles/{vin}"
165
165
  params = {"include": "odometer"}
@@ -171,7 +171,7 @@ class SkodaRestAPI:
171
171
 
172
172
  return GetEndpointResult(url=url, raw_json=raw_json, result=status_model)
173
173
 
174
- async def get_charging(self, vin: str, include: Optional[List[str]] = None) -> GetEndpointResult[Optional[Charging]]:
174
+ async def get_charging(self, vin: str) -> GetEndpointResult[Optional[Charging]]:
175
175
  """Retrieve ONLY the vehicle charging object by filtering via the 'include' parameter."""
176
176
  url = f"/api/v1/vehicles/{vin}"
177
177
  params = {"include": "charging"}
@@ -183,7 +183,7 @@ class SkodaRestAPI:
183
183
 
184
184
  return GetEndpointResult(url=url, raw_json=raw_json, result=status_model)
185
185
 
186
- async def get_active_ventilation(self, vin: str, include: Optional[List[str]] = None) -> GetEndpointResult[Optional[ActiveVentilation]]:
186
+ async def get_active_ventilation(self, vin: str) -> GetEndpointResult[Optional[ActiveVentilation]]:
187
187
  """Retrieve ONLY the vehicle active ventilation object by filtering via the 'include' parameter."""
188
188
  url = f"/api/v1/vehicles/{vin}"
189
189
  params = {"include": "activeVentilation"}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: myvsb-developer-api
3
- Version: 0.1.2
3
+ Version: 0.1.3
4
4
  Summary: Asynchronous Python library for the MyVSB Developer API
5
5
  Author-email: net0045 <stepan.netolicky@vsb.cz>
6
6
  Project-URL: Homepage, https://github.com/mobility-lab-vsb/myvsb-developer-api