Git Product home page Git Product logo

bz-json.js's Introduction

bz-json.js

A JavaScript wrapper for the Bugzilla JSON-RPC API.

install

For node install with npm:

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.createClient();

bugzilla.getBug(678223, function(error, bug) {
  if (!error) {
    alert(bug.summary);
  }
});

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.createClient({
  url: "https://bugzilla.mozilla.org/jsonrpc.cgi",
  username: '[email protected]',
  password: 'secret'
});

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.

bz-json.js's People

Contributors

harthur avatar bpiec avatar pike avatar blakmatrix avatar jdm avatar

Watchers

James Cloos avatar qiu zuhui avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.