Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jira-node/node-jira-client
A Node.js wrapper for the Jira REST API
https://github.com/jira-node/node-jira-client
jira jira-client nodejs
Last synced: 4 months ago
JSON representation
A Node.js wrapper for the Jira REST API
- Host: GitHub
- URL: https://github.com/jira-node/node-jira-client
- Owner: jira-node
- License: mit
- Created: 2015-12-03T15:02:21.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2024-03-19T11:12:25.000Z (11 months ago)
- Last Synced: 2024-10-25T02:15:20.558Z (4 months ago)
- Topics: jira, jira-client, nodejs
- Language: JavaScript
- Homepage: https://jira-node.github.io/
- Size: 2.03 MB
- Stars: 449
- Watchers: 19
- Forks: 170
- Open Issues: 44
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome - node-jira-client - A nodejs wrapper for the JIRA REST API (JavaScript)
README
# JavaScript JIRA API for node.js #
A node.js module, which provides an object oriented wrapper for the Jira Rest API.
[](https://jira-node.github.io/)
[](http://docs.atlassian.com/jira/REST/latest/)
[](https://github.com/jira-node/node-jira-client/actions)
[](https://www.npmjs.com/package/jira-client)
[](https://npmjs.com/jira-client)
[](https://packagephobia.now.sh/result?p=jira-client)
[](https://david-dm.org/jira-node/node-jira-client)
[](https://david-dm.org/jira-node/node-jira-client?type=dev)## Installation ##
Install with the node package manager [npm](http://npmjs.org):
```shell
$ npm install jira-client
```## Examples ##
### Create the JIRA client ###
```javascript
// With ES5
var JiraApi = require('jira-client');// With ES6
import JiraApi from 'jira-client';// Initialize
var jira = new JiraApi({
protocol: 'https',
host: 'jira.somehost.com',
username: 'username',
password: 'password',
apiVersion: '2',
strictSSL: true
});
```### Find the status of an issue ###
```javascript
// ES5
// We are using an ES5 Polyfill for Promise support. Please note that if you don't explicitly
// apply a catch exceptions will get swallowed. Read up on ES6 Promises for further details.
jira.findIssue(issueNumber)
.then(function(issue) {
console.log('Status: ' + issue.fields.status.name);
})
.catch(function(err) {
console.error(err);
});// ES6
jira.findIssue(issueNumber)
.then(issue => {
console.log(`Status: ${issue.fields.status.name}`);
})
.catch(err => {
console.error(err);
});// ES7
async function logIssueName() {
try {
const issue = await jira.findIssue(issueNumber);
console.log(`Status: ${issue.fields.status.name}`);
} catch (err) {
console.error(err);
}
}```
## Documentation ##
Can't find what you need in the readme? Check out our documentation here: https://jira-node.github.io/