Skip to content

Commit b0fec35

Browse files
committed
Add scopes
1 parent 571d2a3 commit b0fec35

File tree

2 files changed

+43
-2
lines changed

2 files changed

+43
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ engine_warnings = await api.async_get_engine_warnings()
6868

6969
<a name="sponsor"></a>
7070

71-
## 🥤 Powered by snacks
71+
## 🚗 Powered by dreams
7272

73-
When I'm coding, I run on coffee, Coca-Cola*, and Lays* potato chips. If you'd like to show your appreciation for this project, consider making a small donation to help keep my stash stocked! (Note: I'm also happy to accept 1,000,000 USD — or EUR, I'm not picky. 😁)
73+
If you'd like to show your appreciation for this project, feel free to toss a coin to your dev. Donations help keep things running — and who knows, maybe one day they'll add up to a Volvo EX90 (hey, let me dream!). If you're feeling generous, you may donate one too — I'll even come pick it up! 😁
7474

7575
[![ko-fi sponsor][kofi-sponsor-shield]][kofi-sponsor]
7676
[![github sponsor][github-sponsor-shield]][github-sponsor]

src/volvocarsapi/scopes.py

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
"""Volvo Cars API scopes."""
2+
3+
from enum import StrEnum
4+
5+
class RestrictedScope(StrEnum):
6+
LOCK = "conve:lock"
7+
UNLOCK = "conve:unlock"
8+
ENGINE_START_STOP = "conve:engine_start_stop"
9+
HONK_FLASH = "conve:honk_flash"
10+
LOCATION = "location:read"
11+
12+
DEFAULT_SCOPES = [
13+
"openid",
14+
"conve:battery_charge_level",
15+
"conve:brake_status",
16+
"conve:climatization_start_stop",
17+
"conve:command_accessibility",
18+
"conve:commands",
19+
"conve:diagnostics_engine_status",
20+
"conve:diagnostics_workshop",
21+
"conve:doors_status",
22+
"conve:engine_status",
23+
"conve:fuel_status",
24+
"conve:lock_status",
25+
"conve:odometer_status",
26+
"conve:trip_statistics",
27+
"conve:tyre_status",
28+
"conve:vehicle_relation",
29+
"conve:warnings",
30+
"conve:windows_status",
31+
"energy:battery_charge_level",
32+
"energy:charging_connection_status",
33+
"energy:charging_current_limit",
34+
"energy:charging_system_status",
35+
"energy:electric_range",
36+
"energy:estimated_charging_time",
37+
"energy:recharge_status",
38+
"energy:target_battery_level",
39+
]
40+
41+
ALL_SCOPES = DEFAULT_SCOPES + [s.value for s in RestrictedScope]

0 commit comments

Comments
 (0)