Genie-Garage / aladdin-python-sdk

AladdinConnect partner SDK
Other
3 stars 1 forks source link

AladdinConnect SDK

Authentication

OAuth Client

This SDK requires you to already have an OAuth client setup with us. The initial OAuth2.0 flow must be implemented by the users of this library as we provide no default implementation. More information on how to set this up will be provided when the OAuth client is set up.

Auth Class Implementation

The SDK provides an Auth class. It requires the following constructor parameters:

This class also provides an abstract method async_get_access_token. This method is meant to be overridden with logic to handle checking the current token's validity and refreshing if needed. The refresh token will need to be managed outside of this class. Once this is implemented, the request method will automatically check the access token and set the appropriate authentication headers.

Model

Each garage door is modeled using the GarageDoor class that has the following properties:

Client

The AladdinConnectClient class provides the actual functionality of the API. It requires an Auth session to be configured (described above in the Authentication section). This class provides the following methods: