npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

fogbugz

v0.3.2

Published

Talks to FogBugz' icky XML API for you

Downloads

16

Readme

node-fogbugz npm version Build Status Codacy Badge

Talks to FogBugz' icky XML API for you.

Installation

$npm install fogbugz

Configuration

Create a fogbugz.conf.json in your app's root directory. It should look like this:

{
  "host": "zzz.fogbugz.com",
  "username": "[email protected]",
  "password": "Password1"
}

Usage

var fogbugz = require('fogbugz');
fogbugz.logon()
 .then(function() {
   return fogbugz.getBug('12345');
 })
 .then(function(bug) {
    console.log(bug.title);
 });

API

fogbugz

var fogbugz = require('fogbugz');

fogbugz.forgetToken()

Forgets the stored token.

fogbugz.setToken(token)

Manually sets a login token if you have one by some other means.

Parameters

token: string, FogBugz API logon token

fogbugz.logoff()

Assuming you are logged in and have a cached token, this will log you out.

Returns

Function|promise|Q.promise, Promise

fogbugz.logon()

Logs you into FogBugz based on contents of fogbugz.conf.json.

Returns

Function|promise|Q.promise, Promise

fogbugz.listFilters()

Retrieves a list of Filters as an array. Each item in the array is of type Filter. Example:

[{"name": "My Cases", "type": "builtin", "id": "ez",
"url": "https://zzz.fogbugz.com/default.asp?pgx=LF&ixFilter=ez"}),
{"name": "Inbox", "type": "builtin", "id": "inbox",
 "url": "https://zzz.fogbugz.com/default.asp?pgx=LF&ixFilter=inbox"}]
Returns

Function|promise|Q.promise, Promise

fogbugz.setCurrentFilter(filter)

Sets the current Filter. Allows to call fogbugz.search() with an empty string as the 'query' paramenter to list all cases in the current filter.

Parameters

filter: Filter|string, Filter object or string ID

fogbugz.search(query, [cols], [max])

Performs a search against FogBugz's cases. Promise resolves to a Case object or an array of Case objects.

Parameters

query: string, Query string

[cols]: array, Fields to pull

[max]: number, Number of cases to get at once

Returns

Function|promise|Q.promise, Promise

fogbugz.getBug(id, [cols])

Gets a bug by ID

Parameters

id: string|number, ID of bug

[cols]: number, Cols to pull; defaults to everything

class fogbugz.Filter()

Filter pseudoclass

Parameters

obj: Object, Object representing Filter

fogbugz.Filter.setCurrent()

Sets the current filter to be this Filter

class fogbugz.Case()

Case pseudoclass. Stores original case data from server in its _raw property.

Parameters

obj: Object, Object representing Case

Author

Christopher Hiller

License

MIT