python-cozify icon indicating copy to clipboard operation
python-cozify copied to clipboard

Basic hub calls for users, rooms and zones

Open jinnatar opened this issue 3 years ago • 1 comments

The basics are trivial to implement for get calls, endpoints I've found:

  • cozify.hub_api.get('/hub/users', **kwargs)
  • cozify.hub_api.get('/rooms', **kwargs)
  • cozify.hub_api.get('/zones', **kwargs)

All of them probably support also post calls for adding items but that could be left to a follow up PR. I don't have the time to implement these right now but the get calls are trivial so a good first issue for anyone wanting to contribute. I'll also get to them eventually.

jinnatar avatar Oct 25 '22 19:10 jinnatar

For anyone curious to poke into arbitrary calls yoinking credentials and other low level params from a live hub state:

import cozify
from cozify import hub
kwargs = {}
cozify.hub._fill_kwargs(kwargs)
cozify.hub_api.get('/hub/users', **kwargs)

jinnatar avatar Oct 25 '22 19:10 jinnatar