1.0.4 • Published 7 years ago

jira-rest-client v1.0.4

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

JIRA REST API Client

A Javascript client to the JIRA Cloud REST API

NPM

Installation

npm install jira-rest-client

Usage

To write an script using the client

  • Require 'jira-rest-client' in your file

    var JiraClient = require('jira-rest-client');
  • Create a client with your server url.

    var client = new JiraClient('https://jira.atlassian.com');
  • Invoke the rest api resource with required parameters.

    client.getPermissions().then(function(permissions) {
        console.log(permissions);
    });

Reference

https://docs.atlassian.com/jira/REST/cloud/

All the resources from the API Reference are transformed into a single API object.

For example, given a resource

api/2/application-properties
    Get property
    Set property via restful table
    Get advanced settings

You can expect methods

* client['application-properties'].getProperty()
* client['application-properties'].setPropertyViaRestfulTable()
* client['application-properties'].getAdvancedSettings()

Methods can accept the following positional parameters

* Object [routeParams] - expected IFF the resource has route parameters
* String [body] - expected IFF the resource method is PUT/POST
* Object requestOptions - always accepted.

See request documentation for available requestOptions.

All methods return a promise.

License

MIT: License

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.0

7 years ago