Documentation ¶
Index ¶
Constants ¶
View Source
const (
ApiURL = "https://api.volvocars.com"
)
api constants
Variables ¶
View Source
var Oauth2Config = oauth2.Config{ Endpoint: oauth2.Endpoint{ AuthURL: "https://volvoid.eu.volvocars.com/as/authorization.oauth2", TokenURL: "https://volvoid.eu.volvocars.com/as/token.oauth2", }, Scopes: []string{ oidc.ScopeOpenID, "vehicle:attributes", "energy:recharge_status", "energy:battery_charge_level", "energy:electric_range", "energy:estimated_charging_time", "energy:charging_connection_status", "energy:charging_system_status", "conve:fuel_status", "conve:odometer_status", "conve:environment", }, }
Functions ¶
This section is empty.
Types ¶
type API ¶
API is the Volvo client
func (*API) RechargeStatus ¶
func (v *API) RechargeStatus(vin string) (RechargeStatus, error)
Range provides range status api response
type Identity ¶
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) FinishTime ¶
FinishTime implements the api.VehicleFinishTimer interface
type RechargeStatus ¶
type RechargeStatus struct { Status int OperationID string Data struct { BatteryChargeLevel struct { Value float64 `json:",string"` Unit string Timestamp time.Time } ElectricRange struct { Value int64 `json:",string"` Unit string Timestamp time.Time } EstimatedChargingTime struct { Value int64 `json:",string"` Unit string Timestamp time.Time } ChargingConnectionStatus struct { Value string Timestamp time.Time } ChargingSystemStatus struct { Value string Timestamp time.Time } } }
Click to show internal directories.
Click to hide internal directories.