Documentation ¶
Index ¶
- Constants
- Variables
- type API
- func (v *API) Action(vin, action, value string) error
- func (v *API) Charger(vin string) (ChargerResponse, error)
- func (v *API) Climater(vin string) (ClimaterResponse, error)
- func (v *API) Settings(vin string) (SettingsResponse, error)
- func (v *API) Status(vin string) (StatusResponse, error)
- func (v *API) VehicleDetails(vin string) (Vehicle, error)
- func (v *API) Vehicles() ([]Vehicle, error)
- func (v *API) WakeUp(vin string) error
- type ChargerResponse
- type ClimaterResponse
- type Provider
- func (v *Provider) ChargeEnable(enable bool) error
- func (v *Provider) FinishTime() (time.Time, error)
- func (v *Provider) GetLimitSoc() (int64, error)
- func (v *Provider) Odometer() (odo float64, err error)
- func (v *Provider) Range() (rng int64, err error)
- func (v *Provider) Soc() (float64, error)
- func (v *Provider) Status() (api.ChargeStatus, error)
- func (v *Provider) WakeUp() error
- type SettingsResponse
- type Specification
- type StatusResponse
- type Vehicle
- type VehiclesResponse
Constants ¶
const ( ActionCharge = "charging" ActionChargeStart = "start" ActionChargeStop = "stop" )
const ( Brand = "VW" Country = "CZ" // Authorization ClientID AuthClientID = "afb0473b-6d82-42b8-bfea-cead338c46ef" )
const BaseURI = "https://mysmob.api.connect.skoda-auto.cz/api"
Variables ¶
var AuthParams = url.Values{
"response_type": {"code id_token"},
"client_id": {"7f045eee-7003-4379-9968-9355ed2adb06@apps_vw-dilab_com"},
"redirect_uri": {"myskoda://redirect/login/"},
"scope": {"address badge birthdate cars driversLicense dealers email mileage mbb nationalIdentifier openid phone profession profile vin"},
}
Skoda native api
var TRSParams = url.Values{
"brand": {"skoda"},
}
TokenRefreshService parameters
Functions ¶
This section is empty.
Types ¶
type API ¶
API is the Skoda api client
func NewAPI ¶
func NewAPI(log *util.Logger, ts oauth2.TokenSource) *API
NewAPI creates a new api client
func (*API) Charger ¶
func (v *API) Charger(vin string) (ChargerResponse, error)
Charger implements the /v1/charging/<vin> response
func (*API) Climater ¶
func (v *API) Climater(vin string) (ClimaterResponse, error)
Climater implements the /v2/air-conditioning/<vin> response
func (*API) Settings ¶
func (v *API) Settings(vin string) (SettingsResponse, error)
Settings implements the /v1/charging/<vin>/settings response
func (*API) Status ¶
func (v *API) Status(vin string) (StatusResponse, error)
Status implements the /v2/vehicle-status/<vin> response
type ChargerResponse ¶
type ChargerResponse struct { IsVehicleInSaveLocation bool Status struct { ChargingRateInKilometersPerHour float64 ChargePowerInKw float64 RemainingTimeToFullyChargedInMinutes int64 State string ChargeType string Battery struct { RemainingCruisingRangeInMeters int64 StateOfChargeInPercent int } } Settings SettingsResponse }
ChargerResponse is the /v2/charging/<vin> api
type ClimaterResponse ¶
type ClimaterResponse struct { State string `json:"state"` ChargerConnectionState string `json:"chargerConnectionState"` ChargerLockState string `json:"chargerLockState"` }
ChargerResponse is the /v2/air-conditioning/<vin> api
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider implements the vehicle api
func NewProvider ¶
NewProvider creates a vehicle api provider
func (*Provider) ChargeEnable ¶
ChargeEnable implements the api.ChargeController interface
func (*Provider) FinishTime ¶
FinishTime implements the api.VehicleFinishTimer interface
func (*Provider) GetLimitSoc ¶
GetLimitSoc implements the api.SocLimiter interface
type SettingsResponse ¶
type SettingsResponse struct { AutoUnlockPlugWhenCharged string `json:"autoUnlockPlugWhenCharged"` MaxChargeCurrentAc string `json:"maxChargeCurrentAc"` TargetStateOfChargeInPercent int `json:"targetStateOfChargeInPercent"` }
SettingsResponse is the /v1/charging/<vin>/settings api
type Specification ¶
type Specification struct { Title string Model string ModelYear string Body string SystemCode string SystemModelId string Engine struct { Typ string `json:"type"` PowerInKW int } Battery struct { CapacityInKWh int } Gearbox struct { Typ string `json:"type"` } TrimLevel string ManufacturingDate string MaxChargingPowerInKW int }
type StatusResponse ¶
type StatusResponse struct {
MileageInKm float64
}
StatusResponse is the /v2/vehicle-status/<vin> api
type Vehicle ¶
type Vehicle struct {
ID, VIN string
Name string // user-given name
LastUpdatedAt string
Specification Specification
}
type VehiclesResponse ¶
type VehiclesResponse struct {
Vehicles []Vehicle
}
VehiclesResponse is the /v3/garage api