bogdanteodoru/py3cw

New endpoints not in config, proposal for more future proof

aleqx opened this issue · 1 comments

aleqx commented

As expected, 3commas keeps adding new endpoints (e.g. events for grid bots). Your package hard codes all endpoints in config.py which makes it less future proof. I think it would be better for your request() function to allow any endpoint and have verify_request() only issue an warning for endpoint not defined in your config.py.

p.s. Hard coding api endpoints and parameters is not a good idea in general. API implementations should always allow full flexibility for obvious reasons.

Hi @aleqx. That would make sense I guess although would allow for more errors to appear in my opinion. Unfortunately, currently, I don't have the time to refactor it to make it more flexible. So if you want to refactor/upgrade it, be my guest.