Skip to content

Commit

Permalink
Improved API with latest version of tesla api docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jsight authored and brianmay committed Nov 11, 2023
1 parent 3737d8a commit 8f6c993
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/tesla_api/vehicle.ex
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,11 @@ defmodule TeslaApi.Vehicle do
_global -> "https://owner-api.teslamotors.com"
end

TeslaApi.get(endpoint_url <> "/api/1/vehicles/#{id}/vehicle_data",
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
Expand Down

0 comments on commit 8f6c993

Please sign in to comment.