vehicle

package
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 16, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChargeState

type ChargeState struct {
	BatteryHeaterOn                bool        `json:"battery_heater_on"`
	BatteryLevel                   float64     `json:"battery_level"`
	BatteryRange                   float64     `json:"battery_range"`
	ChargeAmps                     float64     `json:"charge_amps"`
	ChargeCurrentRequest           float64     `json:"charge_current_request"`
	ChargeCurrentRequestMax        float64     `json:"charge_current_request_max"`
	ChargeEnableRequest            bool        `json:"charge_enable_request"`
	ChargeEnergyAdded              float64     `json:"charge_energy_added"`
	ChargeLimitSoc                 float64     `json:"charge_limit_soc"`
	ChargeLimitSocMax              float64     `json:"charge_limit_soc_max"`
	ChargeLimitSocMin              float64     `json:"charge_limit_soc_min"`
	ChargeLimitSocStd              float64     `json:"charge_limit_soc_std"`
	ChargeMilesAddedIdeal          float64     `json:"charge_miles_added_ideal"`
	ChargeMilesAddedRated          float64     `json:"charge_miles_added_rated"`
	ChargePortColdWeatherMode      bool        `json:"charge_port_cold_weather_mode"`
	ChargePortColor                string      `json:"charge_port_color"`
	ChargePortDoorOpen             bool        `json:"charge_port_door_open"`
	ChargePortLatch                string      `json:"charge_port_latch"`
	ChargeRate                     float64     `json:"charge_rate"`
	ChargerActualCurrent           float64     `json:"charger_actual_current"`
	ChargerPhases                  interface{} `json:"charger_phases"`
	ChargerPilotCurrent            float64     `json:"charger_pilot_current"`
	ChargerPower                   float64     `json:"charger_power"`
	ChargerVoltage                 float64     `json:"charger_voltage"`
	ChargingState                  string      `json:"charging_state"`
	ConnChargeCable                string      `json:"conn_charge_cable"`
	EstBatteryRange                float64     `json:"est_battery_range"`
	FastChargerBrand               string      `json:"fast_charger_brand"`
	FastChargerPresent             bool        `json:"fast_charger_present"`
	FastChargerType                string      `json:"fast_charger_type"`
	IdealBatteryRange              float64     `json:"ideal_battery_range"`
	ManagedChargingActive          bool        `json:"managed_charging_active"`
	ManagedChargingStartTime       interface{} `json:"managed_charging_start_time"`
	ManagedChargingUserCanceled    bool        `json:"managed_charging_user_canceled"`
	MaxRangeChargeCounter          float64     `json:"max_range_charge_counter"`
	MinutesToFullCharge            float64     `json:"minutes_to_full_charge"`
	NotEnoughPowerToHeat           interface{} `json:"not_enough_power_to_heat"`
	OffPeakChargingEnabled         bool        `json:"off_peak_charging_enabled"`
	OffPeakChargingTimes           string      `json:"off_peak_charging_times"`
	OffPeakHoursEndTime            float64     `json:"off_peak_hours_end_time"`
	PreconditioningEnabled         bool        `json:"preconditioning_enabled"`
	PreconditioningTimes           string      `json:"preconditioning_times"`
	ScheduledChargingMode          string      `json:"scheduled_charging_mode"`
	ScheduledChargingPending       bool        `json:"scheduled_charging_pending"`
	ScheduledChargingStartTime     interface{} `json:"scheduled_charging_start_time"`
	ScheduledChargingStartTimeApp  float64     `json:"scheduled_charging_start_time_app"`
	ScheduledDepartureTime         float64     `json:"scheduled_departure_time"`
	ScheduledDepartureTimeMinutes  float64     `json:"scheduled_departure_time_minutes"`
	SuperchargerSessionTripPlanner bool        `json:"supercharger_session_trip_planner"`
	TimeToFullCharge               float64     `json:"time_to_full_charge"`
	Timestamp                      int64       `json:"timestamp"`
	TripCharging                   bool        `json:"trip_charging"`
	UsableBatteryLevel             float64     `json:"usable_battery_level"`
	UserChargeEnableRequest        interface{} `json:"user_charge_enable_request"`
}

type ClimateState

type ClimateState struct {
	AllowCabinOverheatProtection           bool        `json:"allow_cabin_overheat_protection"`
	AutoSeatClimateLeft                    bool        `json:"auto_seat_climate_left"`
	AutoSeatClimateRight                   bool        `json:"auto_seat_climate_right"`
	BatteryHeater                          bool        `json:"battery_heater"`
	BatteryHeaterNoPower                   interface{} `json:"battery_heater_no_power"`
	CabinOverheatProtection                string      `json:"cabin_overheat_protection"`
	CabinOverheatProtectionActivelyCooling bool        `json:"cabin_overheat_protection_actively_cooling"`
	ClimateKeeperMode                      string      `json:"climate_keeper_mode"`
	CopActivationTemperature               string      `json:"cop_activation_temperature"`
	DefrostMode                            int         `json:"defrost_mode"`
	DriverTempSetting                      float64     `json:"driver_temp_setting"`
	FanStatus                              int         `json:"fan_status"`
	HvacAutoRequest                        string      `json:"hvac_auto_request"`
	InsideTemp                             float64     `json:"inside_temp"`
	IsAutoConditioningOn                   bool        `json:"is_auto_conditioning_on"`
	IsClimateOn                            bool        `json:"is_climate_on"`
	IsFrontDefrosterOn                     bool        `json:"is_front_defroster_on"`
	IsPreconditioning                      bool        `json:"is_preconditioning"`
	IsRearDefrosterOn                      bool        `json:"is_rear_defroster_on"`
	LeftTempDirection                      float64     `json:"left_temp_direction"`
	MaxAvailTemp                           float64     `json:"max_avail_temp"`
	MinAvailTemp                           float64     `json:"min_avail_temp"`
	OutsideTemp                            float64     `json:"outside_temp"`
	PassengerTempSetting                   float64     `json:"passenger_temp_setting"`
	RemoteHeaterControlEnabled             bool        `json:"remote_heater_control_enabled"`
	RightTempDirection                     float64     `json:"right_temp_direction"`
	SeatHeaterLeft                         float64     `json:"seat_heater_left"`
	SeatHeaterRearCenter                   float64     `json:"seat_heater_rear_center"`
	SeatHeaterRearLeft                     float64     `json:"seat_heater_rear_left"`
	SeatHeaterRearRight                    float64     `json:"seat_heater_rear_right"`
	SeatHeaterRight                        float64     `json:"seat_heater_right"`
	SideMirrorHeaters                      bool        `json:"side_mirror_heaters"`
	SteeringWheelHeater                    bool        `json:"steering_wheel_heater"`
	SupportsFanOnlyCabinOverheatProtection bool        `json:"supports_fan_only_cabin_overheat_protection"`
	Timestamp                              int64       `json:"timestamp"`
	WiperBladeHeater                       bool        `json:"wiper_blade_heater"`
}

type DriveState

type DriveState struct {
	ActiveRouteLatitude            float64     `json:"active_route_latitude"`
	ActiveRouteLongitude           float64     `json:"active_route_longitude"`
	ActiveRouteTrafficMinutesDelay float64     `json:"active_route_traffic_minutes_delay"`
	CorrectedLatitude              float64     `json:"corrected_latitude"`
	CorrectedLongitude             float64     `json:"corrected_longitude"`
	GpsAsOf                        float64     `json:"gps_as_of"`
	Heading                        float64     `json:"heading"`
	Latitude                       float64     `json:"latitude"`
	Longitude                      float64     `json:"longitude"`
	NativeLatitude                 float64     `json:"native_latitude"`
	NativeLocationSupported        float64     `json:"native_location_supported"`
	NativeLongitude                float64     `json:"native_longitude"`
	NativeType                     string      `json:"native_type"`
	Power                          float64     `json:"power"`
	ShiftState                     interface{} `json:"shift_state"`
	Speed                          interface{} `json:"speed"`
	Timestamp                      int64       `json:"timestamp"`
}

type GranularAccess

type GranularAccess struct {
	HidePrivate bool `json:"hide_private"`
}

type GuiSettings

type GuiSettings struct {
	Gui24HourTime        bool   `json:"gui_24_hour_time"`
	GuiChargeRateUnits   string `json:"gui_charge_rate_units"`
	GuiDistanceUnits     string `json:"gui_distance_units"`
	GuiRangeDisplay      string `json:"gui_range_display"`
	GuiTemperatureUnits  string `json:"gui_temperature_units"`
	GuiTirepressureUnits string `json:"gui_tirepressure_units"`
	ShowRangeUnits       bool   `json:"show_range_units"`
	Timestamp            int64  `json:"timestamp"`
}

type MediaInfo

type MediaInfo struct {
	AudioVolume          float64 `json:"audio_volume"`
	AudioVolumeIncrement float64 `json:"audio_volume_increment"`
	AudioVolumeMax       float64 `json:"audio_volume_max"`
	MediaPlaybackStatus  string  `json:"media_playback_status"`
	NowPlayingAlbum      string  `json:"now_playing_album"`
	NowPlayingArtist     string  `json:"now_playing_artist"`
	NowPlayingDuration   float64 `json:"now_playing_duration"`
	NowPlayingElapsed    float64 `json:"now_playing_elapsed"`
	NowPlayingSource     string  `json:"now_playing_source"`
	NowPlayingStation    string  `json:"now_playing_station"`
	NowPlayingTitle      string  `json:"now_playing_title"`
}

type MediaState

type MediaState struct {
	RemoteControlEnabled bool `json:"remote_control_enabled"`
}

type ProductResponse

type ProductResponse struct {
	ID                     int64          `json:"id"`
	UserID                 int            `json:"user_id"`
	VehicleID              int64          `json:"vehicle_id"`
	Vin                    string         `json:"vin"`
	Color                  interface{}    `json:"color"`
	AccessType             string         `json:"access_type"`
	DisplayName            string         `json:"display_name"`
	OptionCodes            interface{}    `json:"option_codes"`
	CachedData             string         `json:"cached_data"`
	GranularAccess         GranularAccess `json:"granular_access"`
	Tokens                 []string       `json:"tokens"`
	State                  string         `json:"state"`
	InService              bool           `json:"in_service"`
	IDS                    string         `json:"id_s"`
	CalendarEnabled        bool           `json:"calendar_enabled"`
	APIVersion             int            `json:"api_version"`
	BackseatToken          interface{}    `json:"backseat_token"`
	BackseatTokenUpdatedAt interface{}    `json:"backseat_token_updated_at"`
	BleAutopairEnrolled    bool           `json:"ble_autopair_enrolled"`
	CommandSigning         string         `json:"command_signing"`
	ReleaseNotesSupported  bool           `json:"release_notes_supported"`
}

type ProductsResult

type ProductsResult struct {
	Response []ProductResponse `json:"response"`
	Count    int               `json:"count"`
}

func VehicleInfo

func VehicleInfo(token string) (ProductsResult, error)

type SoftwareUpdate

type SoftwareUpdate struct {
	DownloadPerc        float64 `json:"download_perc"`
	ExpectedDurationSec float64 `json:"expected_duration_sec"`
	InstallPerc         float64 `json:"install_perc"`
	Status              string  `json:"status"`
	Version             string  `json:"version"`
}

type SpeedLimitMode

type SpeedLimitMode struct {
	Active          bool    `json:"active"`
	CurrentLimitMph float64 `json:"current_limit_mph"`
	MaxLimitMph     float64 `json:"max_limit_mph"`
	MinLimitMph     float64 `json:"min_limit_mph"`
	PinCodeSet      bool    `json:"pin_code_set"`
}

type VehicleConfig

type VehicleConfig struct {
	AuxParkLamps                string      `json:"aux_park_lamps"`
	BadgeVersion                int         `json:"badge_version"`
	CanAcceptNavigationRequests bool        `json:"can_accept_navigation_requests"`
	CanActuateTrunks            bool        `json:"can_actuate_trunks"`
	CarSpecialType              string      `json:"car_special_type"`
	CarType                     string      `json:"car_type"`
	ChargePortType              string      `json:"charge_port_type"`
	CopUserSetTempSupported     bool        `json:"cop_user_set_temp_supported"`
	DashcamClipSaveSupported    bool        `json:"dashcam_clip_save_supported"`
	DefaultChargeToMax          bool        `json:"default_charge_to_max"`
	DriverAssist                string      `json:"driver_assist"`
	EceRestrictions             bool        `json:"ece_restrictions"`
	EfficiencyPackage           string      `json:"efficiency_package"`
	EuVehicle                   bool        `json:"eu_vehicle"`
	ExteriorColor               string      `json:"exterior_color"`
	ExteriorTrim                string      `json:"exterior_trim"`
	ExteriorTrimOverride        string      `json:"exterior_trim_override"`
	HasAirSuspension            bool        `json:"has_air_suspension"`
	HasLudicrousMode            bool        `json:"has_ludicrous_mode"`
	HasSeatCooling              bool        `json:"has_seat_cooling"`
	HeadlampType                string      `json:"headlamp_type"`
	InteriorTrimType            string      `json:"interior_trim_type"`
	KeyVersion                  int         `json:"key_version"`
	MotorizedChargePort         bool        `json:"motorized_charge_port"`
	PaintColorOverride          string      `json:"paint_color_override"`
	PerformancePackage          string      `json:"performance_package"`
	Plg                         bool        `json:"plg"`
	Pws                         bool        `json:"pws"`
	RearDriveUnit               string      `json:"rear_drive_unit"`
	RearSeatHeaters             float64     `json:"rear_seat_heaters"`
	RearSeatType                int         `json:"rear_seat_type"`
	Rhd                         bool        `json:"rhd"`
	RoofColor                   string      `json:"roof_color"`
	SeatType                    interface{} `json:"seat_type"`
	SpoilerType                 string      `json:"spoiler_type"`
	SunRoofInstalled            interface{} `json:"sun_roof_installed"`
	SupportsQrPairing           bool        `json:"supports_qr_pairing"`
	ThirdRowSeats               string      `json:"third_row_seats"`
	Timestamp                   int64       `json:"timestamp"`
	TrimBadging                 string      `json:"trim_badging"`
	UseRangeBadging             bool        `json:"use_range_badging"`
	UtcOffset                   int         `json:"utc_offset"`
	WebcamSelfieSupported       bool        `json:"webcam_selfie_supported"`
	WebcamSupported             bool        `json:"webcam_supported"`
	WheelType                   string      `json:"wheel_type"`
}

type VehicleDataResponse

type VehicleDataResponse struct {
	ID                     int64         `json:"id"`
	UserID                 int           `json:"user_id"`
	VehicleID              int64         `json:"vehicle_id"`
	Vin                    string        `json:"vin"`
	DisplayName            string        `json:"display_name"`
	OptionCodes            string        `json:"option_codes"`
	Color                  interface{}   `json:"color"`
	AccessType             string        `json:"access_type"`
	Tokens                 []string      `json:"tokens"`
	State                  string        `json:"state"`
	InService              bool          `json:"in_service"`
	IDS                    string        `json:"id_s"`
	CalendarEnabled        bool          `json:"calendar_enabled"`
	APIVersion             int           `json:"api_version"`
	BackseatToken          interface{}   `json:"backseat_token"`
	BackseatTokenUpdatedAt interface{}   `json:"backseat_token_updated_at"`
	ChargeState            ChargeState   `json:"charge_state"`
	ClimateState           ClimateState  `json:"climate_state"`
	DriveState             DriveState    `json:"drive_state"`
	GuiSettings            GuiSettings   `json:"gui_settings"`
	VehicleConfig          VehicleConfig `json:"vehicle_config"`
	VehicleState           VehicleState  `json:"vehicle_state"`
}

type VehicleResult

type VehicleResult struct {
	Response VehicleDataResponse `json:"response"`
}

func VehicleData

func VehicleData(token string, vehicleId int64) (VehicleResult, error)

type VehicleState

type VehicleState struct {
	APIVersion                 int            `json:"api_version"`
	AutoparkStateV2            string         `json:"autopark_state_v2"`
	CalendarSupported          bool           `json:"calendar_supported"`
	CarVersion                 string         `json:"car_version"`
	CenterDisplayState         float64        `json:"center_display_state"`
	DashcamClipSaveAvailable   bool           `json:"dashcam_clip_save_available"`
	DashcamState               string         `json:"dashcam_state"`
	Df                         float64        `json:"df"`
	Dr                         float64        `json:"dr"`
	FdWindow                   float64        `json:"fd_window"`
	FeatureBitmask             string         `json:"feature_bitmask"`
	FpWindow                   float64        `json:"fp_window"`
	Ft                         float64        `json:"ft"`
	IsUserPresent              bool           `json:"is_user_present"`
	Locked                     bool           `json:"locked"`
	MediaInfo                  MediaInfo      `json:"media_info"`
	MediaState                 MediaState     `json:"media_state"`
	NotificationsSupported     bool           `json:"notifications_supported"`
	Odometer                   float64        `json:"odometer"`
	ParsedCalendarSupported    bool           `json:"parsed_calendar_supported"`
	Pf                         float64        `json:"pf"`
	Pr                         float64        `json:"pr"`
	RdWindow                   float64        `json:"rd_window"`
	RemoteStart                bool           `json:"remote_start"`
	RemoteStartEnabled         bool           `json:"remote_start_enabled"`
	RemoteStartSupported       bool           `json:"remote_start_supported"`
	RpWindow                   float64        `json:"rp_window"`
	Rt                         float64        `json:"rt"`
	SantaMode                  float64        `json:"santa_mode"`
	SentryMode                 bool           `json:"sentry_mode"`
	SentryModeAvailable        bool           `json:"sentry_mode_available"`
	ServiceMode                bool           `json:"service_mode"`
	ServiceModePlus            bool           `json:"service_mode_plus"`
	SoftwareUpdate             SoftwareUpdate `json:"software_update"`
	SpeedLimitMode             SpeedLimitMode `json:"speed_limit_mode"`
	Timestamp                  int64          `json:"timestamp"`
	TpmsHardWarningFl          bool           `json:"tpms_hard_warning_fl"`
	TpmsHardWarningFr          bool           `json:"tpms_hard_warning_fr"`
	TpmsHardWarningRl          bool           `json:"tpms_hard_warning_rl"`
	TpmsHardWarningRr          bool           `json:"tpms_hard_warning_rr"`
	TpmsLastSeenPressureTimeFl float64        `json:"tpms_last_seen_pressure_time_fl"`
	TpmsLastSeenPressureTimeFr float64        `json:"tpms_last_seen_pressure_time_fr"`
	TpmsLastSeenPressureTimeRl float64        `json:"tpms_last_seen_pressure_time_rl"`
	TpmsLastSeenPressureTimeRr float64        `json:"tpms_last_seen_pressure_time_rr"`
	TpmsPressureFl             float64        `json:"tpms_pressure_fl"`
	TpmsPressureFr             float64        `json:"tpms_pressure_fr"`
	TpmsPressureRl             float64        `json:"tpms_pressure_rl"`
	TpmsPressureRr             float64        `json:"tpms_pressure_rr"`
	TpmsRcpFrontValue          float64        `json:"tpms_rcp_front_value"`
	TpmsRcpRearValue           float64        `json:"tpms_rcp_rear_value"`
	TpmsSoftWarningFl          bool           `json:"tpms_soft_warning_fl"`
	TpmsSoftWarningFr          bool           `json:"tpms_soft_warning_fr"`
	TpmsSoftWarningRl          bool           `json:"tpms_soft_warning_rl"`
	TpmsSoftWarningRr          bool           `json:"tpms_soft_warning_rr"`
	ValetMode                  bool           `json:"valet_mode"`
	ValetPinNeeded             bool           `json:"valet_pin_needed"`
	VehicleName                string         `json:"vehicle_name"`
	WebcamAvailable            bool           `json:"webcam_available"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL