blerg

0.0.3 • Public • Published

node-blerg

A nodejs blerg client

Usage

var blerg = require('blerg');

blerg.login('username', 'password', function(err) {
  blerg.put("Blerging from nodejs", function(err) {
    if(err) console.log("I tried but the blurg ain't blurgin', captian");
  });
  blerg.subscribe('ek', function(err) {
    if err console.log(err);
  });

});

// These don't require being logged in
blerg.info('ek', function(err, res){
  if(err) return console.log("No news is bad news");
  console.log("There are " + res.record_count + " records for ek");
});

blerg.get('ek', function(err, res) {
  if(err) return console.log("The signal seems fuzzy");
  if(res && res[0]) {
    console.log("Ek's most recent post is: '" + res[0].data + "' timestamped
    at " + res[0].timestamp);
  }
});

Basically, read the api as put on blerg and just use the path name as the method name. The username argument is only required for the login call, all others will add it automatically.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.3
    17
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.3
    17
  • 0.0.2
    0
  • 0.0.1
    0
  • 0.0.0
    0

Package Sidebar

Install

npm i blerg

Weekly Downloads

13

Version

0.0.3

License

Unlicense

Last publish

Collaborators

  • euank