| 1 | # igloohome-api |
| 2 | A python HTTP library based on `aiohttp` to make use of [igloohome's REST API](https://igloocompany.stoplight.io/docs/igloohome-api/1w1cuv56ge5xq-overview). |
| 3 | This library is designed to be used via the [iglooaccess](https://www.igloocompany.co/iglooaccess) service. |
| 4 | |
| 5 | ## Requirements |
| 6 | An account on the iglooaccess portal needs to be created to get a `client_id` & `client_secret` for authentication. |
| 7 | |
| 8 | ## Usage |
| 9 | |
| 10 | ### Authentication |
| 11 | ```python |
| 12 | from igloohome_api import Auth |
| 13 | from aiohttp import ClientSession |
| 14 | |
| 15 | session = ClientSession() |
| 16 | auth = Auth( |
| 17 | client_id="<client_id>", |
| 18 | client_secret="<client_secret>", |
| 19 | session=session, |
| 20 | ) |
| 21 | ``` |
| 22 | |
| 23 | ### API usage |
| 24 | ```python |
| 25 | from igloohome_api import Api |
| 26 | |
| 27 | api = Api(auth) |
| 28 | |
| 29 | devices = await api.get_devices() |
| 30 | ``` |