diff --git a/lib/tesla_api/vehicle.ex b/lib/tesla_api/vehicle.ex index 1ff0690b..a765b11c 100644 --- a/lib/tesla_api/vehicle.ex +++ b/lib/tesla_api/vehicle.ex @@ -51,14 +51,11 @@ defmodule TeslaApi.Vehicle do _global -> "https://owner-api.teslamotors.com" end - TeslaApi.get(endpoint_url <> "/api/1/vehicles/#{id}/vehicle_data", - query: [ - endpoints: - "charge_state;climate_state;closures_state;drive_state;gui_settings;location_data;vehicle_config;vehicle_state;vehicle_data_combo" - ], + TeslaApi.get(endpoint_url <> "/api/1/vehicles/#{id}/vehicle_data?endpoints=charge_state%3Bclimate_state%3Bclosures_state%3Bdrive_state%3Bgui_settings%3Blocation_data%3Bvehicle_config%3Bvehicle_state%3Bvehicle_data_combo", opts: [access_token: auth.token] ) |> handle_response(transform: &result/1) + end def result(v) do