Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bz

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bz

Bugzilla REST API wrapper

  • 0.2.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-75%
Maintainers
1
Weekly downloads
 
Created
Source

bz.js

A JavaScript wrapper for the Bugzilla REST API.

install

For node install with npm:

npm install bz

and use with var bz = require("bz")

For the browser, download the lastest bz.js. Or build a browser file from the source code with browserbuild: browserbuild lib/bz.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 REST API url and username + password:

var bugzilla = bz.createClient({
  url: "https://api-dev.bugzilla.mozilla.org/test/0.9/",
  username: 'bugs@bugmail.com',
  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.

searchBugs(searchParams, callback)
searches with given search parameters and fetches an array of bugs.

countBugs(searchParams, callback)
searches with given search parameters and gets a integer count of bugs matching that query.

createBug(bug, callback)
creates a bug and returns the id of the newly created bug.

updateBug(id, bug, callback)
updates a bug with new bug info.

bugComments(id, callback)
retrieves the comments for a bug.

addComment(id, comment, callback)
adds a comment to a bug.

bugHistory(id, callback)
retrieves array of changes for a bug.

bugFlags(id, callback)
retrieves array of flags for a bug.

bugAttachments(id, callback)
retrieves array of attachments for a bug.

createAttachment(bugId, attachment, callback)
creates an attachment on a bug, and returns the id of the newly created attachment.

getAttachment(attachId, callback)
gets an attachment given an attachment id.

updateAttachment(attachId, attachment, callback)
updates the attachment.

searchUsers(match, callback)
searches for users by string, matching against users' names or real names.

getUser(userId, callback)
retrieves a user given a user id.

getConfiguration(options, callback)
gets the configuration of this Bugzilla server.

Keywords

FAQs

Package last updated on 10 Mar 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc