persandstrom / python-verisure

A python module for reading and changing status of verisure devices through verisure app api.
MIT License
134 stars 42 forks source link

Specialized request #149

Closed persandstrom closed 1 year ago

persandstrom commented 1 year ago

Remove duplicated code for trying both base URLs Fix lint warnings Add giid to all queries (to be able to poll from two installations in one request)

persandstrom commented 1 year ago

@niro1987 Could you please review and test. My plan is to make the m-api branch to the "main branch" if we are happy after this MR and upload to pypi.

persandstrom commented 1 year ago

Personally I would have not chosen for the optional giid, only explicit or with the set method. Because the giid is not returned in the response, so you would have to keep track of which request was made with what giid when making many.

Yes, didn't think about that... Makes it a bit messy. The user needs to keep track of the response order (Which I hope is the same as the query order). It would be possible to add giid to each response as well, but I do not know if that is a good idea.

niro1987 commented 1 year ago

Did you decide on formatting the request strings? That would make it much easier to add or remove a field on the individual requests.

persandstrom commented 1 year ago

Nope, I need to contemplate a bit longer :)