Package Exports
- @atlassian/jira
- @atlassian/jira/src/utils/get-buffer-response-browser.js
- @atlassian/jira/src/utils/get-buffer-response.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@atlassian/jira) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Jira.js
JIRA API client for Browser and Node.js
This is a port of the excellent bitbucket library by Munif Tanjim: https://github.com/MunifTanjim/node-bitbucket
JIRA API docs: https://developer.atlassian.com/cloud/jira/platform/rest/v2/
Installation
via npm:
$ npm install @atlassian/jira --save
via yarn:
$ yarn add @atlassian/jira
Usage
Node
const JIRA = require('@atlassian/jira')
const jira = new JIRA()
Client Options
You can set the APIs' baseUrl
and modify some behaviors (e.g. request timeout etc.) by passing a clientOptions object to the JIRA
constructor.
const clientOptions = {
baseUrl: 'https://api.atlassian.com/ex/jira/${cloudId}/rest/',
headers: {},
options: {
timeout: 10
}
}
const jira = new JIRA(clientOptions)
This enables you to use jira
with Jira Cloud.
Authentication
Basic
jira.authenticate({
type: 'basic',
username: 'username',
password: 'password'
})
OAuth
jira.authenticate({
type: 'token',
token: 'access token'
})