core icon indicating copy to clipboard operation
core copied to clipboard

Refactor api into a module

Open alexyao2015 opened this issue 3 years ago • 3 comments

Api.py is getting long due to all the API endpoints being grouped together into a single file. Perhaps convert it to a module instead with endpoints broken into separate files for Lights API, Groups API, etc., similar to how Hue documentation is setup.

alexyao2015 avatar Jan 10 '21 19:01 alexyao2015

This is possible (and very easy to do) but I don't think needed because most important the business logic needs to be moved out of the api intro controllers. See #71

If we do that and still think api.py is too large, we can chunk it up.

If you want me to, I can have a look at the controllers refactor next week. It's no rush but something we want to do if we do not want to go insane ;-)

marcelveldt avatar Jan 10 '21 19:01 marcelveldt

Hmm yes. Let's work towards #71 first and see what the api.py file looks like after that. If needed, we can then revisit this after that is complete.

alexyao2015 avatar Jan 10 '21 19:01 alexyao2015

Stale issue message

github-actions[bot] avatar Mar 13 '21 02:03 github-actions[bot]