Closed stuertz closed 4 months ago
BTW: I did hit rate limits with energy_csv.py
;-)
I'm not necessarily want to throw it away if you want to update the master module with more common examples or better structure. My point is just that we shuold only finalize a single new master version with most of the stuff commented, so that if someone want to use it to explore the Api, he must uncomment (and modify) the requests or endpoints that he wants to test. It is not meant to be a base for an automated test routine of the api. If you want to create something for that, I would say this should go into a separate script.
Regarding pytests, yes that belongs to another place. - I totally agreed This just reflects my journey into the api. ;-)
At first I wanted to repair the example code and i personally dislike commented code, because it rots quite fast. I'll restructure it and give it another try, that maybe fits your ideas a bit more.
Ah ok, didn't know your intention.
The file is still there: https://github.com/thomluther/anker-solix-api/blob/main/test_api.py
I wanted to reenable the code in it. to keep it as a working example. That script could have become a starting point to implement automated pytests.
API Request limiting may become a point, I agree.
The script could be nice to dig into the API and for debugging purposes. None must execute it, just because it is there... But I'm ok if you go to throw it away....