Closed MarvinWilliam closed 3 years ago
Sure, why not, we could just have an optional argument in the constructor to set the API host URL explicitly. Do you want to submit a PR?
LOL somehow thought this was an issue, not a PR. Perfect @MarvinWilliam & thanks! :rocket:
Perhaps a bit too fast in merging it, 2 pieces of nitpicking for next time :smile:
api_url: str = None
should be api_url: Optional[str] = None
(None
is not a string)
self.host = api_url if api_url else URL_API
could be written more elegently as self.host = api_url or URL_API
Cheers!
thx for PR merge and code recommend(i‘m new to python :stuck_out_tongue_winking_eye:),i have commit a new code clear PR https://github.com/DavidMStraub/homeconnect/pull/11
home connect in china have a different api host, i think we could allowed user cutom define api host they want.
doc source https://api-docs.home-connect.com/quickstart?#the-home-connect-api