Skip to content

Commit

Permalink
Get list of vehicles using products endpoint for Owner API
Browse files Browse the repository at this point in the history
  • Loading branch information
RichieB2B committed Jan 23, 2024
1 parent 81b29ea commit 28cd745
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/TWCManager/Vehicle/TeslaAPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,9 @@ def car_api_available(
if self.getCarApiBearerToken() != "":
if self.getVehicleCount() < 1:
url = self.baseURL
if 'owner-api' in url:
url = url.replace('vehicles', 'products')
else:
headers = {
"accept": "application/json",
"Authorization": "Bearer " + self.getCarApiBearerToken(),
Expand Down

0 comments on commit 28cd745

Please sign in to comment.