@w3bstream/sdk
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

Installation

$ pnpm i @w3bstream/sdk

Usage

// libs/w3bstream.ts
import { Device } from '../libs/w3bstream.ts';

// new device
export const device = new Device({
  projectName: '<PROJECT_NAME>',
  w3bstreamEndpoint: 'https://devnet-staging.w3bstream.com/',
  deviceToken: '<DEVICE_TOKEN>',
});
// client.ts

const data = {
  latitude: '295661300',
  longitude: '1064685700',
  random: '78430',
  snr: 1024,
};

// send event
device.sendEvent({
  payload: data,
});

Building

Run nx build sdk to build the library.

Running unit tests

Run nx test sdk to execute the unit tests via Jest.

Readme

Keywords

none

Package Sidebar

Install

npm i @w3bstream/sdk

Weekly Downloads

1

Version

0.1.1

License

none

Unpacked Size

23.1 kB

Total Files

23

Last publish

Collaborators

  • osdodo
  • nick-iotex
  • zongzheng123
  • dlhtx
  • koishi