Documentation ¶
Index ¶
- Constants
- Variables
- type API
- type Config
- type DrivingDistance
- type Identity
- type Odometer
- type Provider
- 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)
- func (v *Provider) TargetSoc() (float64, error)
- func (v *Provider) WakeUp() error
- type ReservChargeInfo
- type StatusLatestResponse
- type StatusResponse
- type TargetSoc
- type Vehicle
- type VehicleLocation
- type VehicleStatus
- type VehiclesResponse
Constants ¶
View Source
const ( VehiclesURL = "vehicles" StatusURL = "vehicles/%s/status" StatusLatestURL = "vehicles/%s/status/latest" )
View Source
const ( DeviceIdURL = "/api/v1/spa/notifications/register" IntegrationInfoURL = "/api/v1/user/integrationinfo" SilentSigninURL = "/api/v1/user/silentsignin" LanguageURL = "/api/v1/user/language" LoginURL = "/api/v1/user/signin" TokenURL = "/api/v1/user/oauth2/token" )
View Source
const ( KiaAppID = "a2b8469b-30a3-4361-8e13-6fceea8fbe74" HyundaiAppID = "014d2225-8495-4735-812d-2616334fd15d" )
Variables ¶
View Source
var ErrAuthFail = errors.New("authorization failed")
ErrAuthFail indicates authorization failure
View Source
var ( Stamps = map[string]*stampCollection{ KiaAppID: {AppID: KiaAppID, Brand: "kia", /* contains filtered or unexported fields */}, HyundaiAppID: {AppID: HyundaiAppID, Brand: "hyundai", /* contains filtered or unexported fields */}, } )
Functions ¶
This section is empty.
Types ¶
type API ¶
API implements the Kia/Hyundai bluelink api.
func (*API) StatusLatest ¶
func (v *API) StatusLatest(vid string) (StatusLatestResponse, error)
StatusLatest retrieves the latest server-side status
func (*API) StatusPartial ¶
func (v *API) StatusPartial(vid string) (StatusResponse, error)
StatusPartial refreshes the status
type Config ¶
type Config struct { URI string AuthClientID string // v2 BrandAuthUrl string // v2 BasicToken string CCSPServiceID string CCSPApplicationID string PushType string Cfb string }
Config is the bluelink API configuration
type DrivingDistance ¶
type DrivingDistance struct { RangeByFuel struct { EvModeRange struct { Value int } } }
type Identity ¶
type Identity struct { *request.Helper oauth2.TokenSource // contains filtered or unexported fields }
Identity implements the Kia/Hyundai bluelink identity. Based on https://github.com/Hacksore/bluelinky.
func NewIdentity ¶
NewIdentity creates BlueLink Identity
func (*Identity) RefreshToken ¶
RefreshToken implements oauth.TokenRefresher
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider implements the vehicle api. Based on https://github.com/Hacksore/bluelinky.
func NewProvider ¶
New creates a new BlueLink API
func (*Provider) FinishTime ¶
FinishTime implements the api.VehicleFinishTimer interface
func (*Provider) Status ¶
func (v *Provider) Status() (api.ChargeStatus, error)
Status implements the api.Battery interface
type ReservChargeInfo ¶
type ReservChargeInfo struct {
TargetSocList []TargetSoc
}
type StatusLatestResponse ¶
type StatusLatestResponse struct { RetCode string ResCode string ResMsg struct { VehicleStatusInfo struct { VehicleStatus VehicleStatus VehicleLocation VehicleLocation Odometer Odometer } } }
type StatusResponse ¶
type StatusResponse struct { RetCode string ResCode string ResMsg VehicleStatus }
type VehicleLocation ¶
type VehicleStatus ¶
type VehicleStatus struct { Time string EvStatus struct { BatteryCharge bool BatteryStatus float64 BatteryPlugin int RemainTime2 struct { Atc struct { Value, Unit int } } ChargePortDoorOpenStatus int DrvDistance []DrivingDistance ReservChargeInfos ReservChargeInfo } Vehicles []Vehicle }
type VehiclesResponse ¶
Click to show internal directories.
Click to hide internal directories.