Basic C# library for interacting with Tesla's Owner API, based on https://tesla-api.timdorr.com/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

235 lines
10 KiB

// RootDataResponse myDeserializedClass = JsonConvert.DeserializeObject<RootDataResponse>(myJsonResponse);
using System.Collections.Generic;
namespace Tesla
{
public class DriveState
{
public string gps_as_of { get; set; }
public string heading { get; set; }
public double latitude { get; set; }
public double longitude { get; set; }
public double native_latitude { get; set; }
public string native_location_supported { get; set; }
public double native_longitude { get; set; }
public string native_type { get; set; }
public string power { get; set; }
public object shift_state { get; set; }
public object speed { get; set; }
public long timestamp { get; set; }
}
public class ClimateState
{
public string battery_heater { get; set; }
public string battery_heater_no_power { get; set; }
public string climate_keeper_mode { get; set; }
public string defrost_mode { get; set; }
public double driver_temp_setting { get; set; }
public string fan_status { get; set; }
public double inside_temp { get; set; }
public string is_auto_conditioning_on { get; set; }
public string is_climate_on { get; set; }
public string is_front_defroster_on { get; set; }
public string is_preconditioning { get; set; }
public string is_rear_defroster_on { get; set; }
public string left_temp_direction { get; set; }
public double max_avail_temp { get; set; }
public double min_avail_temp { get; set; }
public double outside_temp { get; set; }
public double passenger_temp_setting { get; set; }
public string remote_heater_control_enabled { get; set; }
public string right_temp_direction { get; set; }
public string seat_heater_left { get; set; }
public string seat_heater_right { get; set; }
public string side_mirror_heaters { get; set; }
public long timestamp { get; set; }
public string wiper_blade_heater { get; set; }
}
public class ChargeState
{
public string battery_heater_on { get; set; }
public string battery_level { get; set; }
public double battery_range { get; set; }
public string charge_current_request { get; set; }
public string charge_current_request_max { get; set; }
public string charge_enable_request { get; set; }
public double charge_energy_added { get; set; }
public string charge_limit_soc { get; set; }
public string charge_limit_soc_max { get; set; }
public string charge_limit_soc_min { get; set; }
public string charge_limit_soc_std { get; set; }
public double charge_miles_added_ideal { get; set; }
public double charge_miles_added_rated { get; set; }
public object charge_port_cold_weather_mode { get; set; }
public string charge_port_door_open { get; set; }
public string charge_port_latch { get; set; }
public double charge_rate { get; set; }
public string charge_to_max_range { get; set; }
public string charger_actual_current { get; set; }
public string charger_phases { get; set; }
public string charger_pilot_current { get; set; }
public string charger_power { get; set; }
public string charger_voltage { get; set; }
public string charging_state { get; set; }
public string conn_charge_cable { get; set; }
public double est_battery_range { get; set; }
public string fast_charger_brand { get; set; }
public string fast_charger_present { get; set; }
public string fast_charger_type { get; set; }
public double ideal_battery_range { get; set; }
public string managed_charging_active { get; set; }
public object managed_charging_start_time { get; set; }
public string managed_charging_user_canceled { get; set; }
public string max_range_charge_counter { get; set; }
public string minutes_to_full_charge { get; set; }
public string not_enough_power_to_heat { get; set; }
public string scheduled_charging_pending { get; set; }
public object scheduled_charging_start_time { get; set; }
public double time_to_full_charge { get; set; }
public long timestamp { get; set; }
public string trip_charging { get; set; }
public string usable_battery_level { get; set; }
public object user_charge_enable_request { get; set; }
}
public class GuiSettings
{
public string gui_24_hour_time { get; set; }
public string gui_charge_rate_units { get; set; }
public string gui_distance_units { get; set; }
public string gui_range_display { get; set; }
public string gui_temperature_units { get; set; }
public string show_range_units { get; set; }
public long timestamp { get; set; }
}
public class MediaState
{
public string remote_control_enabled { get; set; }
}
public class SoftwareUpdate
{
public string download_perc { get; set; }
public string expected_duration_sec { get; set; }
public string install_perc { get; set; }
public string status { get; set; }
public string version { get; set; }
}
public class SpeedLimitMode
{
public string active { get; set; }
public double current_limit_mph { get; set; }
public string max_limit_mph { get; set; }
public string min_limit_mph { get; set; }
public string pin_code_set { get; set; }
}
public class VehicleState
{
public string api_version { get; set; }
public string autopark_state_v2 { get; set; }
public string autopark_style { get; set; }
public string calendar_supported { get; set; }
public string car_version { get; set; }
public string center_display_state { get; set; }
public string df { get; set; }
public string dr { get; set; }
public string fd_window { get; set; }
public string fp_window { get; set; }
public string ft { get; set; }
public string homelink_device_count { get; set; }
public string homelink_nearby { get; set; }
public string is_user_present { get; set; }
public string last_autopark_error { get; set; }
public string locked { get; set; }
public MediaState media_state { get; set; }
public string notifications_supported { get; set; }
public double odometer { get; set; }
public string parsed_calendar_supported { get; set; }
public string pf { get; set; }
public string pr { get; set; }
public string rd_window { get; set; }
public string remote_start { get; set; }
public string remote_start_enabled { get; set; }
public string remote_start_supported { get; set; }
public string rp_window { get; set; }
public string rt { get; set; }
public string sentry_mode { get; set; }
public string sentry_mode_available { get; set; }
public string smart_summon_available { get; set; }
public SoftwareUpdate software_update { get; set; }
public SpeedLimitMode speed_limit_mode { get; set; }
public string summon_standby_mode_enabled { get; set; }
public string sun_roof_percent_open { get; set; }
public string sun_roof_state { get; set; }
public long timestamp { get; set; }
public string valet_mode { get; set; }
public string valet_pin_needed { get; set; }
public object vehicle_name { get; set; }
}
public class VehicleConfig
{
public string can_accept_navigation_requests { get; set; }
public string can_actuate_trunks { get; set; }
public string car_special_type { get; set; }
public string car_type { get; set; }
public string charge_port_type { get; set; }
public string default_charge_to_max { get; set; }
public string ece_restrictions { get; set; }
public string eu_vehicle { get; set; }
public string exterior_color { get; set; }
public string has_air_suspension { get; set; }
public string has_ludicrous_mode { get; set; }
public string motorized_charge_port { get; set; }
public string plg { get; set; }
public string rear_seat_heaters { get; set; }
public string rear_seat_type { get; set; }
public string rhd { get; set; }
public string roof_color { get; set; }
public string seat_type { get; set; }
public string spoiler_type { get; set; }
public string sun_roof_installed { get; set; }
public string third_row_seats { get; set; }
public long timestamp { get; set; }
public string trim_badging { get; set; }
public string use_range_badging { get; set; }
public string wheel_type { get; set; }
}
public class DataResponse
{
public long id { get; set; }
public long user_id { get; set; }
public string vehicle_id { get; set; }
public string vin { get; set; }
public string display_name { get; set; }
public string option_codes { get; set; }
public object color { get; set; }
public string access_type { get; set; }
public List<string> tokens { get; set; }
public string state { get; set; }
public string in_service { get; set; }
public string id_s { get; set; }
public string calendar_enabled { get; set; }
public string api_version { get; set; }
public object backseat_token { get; set; }
public object backseat_token_updated_at { get; set; }
public DriveState drive_state { get; set; }
public ClimateState climate_state { get; set; }
public ChargeState charge_state { get; set; }
public GuiSettings gui_settings { get; set; }
public VehicleState vehicle_state { get; set; }
public VehicleConfig vehicle_config { get; set; }
}
public class RootDataResponse
{
public DataResponse response { get; set; }
}
}