0.0.1-alpha.4 • Published 1 year ago

coolmaster-client v0.0.1-alpha.4

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

CoolMasterNet Client

CoolMasterNet API Client for TypeScript

Banner


Installation

npm install coolmaster-client

Usage

import { CoolMasterNetClient } from 'coolmaster-client'

const client = CoolMasterNetClient.create({
    host:   '192.168.1.111',
    port:   1234,             // Optional, defaults to `10103`
    secure: true,             // Optional, defaults to `false`
    device: '443B960055F0',
})

const results = await client.ls2()

Using Environment Variables

Instead of using the ConnectionConfigs, you can opt-in to use environment variables. The lookup precedence is as follows:

  1. Values found in the ConnectionConfigs.
  2. Environment variable equivalent.
  3. Default values (if applicable).
NameDefault
COOLMASTER_CLIENT_HOSTundefined
COOLMASTER_CLIENT_PORT10103
COOLMASTER_CLIENT_SECUREfalse
COOLMASTER_CLIENT_DEVICEundefined