Skip to content

Commit b9fa725

Browse files
authored
Merge pull request #330 from MrLoh/add-get-sprint
Add Get Sprint Function
2 parents 285eb70 + 37f7976 commit b9fa725

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

src/jira.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,17 @@ export default class JiraApi {
441441
})));
442442
}
443443

444+
/** Get details about a Sprint
445+
* @name getSprint
446+
* @function
447+
* @param {string} sprintId - the id for the sprint view
448+
*/
449+
getSprint(sprintId) {
450+
return this.doRequest(this.makeRequestHeader(this.makeAgileUri({
451+
pathname: `/sprint/${sprintId}`,
452+
})));
453+
}
454+
444455
/** Add an issue to the project's current sprint
445456
* @name addIssueToSprint
446457
* @function
@@ -2114,4 +2125,16 @@ export default class JiraApi {
21142125
pathname: `/${endpoint}`,
21152126
})));
21162127
}
2128+
2129+
/** Generic Get Request to the Agile API
2130+
* [Jira Doc](https://docs.atlassian.com/jira-software/REST/cloud/2/)
2131+
* @name genericGet
2132+
* @function
2133+
* @param {string} endpoint - Rest API endpoint
2134+
*/
2135+
genericAgileGet(endpoint) {
2136+
return this.doRequest(this.makeRequestHeader(this.makeAgileUri({
2137+
pathname: `/${endpoint}`,
2138+
})));
2139+
}
21172140
}

0 commit comments

Comments
 (0)