Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create inverter accessing endpoints #71

Open
ericcccsliu opened this issue Apr 11, 2023 · 0 comments · Fixed by #80 · May be fixed by #87
Open

Create inverter accessing endpoints #71

ericcccsliu opened this issue Apr 11, 2023 · 0 comments · Fixed by #80 · May be fixed by #87
Assignees

Comments

@ericcccsliu
Copy link
Collaborator

Create the following endpoints:

/sites/<site_uuid>/inverters

  • Returns the inverter data from the inverters linked to this site. If there isn’t any, return a 404.

/inverters

  • Returns the inverter data for all of the authenticated client’s inverters. 401 if not signed in.

Utilize the get_inverters_for_client function from pv-site-datamodel to get the inverters.

To access Enode, use httpx with a client to make requests to the endpoints above. You'll also need to get data from the database to determine the inverters for a specific site, by importing data models and making a query.

We'll have to create pydantic models for the inverter data responses. With datamodels, we can then write corresponding tests.

@AndrewLester AndrewLester linked a pull request Apr 24, 2023 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants