Documentation ¶
Index ¶
- Constants
- Variables
- type API
- type Engine
- type Provider
- func (v *Provider) Climater() (bool, error)
- func (v *Provider) FinishTime() (time.Time, error)
- func (v *Provider) Odometer() (float64, error)
- func (v *Provider) Range() (int64, error)
- func (v *Provider) Soc() (float64, error)
- func (v *Provider) StartCharge() error
- func (v *Provider) Status() (api.ChargeStatus, error)
- func (v *Provider) StopCharge() error
- func (v *Provider) TargetSoc() (float64, error)
- type Status
- type Vehicle
Constants ¶
View Source
const ( // BaseURL is the API base url BaseURL = "https://ola.prod.code.seat.cloud.vwgroup.com" ActionCharge = "charging" ActionChargeStart = "start" ActionChargeStop = "stop" )
Variables ¶
View Source
var AuthParams = url.Values{
"response_type": {"code id_token"},
"client_id": {"30e33736-c537-4c72-ab60-74a7b92cfe83@apps_vw-dilab_com"},
"redirect_uri": {"cupraconnect://identity-kit/login"},
"scope": {"openid profile mbb"},
}
Authorization parameters
View Source
var TRSParams = url.Values{
"brand": {"cupra"},
}
TokenRefreshService parameters
Functions ¶
This section is empty.
Types ¶
type API ¶
API is an api.Vehicle implementation for Seat Cupra cars
func NewAPI ¶
func NewAPI(log *util.Logger, ts oauth2.TokenSource) *API
NewAPI creates a new vehicle
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider is an api.Vehicle implementation for Seat Cupra cars
func NewProvider ¶
NewProvider creates a vehicle api provider
func (*Provider) FinishTime ¶
FinishTime implements the api.VehicleFinishTimer interface
func (*Provider) StartCharge ¶
StartCharge implements the api.VehicleChargeController interface
func (*Provider) Status ¶
func (v *Provider) Status() (api.ChargeStatus, error)
Status implements the api.ChargeState interface
func (*Provider) StopCharge ¶
StopCharge implements the api.VehicleChargeController interface
type Status ¶
type Status struct { Engines struct { Primary, Secondary Engine } Services struct { Charging struct { Status string TargetPct int ChargeMode string Active bool RemainingTime int64 ProgressBarPct float64 } Climatisation struct { Status string Active bool RemainingTime int64 ProgressBarPct float64 } } Measurements struct { MileageKm float64 } }
Click to show internal directories.
Click to hide internal directories.