zenhub-client
v1.1.3
Published
ZenHub API wrapper
Downloads
27
Readme
Originally forked from https://github.com/ilbonzo/node-zenhub
zenhub-client
A promise-capable Node.js wrapper for the ZenHub API
Install
$ npm install --save zenhub-client
or
$ yarn add zenhub-client
Documentation
The official ZenHub documentation
Usage
In order to use zenhub-client
you will need to generate an API token on the ZenHub website.
Once installed you need to instantiate a new copy of zenhub-client
in your application, like so:
const ZenHubAPI = require('zenhub-client'),
myClient = new ZenHubAPI('[token]');
async function myAsyncFunction () {
let board = await myClient.boards.getBoard('[repoId]');
// do something with board
}
Available methods
Issues
Boards
Epics
Milestones
Release Reports
Running the Tests
The tests are based on the mocha
module, which may be installed via npm. To run the tests make sure that the
npm dependencies are installed by running npm install
from the project directory.
create file test/config.json from test/config.sample.json with your values
{
"token": "xxxxxxxxxx",
"repoId": "xxxxx",
"issueId": 1,
"milestoneNumber": 1,
"releaseId": "59d3cd520a430a6344fd3bdb"
}
At the moment, test classes can only be run separately. This will e.g. run the Issues Api test:
npm test
LICENSE
MIT license. See the LICENSE file for details.