Documentation ¶
Index ¶
- Constants
- type API
- type Duration
- type Energy
- type Identity
- type Provider
- func (v *Provider) Climater() (bool, error)
- func (v *Provider) FinishTime() (time.Time, 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 = "https://api.groupe-psa.com/connectedcar/v4"
BaseURL is the API base url
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
API is an api.Vehicle implementation for PSA cars
type Duration ¶
Duration is a time.Duration that can be unmarshalled from JSON
func (*Duration) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler
type Energy ¶
type Energy struct { UpdatedAt time.Time Type string // Fuel/Electric Level int Autonomy int Charging struct { Plugged bool Status string // InProgress RemainingTime Duration ChargingRate int ChargingMode string // "Slow" NextDelayedTime Duration } }
Energy is the /status partial energy response
type Identity ¶
type Identity struct { *request.Helper oauth2.TokenSource // contains filtered or unexported fields }
func NewIdentity ¶
NewIdentity creates PSA identity
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider is an api.Vehicle implementation for PSA cars
func NewProvider ¶
NewProvider creates a vehicle api provider
func (*Provider) FinishTime ¶
FinishTime implements the api.VehicleFinishTimer interface
type Status ¶
type Status struct { Battery struct { Capacity int64 Health struct { Capacity int64 Resistance int64 } } Charging struct { ChargingMode string ChargingRate int64 NextDelayedTime string Plugged bool RemainingTime string Status string } Preconditionning struct { AirConditioning struct { UpdatedAt time.Time Status string // Disabled } } Energy []Energy Odometer struct { Mileage float64 } LastPosition struct { Type string Geometry struct { Type string Coordinates []float64 } Properties struct { UpdatedAt time.Time Type string Heading int } } }
Status is the /status response
Click to show internal directories.
Click to hide internal directories.