Scaledrone Node.js Push API
Official Scaledrone Node.js pushing library
Allows for usage of all Scaledrone's REST API methods.
For the Node.js WebSocket API Client check out this link.
Installation
npm install scaledrone-node-push --save
Usage
Create a new instance of Scaledrone passing it the channelId
and secretKey
that you can find from the channel's page
const Scaledrone = ;const sd = channelId: 'CHANNEL_ID' secretKey: 'SECRET_KEY';
Publishing a message
const message = foo: 'bar';const room = 'notifications';sd;
Publishing the same message to multiple rooms
const message = foo: 'bar'const rooms = 'notifications' 'lounge';sd;
Get channel stats
sd;
Getting the list of users from all rooms
sd;
Getting the list of rooms that have users in them
sd;
Getting the list of users in a room
sd;
Getting the list of rooms and their members
sd;