33 lines
778 B
Go
33 lines
778 B
Go
package polestar
|
|
|
|
import "time"
|
|
|
|
type Token struct {
|
|
AccessToken string `graphql:"access_token"`
|
|
RefreshToken string `graphql:"refresh_token"`
|
|
ExpiresIn int `graphql:"expires_in"`
|
|
}
|
|
|
|
type ConsumerCar struct {
|
|
VIN string
|
|
InternalVehicleIdentifier string
|
|
}
|
|
|
|
type BatteryData struct {
|
|
BatteryChargeLevelPercentage float64
|
|
ChargerConnectionStatus string
|
|
ChargingStatus string
|
|
EstimatedChargingTimeToFullMinutes int
|
|
EstimatedDistanceToEmptyKm int
|
|
EventUpdatedTimestamp EventUpdatedTimestamp
|
|
}
|
|
|
|
type OdometerData struct {
|
|
OdometerMeters float64
|
|
EventUpdatedTimestamp EventUpdatedTimestamp
|
|
}
|
|
|
|
type EventUpdatedTimestamp struct {
|
|
ISO time.Time
|
|
// Unix int64 `json:",string"`
|
|
}
|