https://github.com/euank/node-blerg
A nodejs blerg client
https://github.com/euank/node-blerg
Last synced: over 1 year ago
JSON representation
A nodejs blerg client
- Host: GitHub
- URL: https://github.com/euank/node-blerg
- Owner: euank
- License: unlicense
- Created: 2014-03-20T06:45:45.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2016-12-04T01:41:18.000Z (over 9 years ago)
- Last Synced: 2025-02-25T05:46:04.402Z (over 1 year ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
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](http://blerg.cc/doc/#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.