Skip to content

Commit

Permalink
feat: getVersions with query params
Browse files Browse the repository at this point in the history
  • Loading branch information
DevXiaolan committed Mar 8, 2022
1 parent 926aeb2 commit 603042f
Show file tree
Hide file tree
Showing 2 changed files with 4,176 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/jira.js
Original file line number Diff line number Diff line change
Expand Up @@ -555,10 +555,21 @@ export default class JiraApi {
* @name getVersions
* @function
* @param {string} project - A project key to get versions for
* @param {object} query - An object containing the query params
*/
getVersions(project) {
getVersions(project, query = {}) {
const {
startAt, maxResults, orderBy, query: keyword, status,
} = query;
return this.doRequest(this.makeRequestHeader(this.makeUri({
pathname: `/project/${project}/versions`,
query: {
startAt,
maxResults,
orderBy,
query: keyword,
status,
},
})));
}

Expand Down
Loading

0 comments on commit 603042f

Please sign in to comment.