@Path(value="/api/v3")
public interface GitLabApi
Modifier and Type | Method and Description |
---|---|
void |
acceptMergeRequest(String projectId,
Integer mergeRequestId,
String mergeCommitMessage,
boolean shouldRemoveSourceBranch) |
void |
addProjectHook(String projectId,
String url,
Boolean pushEvents,
Boolean mergeRequestEvents,
Boolean noteEvents) |
User |
addUser(String email,
String username,
String name,
String password) |
void |
changeBuildStatus(Integer projectId,
String sha,
BuildState state,
String ref,
String context,
String targetUrl,
String description) |
void |
changeBuildStatus(String projectId,
String sha,
BuildState state,
String ref,
String context,
String targetUrl,
String description) |
void |
createMergeRequest(Integer projectId,
String sourceBranch,
String targetBranch,
String title) |
void |
createMergeRequestNote(String projectId,
Integer mergeRequestId,
String body) |
Project |
createProject(String projectName) |
void |
deleteProject(String projectId) |
Branch |
getBranch(String projectId,
String branch) |
List<Branch> |
getBranches(String projectId) |
void |
getCommit(String projectId,
String sha) |
User |
getCurrentUser() |
List<MergeRequest> |
getMergeRequests(String projectId,
State state,
int page,
int perPage) |
Project |
getProject(String projectName) |
void |
headCurrentUser() |
Project |
updateProject(String projectId,
String name,
String path) |
User |
updateUser(String userId,
String email,
String username,
String name,
String password) |
@POST @Produces(value="application/json") @Path(value="/projects") Project createProject(@QueryParam(value="name") String projectName)
@POST @Produces(value="application/json") @Path(value="/projects/{projectId}/merge_requests") void createMergeRequest(@PathParam(value="projectId") Integer projectId, @QueryParam(value="source_branch") String sourceBranch, @QueryParam(value="target_branch") String targetBranch, @QueryParam(value="title") String title)
@GET @Produces(value="application/json") @Path(value="/projects/{projectName}") Project getProject(@PathParam(value="projectName") String projectName)
@PUT @Produces(value="application/json") @Path(value="/projects/{projectId}") Project updateProject(@PathParam(value="projectId") String projectId, @QueryParam(value="name") String name, @QueryParam(value="path") String path)
@DELETE @Path(value="/projects/{projectId}") void deleteProject(@PathParam(value="projectId") String projectId)
@POST @Produces(value="application/json") @Path(value="/projects/{projectId}/hooks") void addProjectHook(@PathParam(value="projectId") String projectId, @QueryParam(value="url") String url, @QueryParam(value="push_events") Boolean pushEvents, @QueryParam(value="merge_requests_events") Boolean mergeRequestEvents, @QueryParam(value="note_events") Boolean noteEvents)
@POST @Produces(value="application/json") @Path(value="/projects/{projectId}/statuses/{sha}") void changeBuildStatus(@PathParam(value="projectId") String projectId, @PathParam(value="sha") String sha, @QueryParam(value="state") BuildState state, @QueryParam(value="ref") String ref, @QueryParam(value="context") String context, @QueryParam(value="target_url") String targetUrl, @QueryParam(value="description") String description)
@POST @Produces(value="application/json") @Path(value="/projects/{projectId}/statuses/{sha}") void changeBuildStatus(@PathParam(value="projectId") Integer projectId, @PathParam(value="sha") String sha, @QueryParam(value="state") BuildState state, @QueryParam(value="ref") String ref, @QueryParam(value="context") String context, @QueryParam(value="target_url") String targetUrl, @QueryParam(value="description") String description)
@GET @Produces(value="application/json") @Path(value="/projects/{projectId}/repository/commits/{sha}") void getCommit(@PathParam(value="projectId") String projectId, @PathParam(value="sha") String sha)
@PUT @Produces(value="application/json") @Path(value="/projects/{projectId}/merge_request/{mergeRequestId}/merge") void acceptMergeRequest(@PathParam(value="projectId") String projectId, @PathParam(value="mergeRequestId") Integer mergeRequestId, @QueryParam(value="merge_commit_message") String mergeCommitMessage, @QueryParam(value="should_remove_source_branch") boolean shouldRemoveSourceBranch)
@POST @Produces(value="application/json") @Path(value="/projects/{projectId}/merge_requests/{mergeRequestId}/notes") void createMergeRequestNote(@PathParam(value="projectId") String projectId, @PathParam(value="mergeRequestId") Integer mergeRequestId, @QueryParam(value="body") String body)
@GET @Produces(value="application/json") @Path(value="/projects/{projectId}/merge_requests") List<MergeRequest> getMergeRequests(@PathParam(value="projectId") String projectId, @QueryParam(value="state") State state, @QueryParam(value="page") int page, @QueryParam(value="per_page") int perPage)
@GET @Produces(value="application/json") @Path(value="/projects/{projectId}/repository/branches") List<Branch> getBranches(@PathParam(value="projectId") String projectId)
@GET @Produces(value="application/json") @Path(value="/projects/{projectId}/repository/branches/{branch}") Branch getBranch(@PathParam(value="projectId") String projectId, @PathParam(value="branch") String branch)
@HEAD @Produces(value="application/json") @Path(value="/user") void headCurrentUser()
@GET @Produces(value="application/json") @Path(value="/user") User getCurrentUser()
@POST @Produces(value="application/json") @Path(value="/users") User addUser(@QueryParam(value="email") String email, @QueryParam(value="username") String username, @QueryParam(value="name") String name, @QueryParam(value="password") String password)
@PUT @Produces(value="application/json") @Path(value="/users/{userId}") User updateUser(@PathParam(value="userId") String userId, @QueryParam(value="email") String email, @QueryParam(value="username") String username, @QueryParam(value="name") String name, @QueryParam(value="password") String password)
Copyright © 2016. All rights reserved.