Documentation ¶
Index ¶
- Constants
- func NewIdentity(log *util.Logger, id, secret string, token *oauth2.Token) oauth2.TokenSource
- func Oauth2Config(id, secret string) *oauth2.Config
- type API
- type InformationResponse
- type Provider
- type TimedValue
- type Timestamp
- type Vehicle
- type VehicleDetails
- type VehicleLocation
- type VehicleStatus
- type VehiclesResponse
Constants ¶
View Source
const ApiURI = "https://api.mps.ford.com/api/fordconnect"
View Source
const (
ApplicationID = "AFDC085B-377A-4351-B23E-5E1D35FB3700"
)
View Source
const StatusSuccess = "SUCCESS"
Variables ¶
This section is empty.
Functions ¶
func NewIdentity ¶
NewIdentity creates FordConnect token source
func Oauth2Config ¶
Types ¶
type API ¶
API is the Ford api client
type InformationResponse ¶
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
type TimedValue ¶
type Timestamp ¶
func (*Timestamp) UnmarshalJSON ¶
UnmarshalJSON decodes Ford timestamps into time.Time
type Vehicle ¶
type Vehicle struct { VehicleID string Make string ModelName string ModelYear string Color string NickName string LastUpdated string VehicleAuthorizationIndicator int ServiceCompatible bool EngineType string VehicleDetails VehicleDetails VehicleStatus VehicleStatus VehicleLocation VehicleLocation }
type VehicleDetails ¶
type VehicleDetails struct {
FuelLevel, BatteryChargeLevel TimedValue
Mileage, Odometer float64
}
type VehicleLocation ¶
type VehicleStatus ¶
type VehicleStatus struct { ChargingStatus struct { Value string // "NotReady", TimeStamp Timestamp // "05-24-2024 15:58:56", ChargeStartTime Timestamp // "01-01-2010 00:00:00", ChargeEndTime Timestamp // "05-24-2024 15:33:00" } PlugStatus struct { Value bool // false, TimeStamp Timestamp // "05-24-2024 15:58:56" } }
type VehiclesResponse ¶
type VehiclesResponse struct {
Vehicles []Vehicle
}
Click to show internal directories.
Click to hide internal directories.