From 71b8e0e69cd186ed09c76081707c8c1f6ef2fd1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Nunes?= Date: Fri, 8 Mar 2024 01:51:38 +0200 Subject: [PATCH] Add all scopes --- Sources/TeslaSwift/TeslaSwift.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Sources/TeslaSwift/TeslaSwift.swift b/Sources/TeslaSwift/TeslaSwift.swift index 92bdd28..f1142a5 100644 --- a/Sources/TeslaSwift/TeslaSwift.swift +++ b/Sources/TeslaSwift/TeslaSwift.swift @@ -39,10 +39,12 @@ public enum TeslaAPI { case vehicleChargingCmds = "vehicle_charging_cmds" case energyDeviceData = "energy_device_data" case energyCmds = "energy_cmds" + + public static var all: [Scope] = [.openId, .offlineAccess, .userData, .vehicleDeviceData, .vehicleCmds, .vehicleChargingCmds, .energyDeviceData, .energyCmds] } case ownerAPI - case fleetAPI(region: Region, clientID: String, clientSecret: String, redirectURI: String, scopes: [Scope]) + case fleetAPI(region: Region, clientID: String, clientSecret: String, redirectURI: String, scopes: [Scope] = Scope.all) var url: String { switch self {