wmalgadey / PyTado

Python binding for Tado web API. Pythonize your central heating!
GNU General Public License v3.0
76 stars 41 forks source link

Refactoring + New Functionality #61

Closed Coffee2CodeNL closed 1 year ago

Coffee2CodeNL commented 1 year ago

Futureproofing the way API calls work as well, making sure that it doesn't get messy

All in all, I'm cleaning this project up, get it up to PEP8 spec and see what else we can figure out with this

Coffee2CodeNL commented 1 year ago

Http.request() is a behemoth at the moment, but I'll be pulling it apart into separate functions when I continue working on this

Coffee2CodeNL commented 1 year ago

Ready for review

wmalgadey commented 1 year ago

Wow, @Coffee2CodeNL, great work.

I did take a look into your changes, and they seem fine to me. Because of the quantity, I am not able to see if the mentioned problems are really solved and if new problems may arise.

I do understand the reasons for the separation into http.py and logging.py, but the public API just adds a new layer of complexity.

Should we remove the other API someday (and when)? Maintaining two APIs seems a bit tedious, doesn't it?

Coffee2CodeNL commented 1 year ago

Hey @wmalgadey the wrongly cased API has a deprecation notice so I'd say keep it in for like, two more version bumps.

I did that because Python methods are supposed to be snake case instead of how they were currently written.

Also, #58 is in logging.py

53 in http.py

and finally #51 is a new method in interface.py