@cloudws/node-api
Node.js server CLoudWS API
Last updated 7 months ago by frimuchkov .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @cloudws/node-api 
SYNC missed versions from official npm registry.

CloudWS Node.js lib

Installation

npm install cloudws-node-api

or

yarn add cloudws-node-api

Getting started

import CloudWS from '@cloudws/node-api';

const cloudWS = new CloudWS(process.env.CLOUDWS_TOKEN);

Create channel

cloudWS.createChannel('my_channel')

Get list of channels

cloudWS.getAllChannels();

Send message

cloudWS.sendMessage('my_channel', {data: 'Message to channel'});

Delete message

cloudWS.deleteChannel('my_channel');

Example

import CloudWS from '@cloudws/node-api';

const cloudWS = new CloudWSAPI(process.env.CLOUDWS_TOKEN);
const start = async () => {
     await cloudWS.createChannel('my_channel');
     await cloudWS.sendMessage('my_channel', {data: 'Message to channel'});
     await cloudWS.deleteChannel('my_channel');
};
start();

Current Tags

  • 0.1.1                                ...           latest (7 months ago)

2 Versions

  • 0.1.1                                ...           7 months ago
  • 0.1.0                                ...           7 months ago
Maintainers (1)
Downloads
Today 0
This Week 2
This Month 2
Last Day 0
Last Week 0
Last Month 2
Dependencies (3)
Dev Dependencies (4)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |