node-treestatus v0.0.2
Install
npm install node-treestatusExample
var treestatus = require('node-treestatus')({username: 'me', password: 'supersecret'});
treestatus.getStatus('gaia-try', function(e, d) {
if (e) {
console.log(e);
}
console.log(d);
}API Reference
For complete information see the full docs
All functions require a callback in the form function(err, data)
For query (i.e. GET) functions, the raw response body is passed back an Object. For all other
functions, the build api status response is checked. If there is an API Error
, an Error object is created with a plaintext explanation
On success the request_id is passed back
treestatus#getAll(callback)Does a GET to
/self-serve/treestatus#setStatus(, optscallback)Does a POST to
/self-serve/Required options
statusreasontreetags
treestatus#getTree(treename, callback)Does a GET to
/self-serve/:treenametreestatus#setTree(treename, opts, callback)Does a POST to
/self-serve/:treenameRequired options
statusreason
Optional options
tags
treestatus#deleteTree(treename, opts, callback)Does a DELETE to
/self-serve/:treenameRequired options
reason
treestatus#getTreeLogs(treename, callback)Does a GET to
/self-serve/:treename/logsOptional options
all
Docs build with node -e "require('./index').docs()"