Commit 1a615c79 authored by Greg Messner's avatar Greg Messner Committed by GitHub
Browse files

Merge pull request #17 from matteofacchinetti/master

Add an API to get a list of project's issues
parents fa32315d 07c3aab0
package org.gitlab4j.api;
import org.gitlab4j.api.models.Event;
import org.gitlab4j.api.models.Issue;
import org.gitlab4j.api.models.Member;
import org.gitlab4j.api.models.Project;
import org.gitlab4j.api.models.ProjectHook;
......@@ -460,4 +461,19 @@ public class ProjectApi extends AbstractApi {
Response response = put(Response.Status.OK, formData.asMap(), "projects", hook.getProjectId(), "hooks", hook.getId());
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>>() {
}));
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment