Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Client

Hierarchy

  • Client

Index

Constructors

constructor

  • Parameters

    • gateway: Gateway
    • auth: Auth
    • session: Session | null
    • Default value country: string = constants.DEFAULT_COUNTRY
    • Default value language: string = constants.DEFAULT_LANGUAGE

    Returns Client

Properties

auth

auth: Auth

country

country: string

devices

devices: DeviceInfo[] = []

gateway

gateway: Gateway

language

language: string

modelInfo

modelInfo: object

Type declaration

  • [key: string]: any

session

session: Session | null

Methods

getDevice

  • getDevice(deviceId: string): Promise<undefined | DeviceInfo>

getModelInfo

refresh

  • refresh(): Promise<void>

toStateObject

  • toStateObject(): object
  • Returns object

    • auth: undefined | object
    • country: string
    • gateway: undefined | object
    • language: string
    • modelInfo: object
      • [key: string]: any
    • 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>

Generated using TypeDoc