KwikDesk Partner API Node Client
Installation
The following will install the npm package and add it as a dependency to your project:
npm install kwikdesk-partner-node --save
Usage
var Kwikdesk = require('kwikdesk-partner-node');
Tokens
Kwikdesk.token("my-app", function (err, token, participantToken) {
console.log(token);
console.log(participantToken);
});
Join
Kwikdesk.join(token, function (err, token, participantToken) {
console.log(token);
console.log(participantToken);
});
Messages
Kwikdesk.message(token, participantToken, "This is a private message on a secure channel", 1440, true, function (err, response) {
console.log(response.message);
});
Channels
Kwikdesk.channel(token, participantToken, since, function (err, results) {
console.dir(results);
});
Search
Kwikdesk.search(token, "kwikdesk", function (err, results) {
console.dir(results);
});
Server time
Kwikdesk.time(function (err, result) {
console.dir(result);
});
Testing
npm install -g mocha
npm test