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

Add API classes and device functions #3

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

dricair
Copy link

@dricair dricair commented Jul 16, 2024

Add API classes

  • Functions now return instance of classes, containing properties
  • Add functions for device data

Additional minor changes on:

  • Testing: allow testing without credentials, and skip the ones that need a valid credential. If credentials are valid, the full list of tests run
  • Some lint issue fix (Verified with ruff check)
  • Tests are passing, with or without credentials

dricair added 6 commits July 16, 2024 16:02
Close session on exit
Fill Logout function

XSRF-TOKEN should be on response headers with new
format instead of cookies. Try to get from headers, else
from cookies.
If credentials are not provided (Environment variables
not set), some tests are skipped. The tests with Mock
remain.

Remove unused imports and variables
dricair added 5 commits July 19, 2024 15:36
Add a class for each response with properties
to access the fields
Adapts to new API classes
Adapt How to test to API classes.

Restructure to fetch list of plants and devices
and save to a JSON file: as the number of
requests is limited, it is better to save and not
request again.
@dricair dricair changed the title Several minor changes Add API classes and device functions Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant