palazzem / econnect-python

API adapter used to control programmatically an Elmo alarm system
BSD 3-Clause "New" or "Revised" License
8 stars 5 forks source link

Extend ElmoClient constructor #34

Closed palazzem closed 4 years ago

palazzem commented 5 years ago

Overview

If a new ElmoClient must be created, the only way to set the underlying access token is to initialize the client and access an internal attribute:

from elmo.api.client import ElmoClient

c = ElmoClient()
c._session_id = "test"

Would be better if a kwarg is available:

from elmo.api.client import ElmoClient

c = ElmoClient(session_id="test)