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
1a615c79
Commit
1a615c79
authored
Mar 17, 2017
by
Greg Messner
Committed by
GitHub
Mar 17, 2017
Browse files
Merge pull request #17 from matteofacchinetti/master
Add an API to get a list of project's issues
parents
fa32315d
07c3aab0
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/gitlab4j/api/ProjectApi.java
View file @
1a615c79
package
org.gitlab4j.api
;
package
org.gitlab4j.api
;
import
org.gitlab4j.api.models.Event
;
import
org.gitlab4j.api.models.Event
;
import
org.gitlab4j.api.models.Issue
;
import
org.gitlab4j.api.models.Member
;
import
org.gitlab4j.api.models.Member
;
import
org.gitlab4j.api.models.Project
;
import
org.gitlab4j.api.models.Project
;
import
org.gitlab4j.api.models.ProjectHook
;
import
org.gitlab4j.api.models.ProjectHook
;
...
@@ -460,4 +461,19 @@ public class ProjectApi extends AbstractApi {
...
@@ -460,4 +461,19 @@ public class ProjectApi extends AbstractApi {
Response
response
=
put
(
Response
.
Status
.
OK
,
formData
.
asMap
(),
"projects"
,
hook
.
getProjectId
(),
"hooks"
,
hook
.
getId
());
Response
response
=
put
(
Response
.
Status
.
OK
,
formData
.
asMap
(),
"projects"
,
hook
.
getProjectId
(),
"hooks"
,
hook
.
getId
());
return
(
response
.
readEntity
(
ProjectHook
.
class
));
return
(
response
.
readEntity
(
ProjectHook
.
class
));
}
}
/**
* Get a list of project's issues.
*
* GET /projects/:id/issues
*
* @param projectId
* @return a list of project's issues
* @throws GitLabApiException
*/
public
List
<
Issue
>
getIssues
(
Integer
projectId
)
throws
GitLabApiException
{
Response
response
=
get
(
Response
.
Status
.
OK
,
null
,
"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