Registry / devops / zenhub-api

zenhub-api

JSON →
library0.2.0jsnpmunverified

A Node.js wrapper for the ZenHub API, version 0.2.0. It provides an easy-to-use interface for interacting with ZenHub's project management features, including boards, issues, epics, pipelines, estimates, and release reports. The package uses CommonJS and is intended for Node.js environments. It offers 18 methods covering the full ZenHub API, but lacks TypeScript definitions and has seen no recent updates (last release in 2018).

npm install zenhub-api
INSTALL
IMPORT
SIG · ZENHUB-API
Z
zenhub-api
devopsjavascriptv0.2.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ZenHub
const ZenHub = require('zenhub-api');
import ZenHub from 'zenhub-api';
Package uses CommonJS; ES module import not supported natively.
ZenHub
const api = new ZenHub('your-api-key');
const api = new ZenHub();
Constructor requires an API key string as first argument.
ZenHub
api.getBoard({ repo_id: 123456 }).then(console.log);
api.getBoard('123456');
Methods expect an object parameter (e.g., { repo_id: number }) not a plain string or number.

Demonstrates CommonJS import, instantiation with API key, and calling getBoard with repo_id.

const ZenHub = require('zenhub-api'); const api = new ZenHub(process.env.ZENHUB_API_KEY ?? ''); api.getBoard({ repo_id: 123456 }) .then(board => { console.log('Board data:', JSON.stringify(board, null, 2)); }) .catch(err => { console.error('Error fetching board:', err); });
Debug
Known issues
breakingPackage uses CommonJS require() only; ESM import will fail.
fix
Use require() or configure a bundler that can convert CommonJS.
affects: >=0.0.0
gotchaAll API methods expect an object argument with specific keys; passing wrong types causes silent failures or unexpected errors.
fix
Always refer to the official ZenHub API docs for parameter shapes (e.g., { repo_id: number }).
affects: >=0.0.0
deprecatedThe package relies on node-fetch v2, which is deprecated and may have vulnerabilities.
fix
Consider using a more up-to-date alternative or pinning node-fetch@2.
affects: >=0.0.0
gotchaNo TypeScript definitions; type checking requires manual declaration or @types/zenhub-api which does not exist.
fix
Use with JavaScript or create custom .d.ts file.
affects: >=0.0.0
gotchaRepository IDs must be numeric; GitHub repo IDs (not GitHub project IDs).
fix
Check the number after the repository URL (e.g., GitHub API returns 'id' field).
affects: >=0.0.0
Errors
Common errors & fixes
SyntaxError: Cannot use import statement outside a module
Using ES6 import with this CommonJS-only package.
fix
Change to const ZenHub = require('zenhub-api');
TypeError: api.getBoard is not a function
Instantiating without new keyword or missing parentheses.
fix
Use new ZenHub(apiKey) and ensure proper method calls.
RequestError: getaddrinfo ENOTFOUND api.zenhub.com
Network issue or incorrect API endpoint (package uses hardcoded https://api.zenhub.com).
fix
Check internet connection and ensure you have access to ZenHub API.
Upgrade
Version history
0.2.0latest on npm
Audit
Dependencies
node-fetchrequiredUsed internally for HTTP requests
qsrequiredUsed for query string parsing
Agent activity
23 hits · last 30 days
node
20
Resources
zenhub-api — npm install zenhub-api · libregistry