Skip to content

Class Device

🏭 Constructors

constructor

ts
new Device(url: string): Device

Parameters

  • url: string

Return Type

  • Device

Defined in: packages/nat-api/lib/device.ts:75

🏷️ Properties

baseUrl private

ts
baseUrl: string = ''

Defined in: packages/nat-api/lib/device.ts:72

client private

ts
client: Client

Defined in: packages/nat-api/lib/device.ts:73

device private optional

ts
device: DeviceInfo

Defined in: packages/nat-api/lib/device.ts:69

lastUpdate private

ts
lastUpdate: number = 0

Defined in: packages/nat-api/lib/device.ts:70

services

ts
services: string[]

Defined in: packages/nat-api/lib/device.ts:67

ttl private

ts
ttl: number = ...

Defined in: packages/nat-api/lib/device.ts:71

url readonly

ts
url: string

Defined in: packages/nat-api/lib/device.ts:75

🔧 Methods

_getService private

ts
_getService(types: string[]): Promise<Object>

Parameters

  • types: string[]

Return Type

  • Promise<Object>

Defined in: packages/nat-api/lib/device.ts:190

connectDevice

ts
connectDevice(): Promise<DeviceInfo>

Return Type

  • Promise<DeviceInfo>

Defined in: packages/nat-api/lib/device.ts:84

run

ts
run(action: string, args: Record<string, undefined | string | number>): Promise<any>

Parameters

  • action: string
  • args: Record<string, undefined | string | number>

Return Type

  • Promise<any>

Defined in: packages/nat-api/lib/device.ts:115