Constructors
constructor
-
Parameters
-
-
-
session: Session | null
-
Default value country: string = constants.DEFAULT_COUNTRY
-
Default value language: string = constants.DEFAULT_LANGUAGE
Properties
language
language: string
modelInfo
modelInfo: object
Methods
getDevice
- getDevice(deviceId: string): Promise<undefined | DeviceInfo>
-
Parameters
Returns Promise<undefined | DeviceInfo>
toStateObject
-
Returns object
-
auth: undefined | object
-
country: string
-
gateway: undefined | object
-
language: string
-
modelInfo: object
-
session: undefined | string
updateDevices
- updateDevices(): Promise<void>
Static loadFromState
- loadFromState(state: object): Client
Static loadFromToken
- loadFromToken(refreshToken: string, country?: string, language?: string): Promise<Client>
-
Parameters
-
refreshToken: string
-
Default value country: string = constants.DEFAULT_COUNTRY
-
Default value language: string = constants.DEFAULT_LANGUAGE
Returns Promise<Client>