Skip to content

Commit

Permalink
Add all scopes
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasman committed Mar 7, 2024
1 parent 3f91ab6 commit 71b8e0e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Sources/TeslaSwift/TeslaSwift.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 71b8e0e

Please sign in to comment.