@wiotp/sdk
v0.8.1
Published
SDK for developing device, gateway, and application clients for IBM Watson IoT Platform
Downloads
165
Readme
IBM Watson IoT Platform Javascript SDK
Installation
npm install @wiotp/sdk --save
Usage
Application
import {ApplicationClient, ApplicationConfig} from '@wiotp/sdk';
let appConfig = ApplicationConfig.parseEnvVars();
let appClient = new ApplicationClient(appConfig);
appClient.connect();
// Do stuff
appClient.disconnect();
Device
import {DeviceClient, DeviceConfig} from '@wiotp/sdk';
let deviceConfig = DeviceConfig.parseEnvVars();
let deviceClient = new DeviceClient(deviceConfig);
deviceClient.connect();
// Do stuff
deviceClient.disconnect();
Gateway
import {GatewayClient, GatewayConfig} from '@wiotp/sdk';
let gwConfig = GatewayConfig.parseEnvVars();
let gwClient = new GatewayClient(gwConfig);
gwClient.connect();
// Do stuff
gwClient.disconnect();
Development
Build
npm i
npm run build
Publish
npm login
npm publish .