Documentation ¶
Index ¶
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 // 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 Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider is an api.Vehicle implementation for PSA cars
func NewProvider ¶
NewProvider creates a new vehicle
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 }
Status is the /status response
Click to show internal directories.
Click to hide internal directories.