Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
佳 邓
Gitlab4j Api
Commits
bbf3ee69
Commit
bbf3ee69
authored
May 21, 2017
by
Greg Messner
Committed by
GitHub
May 21, 2017
Browse files
Merge pull request #21 from matteofacchinetti/master
Added getIssues with page and per_page parameters
parents
dadd2da0
65720abb
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/gitlab4j/api/ProjectApi.java
View file @
bbf3ee69
...
@@ -682,7 +682,7 @@ public class ProjectApi extends AbstractApi {
...
@@ -682,7 +682,7 @@ public class ProjectApi extends AbstractApi {
}
}
/**
/**
* Get a list of project's issues.
* Get a list of project's issues.
Only returns the first page
*
*
* GET /projects/:id/issues
* GET /projects/:id/issues
*
*
...
@@ -695,4 +695,24 @@ public class ProjectApi extends AbstractApi {
...
@@ -695,4 +695,24 @@ public class ProjectApi extends AbstractApi {
return
(
response
.
readEntity
(
new
GenericType
<
List
<
Issue
>>()
{
return
(
response
.
readEntity
(
new
GenericType
<
List
<
Issue
>>()
{
}));
}));
}
}
/**
* Get a list of project's issues using the specified page and per page settings.
*
* GET /projects/:id/issues
*
* @param page the page to get
* @param perPage the number of issues per page
* @return the list of issues in the specified range
* @throws GitLabApiException if any exception occurs
*/
public
List
<
Issue
>
getIssues
(
Integer
projectId
,
int
page
,
int
perPage
)
throws
GitLabApiException
{
GitLabApiForm
formData
=
new
GitLabApiForm
()
.
withParam
(
"page"
,
page
,
false
)
.
withParam
(
"per_page"
,
perPage
,
false
);
Response
response
=
get
(
Response
.
Status
.
OK
,
formData
.
asMap
(),
"projects"
,
projectId
,
"issues"
);
return
(
response
.
readEntity
(
new
GenericType
<
List
<
Issue
>>()
{
}));
}
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment