teslatte/src/cli
gak 6facc27d8b
change!: vehicle_data now accepts a struct instead of VehicleId
To support "endpoints", e.g. requesting GPS.

From https://developer.tesla.com/docs/fleet-api#vehicle_data

String of URL-encoded, semicolon-separated values. Can be many of 'charge_state',
'climate_state', 'closures_state', 'drive_state', 'gui_settings', 'location_data',
'vehicle_config', 'vehicle_state', 'vehicle_data_combo'.

Before:

let vehicle_data = api.vehicle_data(&vehicle_id).await.unwrap();

After:

let get_vehicle_data = GetVehicleData::new(vehicles_id);
let vehicle_data = api.vehicle_data(&get_vehicle_data).await.unwrap();

Or with a endpoints:

let get_vehicle_data = GetVehicleData::new_with_endpoints(123u64, vec![Endpoint::ChargeState, Endpoint::ClimateState]);
let vehicle_data = api.vehicle_data(&get_vehicle_data).await.unwrap();

CLI:

You can still use vehicle-data without endpoints, but you won't get
location data. To fetch location_data:

teslatte api vehicle 123 vehicle-data location_data
2023-11-11 11:07:24 +11:00
..
energy.rs refactor!: Rename Api to OwnerApi. Remove ResponseData<T>. Add VehicleApi trait. 2023-10-22 09:17:32 +11:00
powerwall.rs refactor!: Rename Api to OwnerApi. Remove ResponseData<T>. Add VehicleApi trait. 2023-10-22 09:17:32 +11:00
vehicle.rs change!: vehicle_data now accepts a struct instead of VehicleId 2023-11-11 11:07:24 +11:00