@w3bstream/sdk
v0.1.1
Published
``` $ pnpm i @w3bstream/sdk ```
Downloads
6
Keywords
Readme
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.