node-treestatus
v0.0.2
Published
Node module for talking to the Mozilla Tree Status API
Downloads
5
Readme
Install
npm install node-treestatus
Example
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
status
reason
tree
tags
treestatus#getTree(treename, callback)
Does a GET to
/self-serve/:treename
treestatus#setTree(treename, opts, callback)
Does a POST to
/self-serve/:treename
Required options
status
reason
Optional options
tags
treestatus#deleteTree(treename, opts, callback)
Does a DELETE to
/self-serve/:treename
Required options
reason
treestatus#getTreeLogs(treename, callback)
Does a GET to
/self-serve/:treename/logs
Optional options
all
Docs build with node -e "require('./index').docs()"