kwikdesk

0.0.0 • Public • Published

Node.js KwikDesk.com API Client

Send messages and search for messages.

Installation

The following will install this package and add it as a dependency to your project:

npm install kwikdesk --save

Usage

Require this package after installing with npm:

var Kwikdesk = require('kwikdesk');

Send a 'kwik' message that expires in 1440 minutes (24 hours):

Kwikdesk.message("Playing around with the KwikDesk API #nodejs", 1440, function (err, response) {
    if (err) return console.log(err, response);
    console.log("Message posted");
});

Search for messages tagged #nodejs (that haven't yet expired):

Kwikdesk.search("nodejs", function (err, results) {
    if (err) return console.log(err);
    var now = Date.now() / 1000 | 0;
    for (var i = 0; i < results.length; i++) {
        var expires_in = (results[i].expires - now) / 60 | 0;
        console.log(results[i].content + " (expires in " + expires_in + " min)");
    }
});

The output of the search above would be something like:

Testing the KwikDesk search now #nodejs (expires in 1439 min)
Playing around with the KwikDesk API #nodejs (expires in 1433 min)

See the KwikDesk developer documentation for more details.

License

This project is released under the MIT License.

Readme

Keywords

Package Sidebar

Install

npm i kwikdesk

Weekly Downloads

0

Version

0.0.0

License

MIT

Last publish

Collaborators

  • daviddoran