bz-json.js
A JavaScript wrapper for the Bugzilla JSON-RPC API.
install
npm install bz-json
and use with var bz = require("bz-json")
For the browser, build a browser file from the source code with browserbuild: browserbuild bz-json.js
.
usage
var bugzilla = bz; bugzilla;
API
bz.createClient(options)
creates a new Bugzilla API client, optionally takes options like the JSON-RPC API url and username + password:
var bugzilla = bz;
Client methods
Each method takes a callback that takes an error message (if any kind of error occurs) as its first argument, and the expected return data as its second.
getBug(id, callback)
retrieves a bug given a bug id.