diy
v1.1.0
Published
API client for DIY.org
Downloads
21
Readme
diy
JavaScript API client for DIY.org
Installation
npm install diy
Stream Pattern
var diy = require('diy')('*');
var request = diy({
method: 'GET',
uri: '/status'
}).pipe(process.stdout);
request.on('error', function (err) {
// Oh noes!
});
Callback Pattern
var diy = require('diy')('*');
diy({
method: 'GET',
uri: '/status'
}, function (err, body) {
window.alert(body);
});
Testing
npm install && npm test