Documentation
¶
Index ¶
- Constants
- Variables
- type API
- type Engine
- type Mileage
- type Position
- type Provider
- func (v *Provider) ChargeEnable(enable bool) error
- func (v *Provider) Climater() (bool, error)
- func (v *Provider) FinishTime() (time.Time, error)
- func (v *Provider) GetLimitSoc() (int64, error)
- func (v *Provider) Odometer() (float64, error)
- func (v *Provider) Position() (float64, float64, error)
- func (v *Provider) Range() (int64, error)
- func (v *Provider) Soc() (float64, error)
- func (v *Provider) Status() (api.ChargeStatus, 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" )
View Source
const FuelTypeElectric = "electric"
Variables ¶
View Source
var OAuth2Config = &oauth2.Config{ ClientID: "3c756d46-f1ba-4d78-9f9a-cff0d5292d51@apps_vw-dilab_com", ClientSecret: "eb8814e641c81a2640ad62eeccec11c98effc9bccd4269ab7af338b50a94b3a2", RedirectURL: "cupra://oauth-callback", Scopes: []string{"openid", "profile", "mbb"}, }
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
func (*API) ParkingPosition ¶
ParkingPosition implements the /parkingposition response
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) 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 Status ¶
type Status struct { Engines struct { Primary, Secondary Engine } Services struct { Charging struct { Status string TargetPct int ChargeMode string Active bool RemainingTime int64 CurrentPct float64 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.