Skip to content

Commit

Permalink
Move products endpoint out of energy
Browse files Browse the repository at this point in the history
  • Loading branch information
Bre77 committed Jan 11, 2024
1 parent fc0e938 commit 4705752
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
7 changes: 0 additions & 7 deletions tesla_fleet_api/energy.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,6 @@ async def operation(
data={default_real_mode: default_real_mode},
)

async def products(self) -> dict[str, Any]:
"""Returns products mapped to user."""
return await self._request(
Methods.GET,
"api/1/products",
)

async def site_info(self, energy_site_id: int) -> dict[str, Any]:
"""Returns information about the site. Things like assets (has solar, etc), settings (backup reserve, etc), and features (storm_mode_capable, etc)."""
return await self._request(
Expand Down
7 changes: 7 additions & 0 deletions tesla_fleet_api/teslafleetapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,10 @@ async def status(self):
raise ValueError("Server was not set at init. Call find_server() first.")
async with self.session.get(f"{self.server}/status") as resp:
return await resp.text()

async def products(self) -> dict[str, Any]:
"""Returns products mapped to user."""
return await self._request(
Methods.GET,
"api/1/products",
)

0 comments on commit 4705752

Please sign in to comment.