Repository: jira-node/node-jira-client (js)

Issue:
Unable to get individual Versions
The JIRA v2 API allows you to get the details of a single version by sending a GET request to `version/{id}`. This is currently not possible with any library, including this one. 

Since I'm using this one for a project, PR incoming to fix this. 

(api ref: https://docs.atlassian.com/jira/REST/cloud/#api/2/version-getVersion)

Pull request description:
Add ability to get details of single version
Fixes #214 

Patch:
diff --git a/src/jira.js b/src/jira.js
index 5640d33..9f00f46 100644
--- a/src/jira.js
+++ b/src/jira.js
@@ -477,6 +477,18 @@ export default class JiraApi {
     })));
   }
 
+  /** Get details of single Version in project
+   * [Jira Doc](https://docs.atlassian.com/jira/REST/cloud/#api/2/version-getVersion)
+   * @name getVersion
+   * @function
+   * @param {string} version - The id of this version
+   */
+  getVersion(version) {
+    return this.doRequest(this.makeRequestHeader(this.makeUri({
+      pathname: `/version/${version}`,
+    })));
+  }
+
   /** Create a version
    * [Jira Doc](http://docs.atlassian.com/jira/REST/latest/#id288232)
    * @name createVersion


Test patch:
diff --git a/test/jira-tests.js b/test/jira-tests.js
index a5764fe..b133b36 100644
--- a/test/jira-tests.js
+++ b/test/jira-tests.js
@@ -476,6 +476,11 @@ describe('Jira API Tests', () => {
       result.should.eql('http://jira.somehost.com:8080/rest/api/2.0/issue/issueNumber/remotelink');
     });
 
+    it('getVersion hits proper url', async () => {
+      const result = await dummyURLCall('getVersion', ['someVersion']);
+      result.should.eql('http://jira.somehost.com:8080/rest/api/2.0/version/someVersion');
+    });
+
     it('getVersions hits proper url', async () => {
       const result = await dummyURLCall('getVersions', ['someProject']);
       result.should.eql('http://jira.somehost.com:8080/rest/api/2.0/project/someProject/versions');