repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
partition
stringclasses
1 value
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.getForks
public List<Project> getForks(Object projectIdOrPath) throws GitLabApiException { return (getForks(projectIdOrPath, getDefaultPerPage()).all()); }
java
public List<Project> getForks(Object projectIdOrPath) throws GitLabApiException { return (getForks(projectIdOrPath, getDefaultPerPage()).all()); }
[ "public", "List", "<", "Project", ">", "getForks", "(", "Object", "projectIdOrPath", ")", "throws", "GitLabApiException", "{", "return", "(", "getForks", "(", "projectIdOrPath", ",", "getDefaultPerPage", "(", ")", ")", ".", "all", "(", ")", ")", ";", "}" ]
Get a list of projects that were forked from the specified project. <pre><code>GET /projects/:id/forks</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @return a List of forked projects @throws GitLabApiException if any exception occurs
[ "Get", "a", "list", "of", "projects", "that", "were", "forked", "from", "the", "specified", "project", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L2277-L2279
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.getForks
public List<Project> getForks(Object projectIdOrPath, int page, int perPage) throws GitLabApiException { Response response = get(Response.Status.OK, getPageQueryParams(page, perPage),"projects", getProjectIdOrPath(projectIdOrPath), "forks"); return (response.readEntity(new GenericType<List<Project>>() { })); }
java
public List<Project> getForks(Object projectIdOrPath, int page, int perPage) throws GitLabApiException { Response response = get(Response.Status.OK, getPageQueryParams(page, perPage),"projects", getProjectIdOrPath(projectIdOrPath), "forks"); return (response.readEntity(new GenericType<List<Project>>() { })); }
[ "public", "List", "<", "Project", ">", "getForks", "(", "Object", "projectIdOrPath", ",", "int", "page", ",", "int", "perPage", ")", "throws", "GitLabApiException", "{", "Response", "response", "=", "get", "(", "Response", ".", "Status", ".", "OK", ",", "g...
Get a list of projects that were forked from the specified project and in the specified page range. <pre><code>GET /projects/:id/forks</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @param page the page to get @param perPage the number of projects per page @return a List of forked projects @throws GitLabApiException if any exception occurs
[ "Get", "a", "list", "of", "projects", "that", "were", "forked", "from", "the", "specified", "project", "and", "in", "the", "specified", "page", "range", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L2292-L2295
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.getForks
public Pager<Project> getForks(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException { return new Pager<Project>(this, Project.class, itemsPerPage, null, "projects", getProjectIdOrPath(projectIdOrPath), "forks"); }
java
public Pager<Project> getForks(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException { return new Pager<Project>(this, Project.class, itemsPerPage, null, "projects", getProjectIdOrPath(projectIdOrPath), "forks"); }
[ "public", "Pager", "<", "Project", ">", "getForks", "(", "Object", "projectIdOrPath", ",", "int", "itemsPerPage", ")", "throws", "GitLabApiException", "{", "return", "new", "Pager", "<", "Project", ">", "(", "this", ",", "Project", ".", "class", ",", "itemsP...
Get a Pager of projects that were forked from the specified project. <pre><code>GET /projects/:id/forks</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @param itemsPerPage the number of Project instances that will be fetched per page @return a Pager of projects @throws GitLabApiException if any exception occurs
[ "Get", "a", "Pager", "of", "projects", "that", "were", "forked", "from", "the", "specified", "project", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L2307-L2309
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.getForksStream
public Stream<Project> getForksStream(Object projectIdOrPath) throws GitLabApiException { return (getForks(projectIdOrPath, getDefaultPerPage()).stream()); }
java
public Stream<Project> getForksStream(Object projectIdOrPath) throws GitLabApiException { return (getForks(projectIdOrPath, getDefaultPerPage()).stream()); }
[ "public", "Stream", "<", "Project", ">", "getForksStream", "(", "Object", "projectIdOrPath", ")", "throws", "GitLabApiException", "{", "return", "(", "getForks", "(", "projectIdOrPath", ",", "getDefaultPerPage", "(", ")", ")", ".", "stream", "(", ")", ")", ";"...
Get a Stream of projects that were forked from the specified project. <pre><code>GET /projects/:id/forks</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @return a Stream of forked projects @throws GitLabApiException if any exception occurs
[ "Get", "a", "Stream", "of", "projects", "that", "were", "forked", "from", "the", "specified", "project", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L2320-L2322
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.starProject
public Project starProject(Object projectIdOrPath) throws GitLabApiException { Response.Status expectedStatus = (isApiVersion(ApiVersion.V3) ? Response.Status.OK : Response.Status.CREATED); Response response = post(expectedStatus, (Form) null, "projects", getProjectIdOrPath(projectIdOrPath), "star"); return (response.readEntity(Project.class)); }
java
public Project starProject(Object projectIdOrPath) throws GitLabApiException { Response.Status expectedStatus = (isApiVersion(ApiVersion.V3) ? Response.Status.OK : Response.Status.CREATED); Response response = post(expectedStatus, (Form) null, "projects", getProjectIdOrPath(projectIdOrPath), "star"); return (response.readEntity(Project.class)); }
[ "public", "Project", "starProject", "(", "Object", "projectIdOrPath", ")", "throws", "GitLabApiException", "{", "Response", ".", "Status", "expectedStatus", "=", "(", "isApiVersion", "(", "ApiVersion", ".", "V3", ")", "?", "Response", ".", "Status", ".", "OK", ...
Star a project. <pre><code>POST /projects/:id/star</code></pre> @param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path @return a Project instance with the new project info @throws GitLabApiException if any exception occurs
[ "Star", "a", "project", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L2333-L2337
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.getProjectLanguages
public Map<String, Float> getProjectLanguages(Object projectIdOrPath) throws GitLabApiException { Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "languages"); return (response.readEntity(new GenericType<Map<String, Float>>() {})); }
java
public Map<String, Float> getProjectLanguages(Object projectIdOrPath) throws GitLabApiException { Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "languages"); return (response.readEntity(new GenericType<Map<String, Float>>() {})); }
[ "public", "Map", "<", "String", ",", "Float", ">", "getProjectLanguages", "(", "Object", "projectIdOrPath", ")", "throws", "GitLabApiException", "{", "Response", "response", "=", "get", "(", "Response", ".", "Status", ".", "OK", ",", "null", ",", "\"projects\"...
Get languages used in a project with percentage value. <pre><code>GET /projects/:id/languages</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @return a Map instance with the language as the key and the percentage as the value @throws GitLabApiException if any exception occurs @since GitLab 10.8
[ "Get", "languages", "used", "in", "a", "project", "with", "percentage", "value", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L2364-L2367
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.transferProject
public Project transferProject(Object projectIdOrPath, String namespace) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm().withParam("namespace", namespace, true); Response response = put(Response.Status.OK, formData.asMap(), "projects", getProjectIdOrPath(projectIdOrPath), "transfer"); return (response.readEntity(Project.class)); }
java
public Project transferProject(Object projectIdOrPath, String namespace) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm().withParam("namespace", namespace, true); Response response = put(Response.Status.OK, formData.asMap(), "projects", getProjectIdOrPath(projectIdOrPath), "transfer"); return (response.readEntity(Project.class)); }
[ "public", "Project", "transferProject", "(", "Object", "projectIdOrPath", ",", "String", "namespace", ")", "throws", "GitLabApiException", "{", "GitLabApiForm", "formData", "=", "new", "GitLabApiForm", "(", ")", ".", "withParam", "(", "\"namespace\"", ",", "namespac...
Transfer a project to a new namespace. This was added in GitLab 11.1 <pre><code>PUT /projects/:id/transfer.</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @param namespace the namespace to transfer the project to @return the updated Project @throws GitLabApiException if any exception occurs
[ "Transfer", "a", "project", "to", "a", "new", "namespace", ".", "This", "was", "added", "in", "GitLab", "11", ".", "1" ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L2379-L2383
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.setProjectAvatar
public Project setProjectAvatar(Object projectIdOrPath, File avatarFile) throws GitLabApiException { Response response = putUpload(Response.Status.OK, "avatar", avatarFile, "projects", getProjectIdOrPath(projectIdOrPath)); return (response.readEntity(Project.class)); }
java
public Project setProjectAvatar(Object projectIdOrPath, File avatarFile) throws GitLabApiException { Response response = putUpload(Response.Status.OK, "avatar", avatarFile, "projects", getProjectIdOrPath(projectIdOrPath)); return (response.readEntity(Project.class)); }
[ "public", "Project", "setProjectAvatar", "(", "Object", "projectIdOrPath", ",", "File", "avatarFile", ")", "throws", "GitLabApiException", "{", "Response", "response", "=", "putUpload", "(", "Response", ".", "Status", ".", "OK", ",", "\"avatar\"", ",", "avatarFile...
Uploads and sets the project avatar for the specified project. <pre><code>PUT /projects/:id/uploads</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @param avatarFile the File instance of the avatar file to upload @return the updated Project instance @throws GitLabApiException if any exception occurs
[ "Uploads", "and", "sets", "the", "project", "avatar", "for", "the", "specified", "project", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L2395-L2398
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.getVariables
public List<Variable> getVariables(Object projectIdOrPath) throws GitLabApiException { return (getVariables(projectIdOrPath, getDefaultPerPage()).all()); }
java
public List<Variable> getVariables(Object projectIdOrPath) throws GitLabApiException { return (getVariables(projectIdOrPath, getDefaultPerPage()).all()); }
[ "public", "List", "<", "Variable", ">", "getVariables", "(", "Object", "projectIdOrPath", ")", "throws", "GitLabApiException", "{", "return", "(", "getVariables", "(", "projectIdOrPath", ",", "getDefaultPerPage", "(", ")", ")", ".", "all", "(", ")", ")", ";", ...
Get list of a project's variables. <pre><code>GitLab Endpoint: GET /groups/:id/variables</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @return a list of variables belonging to the specified project @throws GitLabApiException if any exception occurs
[ "Get", "list", "of", "a", "project", "s", "variables", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L2409-L2411
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.getVariables
public List<Variable> getVariables(Object projectIdOrPath, int page, int perPage) throws GitLabApiException { Response response = get(Response.Status.OK, getPageQueryParams(page, perPage), "projects", getProjectIdOrPath(projectIdOrPath), "variables"); return (response.readEntity(new GenericType<List<Variable>>() {})); }
java
public List<Variable> getVariables(Object projectIdOrPath, int page, int perPage) throws GitLabApiException { Response response = get(Response.Status.OK, getPageQueryParams(page, perPage), "projects", getProjectIdOrPath(projectIdOrPath), "variables"); return (response.readEntity(new GenericType<List<Variable>>() {})); }
[ "public", "List", "<", "Variable", ">", "getVariables", "(", "Object", "projectIdOrPath", ",", "int", "page", ",", "int", "perPage", ")", "throws", "GitLabApiException", "{", "Response", "response", "=", "get", "(", "Response", ".", "Status", ".", "OK", ",",...
Get a list of variables for the specified project in the specified page range. <pre><code>GitLab Endpoint: GET /projects/:id/variables</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @param page the page to get @param perPage the number of Variable instances per page @return a list of variables belonging to the specified project in the specified page range @throws GitLabApiException if any exception occurs
[ "Get", "a", "list", "of", "variables", "for", "the", "specified", "project", "in", "the", "specified", "page", "range", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L2424-L2427
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.getVariables
public Pager<Variable> getVariables(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException { return (new Pager<Variable>(this, Variable.class, itemsPerPage, null, "projects", getProjectIdOrPath(projectIdOrPath), "variables")); }
java
public Pager<Variable> getVariables(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException { return (new Pager<Variable>(this, Variable.class, itemsPerPage, null, "projects", getProjectIdOrPath(projectIdOrPath), "variables")); }
[ "public", "Pager", "<", "Variable", ">", "getVariables", "(", "Object", "projectIdOrPath", ",", "int", "itemsPerPage", ")", "throws", "GitLabApiException", "{", "return", "(", "new", "Pager", "<", "Variable", ">", "(", "this", ",", "Variable", ".", "class", ...
Get a Pager of variables belonging to the specified project. <pre><code>GitLab Endpoint: GET /projects/:id/variables</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @param itemsPerPage the number of Variable instances that will be fetched per page @return a Pager of variables belonging to the specified project @throws GitLabApiException if any exception occurs
[ "Get", "a", "Pager", "of", "variables", "belonging", "to", "the", "specified", "project", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L2439-L2441
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.getVariablesStream
public Stream<Variable> getVariablesStream(Object projectIdOrPath) throws GitLabApiException { return (getVariables(projectIdOrPath, getDefaultPerPage()).stream()); }
java
public Stream<Variable> getVariablesStream(Object projectIdOrPath) throws GitLabApiException { return (getVariables(projectIdOrPath, getDefaultPerPage()).stream()); }
[ "public", "Stream", "<", "Variable", ">", "getVariablesStream", "(", "Object", "projectIdOrPath", ")", "throws", "GitLabApiException", "{", "return", "(", "getVariables", "(", "projectIdOrPath", ",", "getDefaultPerPage", "(", ")", ")", ".", "stream", "(", ")", "...
Get a Stream of variables belonging to the specified project. <pre><code>GitLab Endpoint: GET /projects/:id/variables</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @return a Stream of variables belonging to the specified project @throws GitLabApiException if any exception occurs
[ "Get", "a", "Stream", "of", "variables", "belonging", "to", "the", "specified", "project", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L2452-L2454
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.getVariable
public Variable getVariable(Object projectIdOrPath, String key) throws GitLabApiException { Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "variables", key); return (response.readEntity(Variable.class)); }
java
public Variable getVariable(Object projectIdOrPath, String key) throws GitLabApiException { Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "variables", key); return (response.readEntity(Variable.class)); }
[ "public", "Variable", "getVariable", "(", "Object", "projectIdOrPath", ",", "String", "key", ")", "throws", "GitLabApiException", "{", "Response", "response", "=", "get", "(", "Response", ".", "Status", ".", "OK", ",", "null", ",", "\"projects\"", ",", "getPro...
Get the details of a project variable. <pre><code>GitLab Endpoint: GET /projects/:id/variables/:key</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @param key the key of an existing variable, required @return the Variable instance for the specified variable @throws GitLabApiException if any exception occurs
[ "Get", "the", "details", "of", "a", "project", "variable", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L2466-L2469
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.updateVariable
public Variable updateVariable(Object projectIdOrPath, String key, String value, Boolean isProtected, String environmentScope) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("value", value, true) .withParam("protected", isProtected) .withParam("environment_scope", environmentScope); Response response = putWithFormData(Response.Status.OK, formData, "projects", getProjectIdOrPath(projectIdOrPath), "variables", key); return (response.readEntity(Variable.class)); }
java
public Variable updateVariable(Object projectIdOrPath, String key, String value, Boolean isProtected, String environmentScope) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("value", value, true) .withParam("protected", isProtected) .withParam("environment_scope", environmentScope); Response response = putWithFormData(Response.Status.OK, formData, "projects", getProjectIdOrPath(projectIdOrPath), "variables", key); return (response.readEntity(Variable.class)); }
[ "public", "Variable", "updateVariable", "(", "Object", "projectIdOrPath", ",", "String", "key", ",", "String", "value", ",", "Boolean", "isProtected", ",", "String", "environmentScope", ")", "throws", "GitLabApiException", "{", "GitLabApiForm", "formData", "=", "new...
Update a project variable. <p>NOTE: Updating the environmentScope is only available on GitLab EE.</p> <pre><code>GitLab Endpoint: PUT /projects/:id/variables/:key</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @param key the key of an existing variable, required @param value the value for the variable, required @param isProtected whether the variable is protected, optional @param environmentScope the environment_scope of the variable, optional. @return a Variable instance with the updated variable @throws GitLabApiException if any exception occurs during execution
[ "Update", "a", "project", "variable", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L2561-L2569
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.deleteVariable
public void deleteVariable(Object projectIdOrPath, String key) throws GitLabApiException { delete(Response.Status.NO_CONTENT, null, "projects", getProjectIdOrPath(projectIdOrPath), "variables", key); }
java
public void deleteVariable(Object projectIdOrPath, String key) throws GitLabApiException { delete(Response.Status.NO_CONTENT, null, "projects", getProjectIdOrPath(projectIdOrPath), "variables", key); }
[ "public", "void", "deleteVariable", "(", "Object", "projectIdOrPath", ",", "String", "key", ")", "throws", "GitLabApiException", "{", "delete", "(", "Response", ".", "Status", ".", "NO_CONTENT", ",", "null", ",", "\"projects\"", ",", "getProjectIdOrPath", "(", "...
Deletes a project variable. <pre><code>DELETE /projects/:id/variables/:key</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @param key the key of an existing variable, required @throws GitLabApiException if any exception occurs
[ "Deletes", "a", "project", "variable", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L2580-L2582
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/utils/HttpRequestUtils.java
HttpRequestUtils.getShortRequestDump
public static String getShortRequestDump(String fromMethod, HttpServletRequest request) { return (getShortRequestDump(fromMethod, false, request)); }
java
public static String getShortRequestDump(String fromMethod, HttpServletRequest request) { return (getShortRequestDump(fromMethod, false, request)); }
[ "public", "static", "String", "getShortRequestDump", "(", "String", "fromMethod", ",", "HttpServletRequest", "request", ")", "{", "return", "(", "getShortRequestDump", "(", "fromMethod", ",", "false", ",", "request", ")", ")", ";", "}" ]
Build a String containing a very short multi-line dump of an HTTP request. @param fromMethod the method that this method was called from @param request the HTTP request build the request dump from @return a String containing a very short multi-line dump of the HTTP request
[ "Build", "a", "String", "containing", "a", "very", "short", "multi", "-", "line", "dump", "of", "an", "HTTP", "request", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/utils/HttpRequestUtils.java#L20-L22
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/utils/HttpRequestUtils.java
HttpRequestUtils.getShortRequestDump
public static String getShortRequestDump(String fromMethod, boolean includeHeaders, HttpServletRequest request) { StringBuilder dump = new StringBuilder(); dump.append("Timestamp : ").append(ISO8601.getTimestamp()).append("\n"); dump.append("fromMethod : ").append(fromMethod).append("\n"); dump.append("Method : ").append(request.getMethod()).append('\n'); dump.append("Scheme : ").append(request.getScheme()).append('\n'); dump.append("URI : ").append(request.getRequestURI()).append('\n'); dump.append("Query-String : ").append(request.getQueryString()).append('\n'); dump.append("Auth-Type : ").append(request.getAuthType()).append('\n'); dump.append("Remote-Addr : ").append(request.getRemoteAddr()).append('\n'); dump.append("Scheme : ").append(request.getScheme()).append('\n'); dump.append("Content-Type : ").append(request.getContentType()).append('\n'); dump.append("Content-Length: ").append(request.getContentLength()).append('\n'); if (includeHeaders) { dump.append("Headers :\n"); Enumeration<String> headers = request.getHeaderNames(); while (headers.hasMoreElements()) { String header = headers.nextElement(); dump.append("\t").append(header).append(": ").append(request.getHeader(header)).append('\n'); } } return (dump.toString()); }
java
public static String getShortRequestDump(String fromMethod, boolean includeHeaders, HttpServletRequest request) { StringBuilder dump = new StringBuilder(); dump.append("Timestamp : ").append(ISO8601.getTimestamp()).append("\n"); dump.append("fromMethod : ").append(fromMethod).append("\n"); dump.append("Method : ").append(request.getMethod()).append('\n'); dump.append("Scheme : ").append(request.getScheme()).append('\n'); dump.append("URI : ").append(request.getRequestURI()).append('\n'); dump.append("Query-String : ").append(request.getQueryString()).append('\n'); dump.append("Auth-Type : ").append(request.getAuthType()).append('\n'); dump.append("Remote-Addr : ").append(request.getRemoteAddr()).append('\n'); dump.append("Scheme : ").append(request.getScheme()).append('\n'); dump.append("Content-Type : ").append(request.getContentType()).append('\n'); dump.append("Content-Length: ").append(request.getContentLength()).append('\n'); if (includeHeaders) { dump.append("Headers :\n"); Enumeration<String> headers = request.getHeaderNames(); while (headers.hasMoreElements()) { String header = headers.nextElement(); dump.append("\t").append(header).append(": ").append(request.getHeader(header)).append('\n'); } } return (dump.toString()); }
[ "public", "static", "String", "getShortRequestDump", "(", "String", "fromMethod", ",", "boolean", "includeHeaders", ",", "HttpServletRequest", "request", ")", "{", "StringBuilder", "dump", "=", "new", "StringBuilder", "(", ")", ";", "dump", ".", "append", "(", "...
Build a String containing a short multi-line dump of an HTTP request. @param fromMethod the method that this method was called from @param request the HTTP request build the request dump from @param includeHeaders if true will include the HTTP headers in the dump @return a String containing a short multi-line dump of the HTTP request
[ "Build", "a", "String", "containing", "a", "short", "multi", "-", "line", "dump", "of", "an", "HTTP", "request", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/utils/HttpRequestUtils.java#L32-L57
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/utils/HttpRequestUtils.java
HttpRequestUtils.getRequestDump
public static String getRequestDump(String fromMethod, HttpServletRequest request, boolean includePostData) { String shortDump = getShortRequestDump(fromMethod, request); StringBuilder buf = new StringBuilder(shortDump); try { buf.append("\nAttributes:\n"); Enumeration<String> attrs = request.getAttributeNames(); while (attrs.hasMoreElements()) { String attr = attrs.nextElement(); buf.append("\t").append(attr).append(": ").append(request.getAttribute(attr)).append('\n'); } buf.append("\nHeaders:\n"); Enumeration<String> headers = request.getHeaderNames(); while (headers.hasMoreElements()) { String header = headers.nextElement(); buf.append("\t").append(header).append(": ").append(request.getHeader(header)).append('\n'); } buf.append("\nParameters:\n"); Enumeration<String> params = request.getParameterNames(); while (params.hasMoreElements()) { String param = params.nextElement(); buf.append("\t").append(param).append(": ").append(request.getParameter(param)).append('\n'); } buf.append("\nCookies:\n"); Cookie[] cookies = request.getCookies(); if (cookies != null) { for (Cookie cookie : cookies) { String cstr = "\t" + cookie.getDomain() + "." + cookie.getPath() + "." + cookie.getName() + ": " + cookie.getValue() + "\n"; buf.append(cstr); } } if (includePostData) { buf.append(getPostDataAsString(request)).append("\n"); } return (buf.toString()); } catch (IOException e) { return e.getMessage(); } }
java
public static String getRequestDump(String fromMethod, HttpServletRequest request, boolean includePostData) { String shortDump = getShortRequestDump(fromMethod, request); StringBuilder buf = new StringBuilder(shortDump); try { buf.append("\nAttributes:\n"); Enumeration<String> attrs = request.getAttributeNames(); while (attrs.hasMoreElements()) { String attr = attrs.nextElement(); buf.append("\t").append(attr).append(": ").append(request.getAttribute(attr)).append('\n'); } buf.append("\nHeaders:\n"); Enumeration<String> headers = request.getHeaderNames(); while (headers.hasMoreElements()) { String header = headers.nextElement(); buf.append("\t").append(header).append(": ").append(request.getHeader(header)).append('\n'); } buf.append("\nParameters:\n"); Enumeration<String> params = request.getParameterNames(); while (params.hasMoreElements()) { String param = params.nextElement(); buf.append("\t").append(param).append(": ").append(request.getParameter(param)).append('\n'); } buf.append("\nCookies:\n"); Cookie[] cookies = request.getCookies(); if (cookies != null) { for (Cookie cookie : cookies) { String cstr = "\t" + cookie.getDomain() + "." + cookie.getPath() + "." + cookie.getName() + ": " + cookie.getValue() + "\n"; buf.append(cstr); } } if (includePostData) { buf.append(getPostDataAsString(request)).append("\n"); } return (buf.toString()); } catch (IOException e) { return e.getMessage(); } }
[ "public", "static", "String", "getRequestDump", "(", "String", "fromMethod", ",", "HttpServletRequest", "request", ",", "boolean", "includePostData", ")", "{", "String", "shortDump", "=", "getShortRequestDump", "(", "fromMethod", ",", "request", ")", ";", "StringBui...
Build a String containing a multi-line dump of an HTTP request. @param fromMethod the method that this method was called from @param request the HTTP request build the request dump from @param includePostData if true will include the POST data in the dump @return a String containing a multi-line dump of the HTTP request, If an error occurs, the message from the exception will be returned
[ "Build", "a", "String", "containing", "a", "multi", "-", "line", "dump", "of", "an", "HTTP", "request", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/utils/HttpRequestUtils.java#L68-L113
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/utils/HttpRequestUtils.java
HttpRequestUtils.getPostDataAsString
public static String getPostDataAsString(HttpServletRequest request) throws IOException { try (InputStreamReader reader = new InputStreamReader(request.getInputStream(), "UTF-8")) { return (getReaderContentAsString(reader)); } }
java
public static String getPostDataAsString(HttpServletRequest request) throws IOException { try (InputStreamReader reader = new InputStreamReader(request.getInputStream(), "UTF-8")) { return (getReaderContentAsString(reader)); } }
[ "public", "static", "String", "getPostDataAsString", "(", "HttpServletRequest", "request", ")", "throws", "IOException", "{", "try", "(", "InputStreamReader", "reader", "=", "new", "InputStreamReader", "(", "request", ".", "getInputStream", "(", ")", ",", "\"UTF-8\"...
Reads the POST data from a request into a String and returns it. @param request the HTTP request containing the POST data @return the POST data as a String instance @throws IOException if any error occurs while reading the POST data
[ "Reads", "the", "POST", "data", "from", "a", "request", "into", "a", "String", "and", "returns", "it", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/utils/HttpRequestUtils.java#L122-L127
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/utils/HttpRequestUtils.java
HttpRequestUtils.getReaderContentAsString
public static String getReaderContentAsString(Reader reader) throws IOException { int count; final char[] buffer = new char[2048]; final StringBuilder out = new StringBuilder(); while ((count = reader.read(buffer, 0, buffer.length)) >= 0) { out.append(buffer, 0, count); } return (out.toString()); }
java
public static String getReaderContentAsString(Reader reader) throws IOException { int count; final char[] buffer = new char[2048]; final StringBuilder out = new StringBuilder(); while ((count = reader.read(buffer, 0, buffer.length)) >= 0) { out.append(buffer, 0, count); } return (out.toString()); }
[ "public", "static", "String", "getReaderContentAsString", "(", "Reader", "reader", ")", "throws", "IOException", "{", "int", "count", ";", "final", "char", "[", "]", "buffer", "=", "new", "char", "[", "2048", "]", ";", "final", "StringBuilder", "out", "=", ...
Reads the content of a Reader instance and returns it as a String. @param reader the Reader instance to read the data from @return the content of a Reader instance as a String @throws IOException if any error occurs while reading the POST data
[ "Reads", "the", "content", "of", "a", "Reader", "instance", "and", "returns", "it", "as", "a", "String", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/utils/HttpRequestUtils.java#L136-L146
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/models/RepositoryFile.java
RepositoryFile.encodeAndSetContent
@JsonIgnore public void encodeAndSetContent(String content) { encodeAndSetContent(content != null ? content.getBytes() : null); }
java
@JsonIgnore public void encodeAndSetContent(String content) { encodeAndSetContent(content != null ? content.getBytes() : null); }
[ "@", "JsonIgnore", "public", "void", "encodeAndSetContent", "(", "String", "content", ")", "{", "encodeAndSetContent", "(", "content", "!=", "null", "?", "content", ".", "getBytes", "(", ")", ":", "null", ")", ";", "}" ]
Encodes the provided String using Base64 and sets it as the content. The encoding property of this instance will be set to base64. @param content the String content to encode and set as the base64 encoded String content
[ "Encodes", "the", "provided", "String", "using", "Base64", "and", "sets", "it", "as", "the", "content", ".", "The", "encoding", "property", "of", "this", "instance", "will", "be", "set", "to", "base64", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/models/RepositoryFile.java#L140-L143
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/models/RepositoryFile.java
RepositoryFile.encodeAndSetContent
@JsonIgnore public void encodeAndSetContent(byte[] byteContent) { if (byteContent == null) { this.content = null; return; } this.content = Base64.getEncoder().encodeToString(byteContent); encoding = "base64"; }
java
@JsonIgnore public void encodeAndSetContent(byte[] byteContent) { if (byteContent == null) { this.content = null; return; } this.content = Base64.getEncoder().encodeToString(byteContent); encoding = "base64"; }
[ "@", "JsonIgnore", "public", "void", "encodeAndSetContent", "(", "byte", "[", "]", "byteContent", ")", "{", "if", "(", "byteContent", "==", "null", ")", "{", "this", ".", "content", "=", "null", ";", "return", ";", "}", "this", ".", "content", "=", "Ba...
Encodes the provided byte array using Base64 and sets it as the content. The encoding property of this instance will be set to base64. @param byteContent the byte[] content to encode and set as the base64 encoded String content
[ "Encodes", "the", "provided", "byte", "array", "using", "Base64", "and", "sets", "it", "as", "the", "content", ".", "The", "encoding", "property", "of", "this", "instance", "will", "be", "set", "to", "base64", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/models/RepositoryFile.java#L151-L161
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/WikisApi.java
WikisApi.getPages
public List<WikiPage> getPages(Object projectIdOrPath, int page, int perPage) throws GitLabApiException { Response response = get(Response.Status.OK, getPageQueryParams(page, perPage), "projects", getProjectIdOrPath(projectIdOrPath), "wikis"); return response.readEntity(new GenericType<List<WikiPage>>() {}); }
java
public List<WikiPage> getPages(Object projectIdOrPath, int page, int perPage) throws GitLabApiException { Response response = get(Response.Status.OK, getPageQueryParams(page, perPage), "projects", getProjectIdOrPath(projectIdOrPath), "wikis"); return response.readEntity(new GenericType<List<WikiPage>>() {}); }
[ "public", "List", "<", "WikiPage", ">", "getPages", "(", "Object", "projectIdOrPath", ",", "int", "page", ",", "int", "perPage", ")", "throws", "GitLabApiException", "{", "Response", "response", "=", "get", "(", "Response", ".", "Status", ".", "OK", ",", "...
Get a list of pages in project wiki for the specified page. <pre><code>GitLab Endpoint: GET /projects/:id/wikis</code></pre> @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @param page the page to get @param perPage the number of wiki-pages per page @return a list of pages in project's wiki for the specified range @throws GitLabApiException if any exception occurs
[ "Get", "a", "list", "of", "pages", "in", "project", "wiki", "for", "the", "specified", "page", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/WikisApi.java#L73-L77
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/WikisApi.java
WikisApi.getPage
public WikiPage getPage(Object projectIdOrPath, String slug) throws GitLabApiException { Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "wikis", slug); return (response.readEntity(WikiPage.class)); }
java
public WikiPage getPage(Object projectIdOrPath, String slug) throws GitLabApiException { Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "wikis", slug); return (response.readEntity(WikiPage.class)); }
[ "public", "WikiPage", "getPage", "(", "Object", "projectIdOrPath", ",", "String", "slug", ")", "throws", "GitLabApiException", "{", "Response", "response", "=", "get", "(", "Response", ".", "Status", ".", "OK", ",", "null", ",", "\"projects\"", ",", "getProjec...
Get a single page of project wiki. <pre><code>GitLab Endpoint: GET /projects/:id/wikis/:slug</code></pre> @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @param slug the slug of the project's wiki page @return the specified project Snippet @throws GitLabApiException if any exception occurs
[ "Get", "a", "single", "page", "of", "project", "wiki", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/WikisApi.java#L89-L93
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/WikisApi.java
WikisApi.getOptionalPage
public Optional<WikiPage> getOptionalPage(Object projectIdOrPath, String slug) { try { return (Optional.ofNullable(getPage(projectIdOrPath, slug))); } catch (GitLabApiException glae) { return (GitLabApi.createOptionalFromException(glae)); } }
java
public Optional<WikiPage> getOptionalPage(Object projectIdOrPath, String slug) { try { return (Optional.ofNullable(getPage(projectIdOrPath, slug))); } catch (GitLabApiException glae) { return (GitLabApi.createOptionalFromException(glae)); } }
[ "public", "Optional", "<", "WikiPage", ">", "getOptionalPage", "(", "Object", "projectIdOrPath", ",", "String", "slug", ")", "{", "try", "{", "return", "(", "Optional", ".", "ofNullable", "(", "getPage", "(", "projectIdOrPath", ",", "slug", ")", ")", ")", ...
Get a single page of project wiki as an Optional instance. <pre><code>GitLab Endpoint: GET /projects/:id/wikis/:slug</code></pre> @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @param slug the slug of the project's wiki page @return the specified project Snippet as an Optional instance
[ "Get", "a", "single", "page", "of", "project", "wiki", "as", "an", "Optional", "instance", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/WikisApi.java#L104-L110
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/WikisApi.java
WikisApi.createPage
public WikiPage createPage(Object projectIdOrPath, String title, String content) throws GitLabApiException { // one of title or content is required GitLabApiForm formData = new GitLabApiForm() .withParam("title", title) .withParam("content", content); Response response = post(Response.Status.CREATED, formData, "projects", getProjectIdOrPath(projectIdOrPath), "wikis"); return (response.readEntity(WikiPage.class)); }
java
public WikiPage createPage(Object projectIdOrPath, String title, String content) throws GitLabApiException { // one of title or content is required GitLabApiForm formData = new GitLabApiForm() .withParam("title", title) .withParam("content", content); Response response = post(Response.Status.CREATED, formData, "projects", getProjectIdOrPath(projectIdOrPath), "wikis"); return (response.readEntity(WikiPage.class)); }
[ "public", "WikiPage", "createPage", "(", "Object", "projectIdOrPath", ",", "String", "title", ",", "String", "content", ")", "throws", "GitLabApiException", "{", "// one of title or content is required", "GitLabApiForm", "formData", "=", "new", "GitLabApiForm", "(", ")"...
Creates a new project wiki page. The user must have permission to create new wiki page. <pre><code>GitLab Endpoint: POST /projects/:id/wikis</code></pre> @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @param title the title of a snippet, required @param content the content of a wiki page, required @return a WikiPage instance with info on the created page @throws GitLabApiException if any exception occurs
[ "Creates", "a", "new", "project", "wiki", "page", ".", "The", "user", "must", "have", "permission", "to", "create", "new", "wiki", "page", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/WikisApi.java#L123-L132
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/WikisApi.java
WikisApi.updatePage
public WikiPage updatePage(Object projectIdOrPath, String slug, String title, String content) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("title", title) .withParam("slug", slug, true) .withParam("content", content); Response response = put(Response.Status.OK, formData.asMap(), "projects", getProjectIdOrPath(projectIdOrPath), "wikis", slug); return (response.readEntity(WikiPage.class)); }
java
public WikiPage updatePage(Object projectIdOrPath, String slug, String title, String content) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("title", title) .withParam("slug", slug, true) .withParam("content", content); Response response = put(Response.Status.OK, formData.asMap(), "projects", getProjectIdOrPath(projectIdOrPath), "wikis", slug); return (response.readEntity(WikiPage.class)); }
[ "public", "WikiPage", "updatePage", "(", "Object", "projectIdOrPath", ",", "String", "slug", ",", "String", "title", ",", "String", "content", ")", "throws", "GitLabApiException", "{", "GitLabApiForm", "formData", "=", "new", "GitLabApiForm", "(", ")", ".", "wit...
Updates an existing project wiki page. The user must have permission to change an existing wiki page. <pre><code>GitLab Endpoint: PUT /projects/:id/wikis/:slug</code></pre> @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @param slug the slug of the project's wiki page, required @param title the title of a snippet, optional @param content the content of a page, optional. Either title or content must be supplied. @return a WikiPage instance with info on the updated page @throws GitLabApiException if any exception occurs
[ "Updates", "an", "existing", "project", "wiki", "page", ".", "The", "user", "must", "have", "permission", "to", "change", "an", "existing", "wiki", "page", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/WikisApi.java#L146-L155
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/WikisApi.java
WikisApi.deletePage
public void deletePage(Object projectIdOrPath, String slug) throws GitLabApiException { delete(Response.Status.NO_CONTENT, null, "projects", getProjectIdOrPath(projectIdOrPath), "wikis", slug); }
java
public void deletePage(Object projectIdOrPath, String slug) throws GitLabApiException { delete(Response.Status.NO_CONTENT, null, "projects", getProjectIdOrPath(projectIdOrPath), "wikis", slug); }
[ "public", "void", "deletePage", "(", "Object", "projectIdOrPath", ",", "String", "slug", ")", "throws", "GitLabApiException", "{", "delete", "(", "Response", ".", "Status", ".", "NO_CONTENT", ",", "null", ",", "\"projects\"", ",", "getProjectIdOrPath", "(", "pro...
Deletes an existing project wiki page. This is an idempotent function and deleting a non-existent page does not cause an error. <pre><code>GitLab Endpoint: DELETE /projects/:id/wikis/:slug</code></pre> @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @param slug the slug of the project's wiki page @throws GitLabApiException if any exception occurs
[ "Deletes", "an", "existing", "project", "wiki", "page", ".", "This", "is", "an", "idempotent", "function", "and", "deleting", "a", "non", "-", "existent", "page", "does", "not", "cause", "an", "error", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/WikisApi.java#L167-L169
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProtectedBranchesApi.java
ProtectedBranchesApi.getProtectedBranches
public List<ProtectedBranch> getProtectedBranches(Object projectIdOrPath) throws GitLabApiException { return (getProtectedBranches(projectIdOrPath, this.getDefaultPerPage()).all()); }
java
public List<ProtectedBranch> getProtectedBranches(Object projectIdOrPath) throws GitLabApiException { return (getProtectedBranches(projectIdOrPath, this.getDefaultPerPage()).all()); }
[ "public", "List", "<", "ProtectedBranch", ">", "getProtectedBranches", "(", "Object", "projectIdOrPath", ")", "throws", "GitLabApiException", "{", "return", "(", "getProtectedBranches", "(", "projectIdOrPath", ",", "this", ".", "getDefaultPerPage", "(", ")", ")", "....
Gets a list of protected branches from a project. <pre><code>GitLab Endpoint: GET /projects/:id/protected_branches</code></pre> @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @return the list of protected branches for the project @throws GitLabApiException if any exception occurs
[ "Gets", "a", "list", "of", "protected", "branches", "from", "a", "project", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProtectedBranchesApi.java#L27-L29
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProtectedBranchesApi.java
ProtectedBranchesApi.getProtectedBranches
public Pager<ProtectedBranch> getProtectedBranches(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException { return (new Pager<ProtectedBranch>(this, ProtectedBranch.class, itemsPerPage, null, "projects", getProjectIdOrPath(projectIdOrPath), "protected_branches")); }
java
public Pager<ProtectedBranch> getProtectedBranches(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException { return (new Pager<ProtectedBranch>(this, ProtectedBranch.class, itemsPerPage, null, "projects", getProjectIdOrPath(projectIdOrPath), "protected_branches")); }
[ "public", "Pager", "<", "ProtectedBranch", ">", "getProtectedBranches", "(", "Object", "projectIdOrPath", ",", "int", "itemsPerPage", ")", "throws", "GitLabApiException", "{", "return", "(", "new", "Pager", "<", "ProtectedBranch", ">", "(", "this", ",", "Protected...
Gets a Pager of protected branches from a project. <pre><code>GitLab Endpoint: GET /projects/:id/protected_branches</code></pre> @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @param itemsPerPage the number of instances that will be fetched per page @return the Pager of protected branches for the project @throws GitLabApiException if any exception occurs
[ "Gets", "a", "Pager", "of", "protected", "branches", "from", "a", "project", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProtectedBranchesApi.java#L41-L44
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProtectedBranchesApi.java
ProtectedBranchesApi.getProtectedBranchesStream
public Stream<ProtectedBranch> getProtectedBranchesStream(Object projectIdOrPath) throws GitLabApiException { return (getProtectedBranches(projectIdOrPath, this.getDefaultPerPage()).stream()); }
java
public Stream<ProtectedBranch> getProtectedBranchesStream(Object projectIdOrPath) throws GitLabApiException { return (getProtectedBranches(projectIdOrPath, this.getDefaultPerPage()).stream()); }
[ "public", "Stream", "<", "ProtectedBranch", ">", "getProtectedBranchesStream", "(", "Object", "projectIdOrPath", ")", "throws", "GitLabApiException", "{", "return", "(", "getProtectedBranches", "(", "projectIdOrPath", ",", "this", ".", "getDefaultPerPage", "(", ")", "...
Gets a Stream of protected branches from a project. <pre><code>GitLab Endpoint: GET /projects/:id/protected_branches</code></pre> @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @return the Stream of protected branches for the project @throws GitLabApiException if any exception occurs
[ "Gets", "a", "Stream", "of", "protected", "branches", "from", "a", "project", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProtectedBranchesApi.java#L55-L57
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProtectedBranchesApi.java
ProtectedBranchesApi.unprotectBranch
public void unprotectBranch(Integer projectIdOrPath, String branchName) throws GitLabApiException { delete(Response.Status.NO_CONTENT, null, "projects", getProjectIdOrPath(projectIdOrPath), "protected_branches", urlEncode(branchName)); }
java
public void unprotectBranch(Integer projectIdOrPath, String branchName) throws GitLabApiException { delete(Response.Status.NO_CONTENT, null, "projects", getProjectIdOrPath(projectIdOrPath), "protected_branches", urlEncode(branchName)); }
[ "public", "void", "unprotectBranch", "(", "Integer", "projectIdOrPath", ",", "String", "branchName", ")", "throws", "GitLabApiException", "{", "delete", "(", "Response", ".", "Status", ".", "NO_CONTENT", ",", "null", ",", "\"projects\"", ",", "getProjectIdOrPath", ...
Unprotects the given protected branch or wildcard protected branch. <pre><code>GitLab Endpoint: DELETE /projects/:id/protected_branches/:name</code></pre> @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @param branchName the name of the branch to un-protect @throws GitLabApiException if any exception occurs
[ "Unprotects", "the", "given", "protected", "branch", "or", "wildcard", "protected", "branch", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProtectedBranchesApi.java#L68-L70
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/CommitsApi.java
CommitsApi.getCommits
public List<Commit> getCommits(Object projectIdOrPath, String ref, String path) throws GitLabApiException { return (getCommits(projectIdOrPath, ref, null, null, path, getDefaultPerPage()).all()); }
java
public List<Commit> getCommits(Object projectIdOrPath, String ref, String path) throws GitLabApiException { return (getCommits(projectIdOrPath, ref, null, null, path, getDefaultPerPage()).all()); }
[ "public", "List", "<", "Commit", ">", "getCommits", "(", "Object", "projectIdOrPath", ",", "String", "ref", ",", "String", "path", ")", "throws", "GitLabApiException", "{", "return", "(", "getCommits", "(", "projectIdOrPath", ",", "ref", ",", "null", ",", "n...
Get a list of file commits in a project <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits?path=:file_path</code></pre> @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @param ref the name of a repository branch or tag or if not given the default branch @param path the path to file of a project @return a list containing the commits for the specified project ID and file @throws GitLabApiException GitLabApiException if any exception occurs during execution
[ "Get", "a", "list", "of", "file", "commits", "in", "a", "project" ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/CommitsApi.java#L116-L118
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/CommitsApi.java
CommitsApi.getCommits
public Pager<Commit> getCommits(Object projectIdOrPath, String ref, Date since, Date until, String path, int itemsPerPage) throws GitLabApiException { Form formData = new GitLabApiForm() .withParam("ref_name", ref) .withParam("since", ISO8601.toString(since, false)) .withParam("until", ISO8601.toString(until, false)) .withParam("path", (path == null ? null : urlEncode(path))); return (new Pager<Commit>(this, Commit.class, itemsPerPage, formData.asMap(), "projects", getProjectIdOrPath(projectIdOrPath), "repository", "commits")); }
java
public Pager<Commit> getCommits(Object projectIdOrPath, String ref, Date since, Date until, String path, int itemsPerPage) throws GitLabApiException { Form formData = new GitLabApiForm() .withParam("ref_name", ref) .withParam("since", ISO8601.toString(since, false)) .withParam("until", ISO8601.toString(until, false)) .withParam("path", (path == null ? null : urlEncode(path))); return (new Pager<Commit>(this, Commit.class, itemsPerPage, formData.asMap(), "projects", getProjectIdOrPath(projectIdOrPath), "repository", "commits")); }
[ "public", "Pager", "<", "Commit", ">", "getCommits", "(", "Object", "projectIdOrPath", ",", "String", "ref", ",", "Date", "since", ",", "Date", "until", ",", "String", "path", ",", "int", "itemsPerPage", ")", "throws", "GitLabApiException", "{", "Form", "for...
Get a Pager of repository commits in a project <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits</code></pre> @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @param ref the name of a repository branch or tag or if not given the default branch @param since only commits after or on this date will be returned @param until only commits before or on this date will be returned @param itemsPerPage the number of Commit instances that will be fetched per page @param path the path to file of a project @return a Pager containing the commits for the specified project ID @throws GitLabApiException GitLabApiException if any exception occurs during execution
[ "Get", "a", "Pager", "of", "repository", "commits", "in", "a", "project" ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/CommitsApi.java#L245-L252
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/CommitsApi.java
CommitsApi.getCommit
public Commit getCommit(Object projectIdOrPath, String sha) throws GitLabApiException { Response response = get(Response.Status.OK, getDefaultPerPageParam(), "projects", getProjectIdOrPath(projectIdOrPath), "repository", "commits", urlEncode(sha)); return (response.readEntity(Commit.class)); }
java
public Commit getCommit(Object projectIdOrPath, String sha) throws GitLabApiException { Response response = get(Response.Status.OK, getDefaultPerPageParam(), "projects", getProjectIdOrPath(projectIdOrPath), "repository", "commits", urlEncode(sha)); return (response.readEntity(Commit.class)); }
[ "public", "Commit", "getCommit", "(", "Object", "projectIdOrPath", ",", "String", "sha", ")", "throws", "GitLabApiException", "{", "Response", "response", "=", "get", "(", "Response", ".", "Status", ".", "OK", ",", "getDefaultPerPageParam", "(", ")", ",", "\"p...
Get a specific commit identified by the commit hash or name of a branch or tag. <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:sha</code></pre> @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @param sha a commit hash or name of a branch or tag @return the Commit instance for the specified project ID/sha pair @throws GitLabApiException GitLabApiException if any exception occurs during execution
[ "Get", "a", "specific", "commit", "identified", "by", "the", "commit", "hash", "or", "name", "of", "a", "branch", "or", "tag", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/CommitsApi.java#L264-L267
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/CommitsApi.java
CommitsApi.getCommitStatuses
public Pager<CommitStatus> getCommitStatuses(Object projectIdOrPath, String sha, CommitStatusFilter filter, int itemsPerPage) throws GitLabApiException { if (projectIdOrPath == null) { throw new RuntimeException("projectIdOrPath cannot be null"); } if (sha == null || sha.trim().isEmpty()) { throw new RuntimeException("sha cannot be null"); } MultivaluedMap<String, String> queryParams = (filter != null ? filter.getQueryParams().asMap() : null); return (new Pager<CommitStatus>(this, CommitStatus.class, itemsPerPage, queryParams, "projects", this.getProjectIdOrPath(projectIdOrPath), "repository", "commits", sha, "statuses")); }
java
public Pager<CommitStatus> getCommitStatuses(Object projectIdOrPath, String sha, CommitStatusFilter filter, int itemsPerPage) throws GitLabApiException { if (projectIdOrPath == null) { throw new RuntimeException("projectIdOrPath cannot be null"); } if (sha == null || sha.trim().isEmpty()) { throw new RuntimeException("sha cannot be null"); } MultivaluedMap<String, String> queryParams = (filter != null ? filter.getQueryParams().asMap() : null); return (new Pager<CommitStatus>(this, CommitStatus.class, itemsPerPage, queryParams, "projects", this.getProjectIdOrPath(projectIdOrPath), "repository", "commits", sha, "statuses")); }
[ "public", "Pager", "<", "CommitStatus", ">", "getCommitStatuses", "(", "Object", "projectIdOrPath", ",", "String", "sha", ",", "CommitStatusFilter", "filter", ",", "int", "itemsPerPage", ")", "throws", "GitLabApiException", "{", "if", "(", "projectIdOrPath", "==", ...
Get a Pager of repository commit statuses that meet the provided filter. <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:sha/statuses</code></pre> @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @param sha the commit SHA @param filter the commit statuses file, contains ref, stage, name, all @param itemsPerPage the number of CommitStatus instances that will be fetched per page @return a Pager containing the commit statuses for the specified project and sha that meet the provided filter @throws GitLabApiException GitLabApiException if any exception occurs during execution
[ "Get", "a", "Pager", "of", "repository", "commit", "statuses", "that", "meet", "the", "provided", "filter", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/CommitsApi.java#L379-L393
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/CommitsApi.java
CommitsApi.getCommitStatusesStream
public Stream<CommitStatus> getCommitStatusesStream(Object projectIdOrPath, String sha, CommitStatusFilter filter) throws GitLabApiException { return (getCommitStatuses(projectIdOrPath, sha, filter, getDefaultPerPage()).stream()); }
java
public Stream<CommitStatus> getCommitStatusesStream(Object projectIdOrPath, String sha, CommitStatusFilter filter) throws GitLabApiException { return (getCommitStatuses(projectIdOrPath, sha, filter, getDefaultPerPage()).stream()); }
[ "public", "Stream", "<", "CommitStatus", ">", "getCommitStatusesStream", "(", "Object", "projectIdOrPath", ",", "String", "sha", ",", "CommitStatusFilter", "filter", ")", "throws", "GitLabApiException", "{", "return", "(", "getCommitStatuses", "(", "projectIdOrPath", ...
Get a Stream of repository commit statuses that meet the provided filter. <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:sha/statuses</code></pre> @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @param sha the commit SHA @param filter the commit statuses file, contains ref, stage, name, all @return a Stream containing the commit statuses for the specified project and sha that meet the provided filter @throws GitLabApiException GitLabApiException if any exception occurs during execution
[ "Get", "a", "Stream", "of", "repository", "commit", "statuses", "that", "meet", "the", "provided", "filter", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/CommitsApi.java#L406-L408
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/CommitsApi.java
CommitsApi.getDiff
public List<Diff> getDiff(Object projectIdOrPath, String sha) throws GitLabApiException { Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "repository", "commits", sha, "diff"); return (response.readEntity(new GenericType<List<Diff>>() {})); }
java
public List<Diff> getDiff(Object projectIdOrPath, String sha) throws GitLabApiException { Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "repository", "commits", sha, "diff"); return (response.readEntity(new GenericType<List<Diff>>() {})); }
[ "public", "List", "<", "Diff", ">", "getDiff", "(", "Object", "projectIdOrPath", ",", "String", "sha", ")", "throws", "GitLabApiException", "{", "Response", "response", "=", "get", "(", "Response", ".", "Status", ".", "OK", ",", "null", ",", "\"projects\"", ...
Get the list of diffs of a commit in a project. <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:sha/diff</code></pre> @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @param sha a commit hash or name of a branch or tag @return a List of Diff instances for the specified project ID/sha pair @throws GitLabApiException GitLabApiException if any exception occurs during execution
[ "Get", "the", "list", "of", "diffs", "of", "a", "commit", "in", "a", "project", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/CommitsApi.java#L463-L466
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/CommitsApi.java
CommitsApi.getComments
public List<Comment> getComments(Object projectIdOrPath, String sha) throws GitLabApiException { return (getComments(projectIdOrPath, sha, getDefaultPerPage()).all()); }
java
public List<Comment> getComments(Object projectIdOrPath, String sha) throws GitLabApiException { return (getComments(projectIdOrPath, sha, getDefaultPerPage()).all()); }
[ "public", "List", "<", "Comment", ">", "getComments", "(", "Object", "projectIdOrPath", ",", "String", "sha", ")", "throws", "GitLabApiException", "{", "return", "(", "getComments", "(", "projectIdOrPath", ",", "sha", ",", "getDefaultPerPage", "(", ")", ")", "...
Get the comments of a commit in a project. <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:sha/comments</code></pre> @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @param sha a commit hash or name of a branch or tag @return a List of Comment instances for the specified project ID/sha pair @throws GitLabApiException GitLabApiException if any exception occurs during execution
[ "Get", "the", "comments", "of", "a", "commit", "in", "a", "project", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/CommitsApi.java#L478-L480
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/CommitsApi.java
CommitsApi.getComments
public Pager<Comment> getComments(Object projectIdOrPath, String sha, int itemsPerPage) throws GitLabApiException { return new Pager<Comment>(this, Comment.class, itemsPerPage, null, "projects", getProjectIdOrPath(projectIdOrPath), "repository", "commits", sha, "comments"); }
java
public Pager<Comment> getComments(Object projectIdOrPath, String sha, int itemsPerPage) throws GitLabApiException { return new Pager<Comment>(this, Comment.class, itemsPerPage, null, "projects", getProjectIdOrPath(projectIdOrPath), "repository", "commits", sha, "comments"); }
[ "public", "Pager", "<", "Comment", ">", "getComments", "(", "Object", "projectIdOrPath", ",", "String", "sha", ",", "int", "itemsPerPage", ")", "throws", "GitLabApiException", "{", "return", "new", "Pager", "<", "Comment", ">", "(", "this", ",", "Comment", "...
Get a Pager of the comments of a commit in a project. <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:sha/comments</code></pre> @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @param sha a commit hash or name of a branch or tag @param itemsPerPage the number of Comment instances that will be fetched per page @return a List of Comment instances for the specified project ID/sha pair @throws GitLabApiException GitLabApiException if any exception occurs during execution
[ "Get", "a", "Pager", "of", "the", "comments", "of", "a", "commit", "in", "a", "project", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/CommitsApi.java#L493-L495
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/CommitsApi.java
CommitsApi.getCommentsStream
public Stream<Comment> getCommentsStream(Object projectIdOrPath, String sha) throws GitLabApiException { return (getComments(projectIdOrPath, sha, getDefaultPerPage()).stream()); }
java
public Stream<Comment> getCommentsStream(Object projectIdOrPath, String sha) throws GitLabApiException { return (getComments(projectIdOrPath, sha, getDefaultPerPage()).stream()); }
[ "public", "Stream", "<", "Comment", ">", "getCommentsStream", "(", "Object", "projectIdOrPath", ",", "String", "sha", ")", "throws", "GitLabApiException", "{", "return", "(", "getComments", "(", "projectIdOrPath", ",", "sha", ",", "getDefaultPerPage", "(", ")", ...
Get the comments of a commit in a project as a Stream. <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:sha/comments</code></pre> @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @param sha a commit hash or name of a branch or tag @return a Stream of Comment instances for the specified project ID/sha pair @throws GitLabApiException GitLabApiException if any exception occurs during execution
[ "Get", "the", "comments", "of", "a", "commit", "in", "a", "project", "as", "a", "Stream", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/CommitsApi.java#L507-L509
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/CommitsApi.java
CommitsApi.addComment
public Comment addComment(Object projectIdOrPath, String sha, String note, String path, Integer line, LineType lineType) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("note", note, true) .withParam("path", path) .withParam("line", line) .withParam("line_type", lineType); Response response = post(Response.Status.CREATED, formData, "projects", getProjectIdOrPath(projectIdOrPath), "repository", "commits", sha, "comments"); return (response.readEntity(Comment.class)); }
java
public Comment addComment(Object projectIdOrPath, String sha, String note, String path, Integer line, LineType lineType) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("note", note, true) .withParam("path", path) .withParam("line", line) .withParam("line_type", lineType); Response response = post(Response.Status.CREATED, formData, "projects", getProjectIdOrPath(projectIdOrPath), "repository", "commits", sha, "comments"); return (response.readEntity(Comment.class)); }
[ "public", "Comment", "addComment", "(", "Object", "projectIdOrPath", ",", "String", "sha", ",", "String", "note", ",", "String", "path", ",", "Integer", "line", ",", "LineType", "lineType", ")", "throws", "GitLabApiException", "{", "GitLabApiForm", "formData", "...
Add a comment to a commit. In order to post a comment in a particular line of a particular file, you must specify the full commit SHA, the path, the line and lineType should be NEW. <pre><code>GitLab Endpoint: POST /projects/:id/repository/commits/:sha/comments</code></pre> @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @param sha a commit hash or name of a branch or tag @param note the text of the comment, required @param path the file path relative to the repository, optional @param line the line number where the comment should be placed, optional @param lineType the line type, optional @return a Comment instance for the posted comment @throws GitLabApiException GitLabApiException if any exception occurs during execution
[ "Add", "a", "comment", "to", "a", "commit", ".", "In", "order", "to", "post", "a", "comment", "in", "a", "particular", "line", "of", "a", "particular", "file", "you", "must", "specify", "the", "full", "commit", "SHA", "the", "path", "the", "line", "and...
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/CommitsApi.java#L526-L534
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/CommitsApi.java
CommitsApi.addComment
public Comment addComment(Object projectIdOrPath, String sha, String note) throws GitLabApiException { return (addComment(projectIdOrPath, sha, note, null, null, null)); }
java
public Comment addComment(Object projectIdOrPath, String sha, String note) throws GitLabApiException { return (addComment(projectIdOrPath, sha, note, null, null, null)); }
[ "public", "Comment", "addComment", "(", "Object", "projectIdOrPath", ",", "String", "sha", ",", "String", "note", ")", "throws", "GitLabApiException", "{", "return", "(", "addComment", "(", "projectIdOrPath", ",", "sha", ",", "note", ",", "null", ",", "null", ...
Add a comment to a commit. <pre><code>GitLab Endpoint: POST /projects/:id/repository/commits/:sha/comments</code></pre> @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @param sha a commit hash or name of a branch or tag @param note the text of the comment, required @return a Comment instance for the posted comment @throws GitLabApiException GitLabApiException if any exception occurs during execution
[ "Add", "a", "comment", "to", "a", "commit", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/CommitsApi.java#L547-L549
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/CommitsApi.java
CommitsApi.createCommit
public Commit createCommit(Object projectIdOrPath, String branch, String commitMessage, String startBranch, String authorEmail, String authorName, List<CommitAction> actions) throws GitLabApiException { CommitPayload payload = new CommitPayload(); payload.setBranch(branch); payload.setCommitMessage(commitMessage); payload.setStartBranch(startBranch); payload.setAuthorEmail(authorEmail); payload.setAuthorName(authorName); payload.setActions(actions); Response response = post(Response.Status.CREATED, payload, "projects", getProjectIdOrPath(projectIdOrPath), "repository", "commits"); return (response.readEntity(Commit.class)); }
java
public Commit createCommit(Object projectIdOrPath, String branch, String commitMessage, String startBranch, String authorEmail, String authorName, List<CommitAction> actions) throws GitLabApiException { CommitPayload payload = new CommitPayload(); payload.setBranch(branch); payload.setCommitMessage(commitMessage); payload.setStartBranch(startBranch); payload.setAuthorEmail(authorEmail); payload.setAuthorName(authorName); payload.setActions(actions); Response response = post(Response.Status.CREATED, payload, "projects", getProjectIdOrPath(projectIdOrPath), "repository", "commits"); return (response.readEntity(Commit.class)); }
[ "public", "Commit", "createCommit", "(", "Object", "projectIdOrPath", ",", "String", "branch", ",", "String", "commitMessage", ",", "String", "startBranch", ",", "String", "authorEmail", ",", "String", "authorName", ",", "List", "<", "CommitAction", ">", "actions"...
Create a commit with multiple files and actions. <pre><code>GitLab Endpoint: POST /projects/:id/repository/commits</code></pre> @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @param branch tame of the branch to commit into. To create a new branch, also provide startBranch @param commitMessage the commit message @param startBranch the name of the branch to start the new commit from @param authorEmail the commit author's email address @param authorName the commit author's name @param actions the array of CommitAction to commit as a batch @return the create Commit instance @throws GitLabApiException if any exception occurs during execution
[ "Create", "a", "commit", "with", "multiple", "files", "and", "actions", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/CommitsApi.java#L566-L579
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/NotificationSettingsApi.java
NotificationSettingsApi.getGlobalNotificationSettings
public NotificationSettings getGlobalNotificationSettings() throws GitLabApiException { Response response = get(Response.Status.OK, null, "notification_settings"); return (response.readEntity(NotificationSettings.class)); }
java
public NotificationSettings getGlobalNotificationSettings() throws GitLabApiException { Response response = get(Response.Status.OK, null, "notification_settings"); return (response.readEntity(NotificationSettings.class)); }
[ "public", "NotificationSettings", "getGlobalNotificationSettings", "(", ")", "throws", "GitLabApiException", "{", "Response", "response", "=", "get", "(", "Response", ".", "Status", ".", "OK", ",", "null", ",", "\"notification_settings\"", ")", ";", "return", "(", ...
Get the global notification settings. <pre><code>GitLab Endpoint: GET /notification_settings</code></pre> @return a NotificationSettings instance containing the global notification settings @throws GitLabApiException if any exception occurs
[ "Get", "the", "global", "notification", "settings", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/NotificationSettingsApi.java#L22-L25
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/NotificationSettingsApi.java
NotificationSettingsApi.updateGlobalNotificationSettings
public NotificationSettings updateGlobalNotificationSettings(NotificationSettings settings) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("level", settings.getLevel()) .withParam("email", settings.getEmail()); Events events = settings.getEvents(); if (events != null) { formData.withParam("new_note", events.getNewNote()) .withParam("new_issuee", events.getNewIssue()) .withParam("reopen_issuee", events.getReopenIssue()) .withParam("close_issuee", events.getCloseIssue()) .withParam("reassign_issuee", events.getReassignIssue()) .withParam("new_merge_requeste", events.getNewMergeRequest()) .withParam("reopen_merge_requeste", events.getReopenMergeRequest()) .withParam("close_merge_requeste", events.getCloseMergeRequest()) .withParam("reassign_merge_requeste", events.getReassignMergeRequest()) .withParam("merge_merge_requeste", events.getMergeMergeRequest()) .withParam("failed_pipelinee", events.getFailedPipeline()) .withParam("success_pipelinee", events.getSuccessPipeline()); } Response response = put(Response.Status.OK, formData.asMap(), "notification_settings"); return (response.readEntity(NotificationSettings.class)); }
java
public NotificationSettings updateGlobalNotificationSettings(NotificationSettings settings) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("level", settings.getLevel()) .withParam("email", settings.getEmail()); Events events = settings.getEvents(); if (events != null) { formData.withParam("new_note", events.getNewNote()) .withParam("new_issuee", events.getNewIssue()) .withParam("reopen_issuee", events.getReopenIssue()) .withParam("close_issuee", events.getCloseIssue()) .withParam("reassign_issuee", events.getReassignIssue()) .withParam("new_merge_requeste", events.getNewMergeRequest()) .withParam("reopen_merge_requeste", events.getReopenMergeRequest()) .withParam("close_merge_requeste", events.getCloseMergeRequest()) .withParam("reassign_merge_requeste", events.getReassignMergeRequest()) .withParam("merge_merge_requeste", events.getMergeMergeRequest()) .withParam("failed_pipelinee", events.getFailedPipeline()) .withParam("success_pipelinee", events.getSuccessPipeline()); } Response response = put(Response.Status.OK, formData.asMap(), "notification_settings"); return (response.readEntity(NotificationSettings.class)); }
[ "public", "NotificationSettings", "updateGlobalNotificationSettings", "(", "NotificationSettings", "settings", ")", "throws", "GitLabApiException", "{", "GitLabApiForm", "formData", "=", "new", "GitLabApiForm", "(", ")", ".", "withParam", "(", "\"level\"", ",", "settings"...
Update the global notification settings. <pre><code>GitLab Endpoint: PUT /notification_settings</code></pre> @param settings a NotificationSettings instance with the new settings @return a NotificationSettings instance containing the updated global notification settings @throws GitLabApiException if any exception occurs
[ "Update", "the", "global", "notification", "settings", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/NotificationSettingsApi.java#L36-L60
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/NotificationSettingsApi.java
NotificationSettingsApi.getGroupNotificationSettings
public NotificationSettings getGroupNotificationSettings(int groupId) throws GitLabApiException { Response response = get(Response.Status.OK, null, "groups", groupId, "notification_settings"); return (response.readEntity(NotificationSettings.class)); }
java
public NotificationSettings getGroupNotificationSettings(int groupId) throws GitLabApiException { Response response = get(Response.Status.OK, null, "groups", groupId, "notification_settings"); return (response.readEntity(NotificationSettings.class)); }
[ "public", "NotificationSettings", "getGroupNotificationSettings", "(", "int", "groupId", ")", "throws", "GitLabApiException", "{", "Response", "response", "=", "get", "(", "Response", ".", "Status", ".", "OK", ",", "null", ",", "\"groups\"", ",", "groupId", ",", ...
Get the notification settings for a group. <pre><code>GitLab Endpoint: GET /groups/:id/notification_settings</code></pre> @param groupId the group ID to get the notification settings for @return a NotificationSettings instance containing the specified group's notification settings @throws GitLabApiException if any exception occurs
[ "Get", "the", "notification", "settings", "for", "a", "group", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/NotificationSettingsApi.java#L71-L74
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/NotificationSettingsApi.java
NotificationSettingsApi.getProjectNotificationSettings
public NotificationSettings getProjectNotificationSettings(int projectId) throws GitLabApiException { Response response = get(Response.Status.OK, null, "projects", projectId, "notification_settings"); return (response.readEntity(NotificationSettings.class)); }
java
public NotificationSettings getProjectNotificationSettings(int projectId) throws GitLabApiException { Response response = get(Response.Status.OK, null, "projects", projectId, "notification_settings"); return (response.readEntity(NotificationSettings.class)); }
[ "public", "NotificationSettings", "getProjectNotificationSettings", "(", "int", "projectId", ")", "throws", "GitLabApiException", "{", "Response", "response", "=", "get", "(", "Response", ".", "Status", ".", "OK", ",", "null", ",", "\"projects\"", ",", "projectId", ...
Get the notification settings for a project. <pre><code>GitLab Endpoint: GET /projects/:id/notification_settings</code></pre> @param projectId the project ID to get the notification settings for @return a NotificationSettings instance containing the specified project's notification settings @throws GitLabApiException if any exception occurs
[ "Get", "the", "notification", "settings", "for", "a", "project", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/NotificationSettingsApi.java#L121-L124
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/utils/JacksonJsonEnumHelper.java
JacksonJsonEnumHelper.addEnum
public void addEnum(E e, String name) { valuesMap.put(name, e); namesMap.put(e, name); }
java
public void addEnum(E e, String name) { valuesMap.put(name, e); namesMap.put(e, name); }
[ "public", "void", "addEnum", "(", "E", "e", ",", "String", "name", ")", "{", "valuesMap", ".", "put", "(", "name", ",", "e", ")", ";", "namesMap", ".", "put", "(", "e", ",", "name", ")", ";", "}" ]
Add an enum that has a specialized name that does not fit the standard naming conventions. @param e the enum to add @param name the name for the enum
[ "Add", "an", "enum", "that", "has", "a", "specialized", "name", "that", "does", "not", "fit", "the", "standard", "naming", "conventions", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/utils/JacksonJsonEnumHelper.java#L71-L74
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/SessionApi.java
SessionApi.login
public Session login(String username, String email, String password) throws GitLabApiException { if ((username == null || username.trim().length() == 0) && (email == null || email.trim().length() == 0)) { throw new IllegalArgumentException("both username and email cannot be empty or null"); } Form formData = new Form(); addFormParam(formData, "email", email, false); addFormParam(formData, "password", password, true); addFormParam(formData, "login", username, false); Response response = post(Response.Status.CREATED, formData, "session"); return (response.readEntity(Session.class)); }
java
public Session login(String username, String email, String password) throws GitLabApiException { if ((username == null || username.trim().length() == 0) && (email == null || email.trim().length() == 0)) { throw new IllegalArgumentException("both username and email cannot be empty or null"); } Form formData = new Form(); addFormParam(formData, "email", email, false); addFormParam(formData, "password", password, true); addFormParam(formData, "login", username, false); Response response = post(Response.Status.CREATED, formData, "session"); return (response.readEntity(Session.class)); }
[ "public", "Session", "login", "(", "String", "username", ",", "String", "email", ",", "String", "password", ")", "throws", "GitLabApiException", "{", "if", "(", "(", "username", "==", "null", "||", "username", ".", "trim", "(", ")", ".", "length", "(", "...
Login to get private token. This functionality is not available on GitLab servers 10.2 and above. <pre><code>GitLab Endpoint: POST /session</code></pre> @param username the username to login @param email the email address to login @param password the password of the user @return a Session instance with info on the logged in user @throws GitLabApiException if any exception occurs
[ "Login", "to", "get", "private", "token", ".", "This", "functionality", "is", "not", "available", "on", "GitLab", "servers", "10", ".", "2", "and", "above", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/SessionApi.java#L28-L41
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/MarkdownApi.java
MarkdownApi.getMarkdown
public Markdown getMarkdown(String text) throws GitLabApiException { if (!isApiVersion(ApiVersion.V4)) { throw new GitLabApiException("Api version must be v4"); } Form formData = new GitLabApiForm().withParam("text", text, true); Response response = post(Response.Status.OK, formData.asMap(), "markdown"); return (response.readEntity(Markdown.class)); }
java
public Markdown getMarkdown(String text) throws GitLabApiException { if (!isApiVersion(ApiVersion.V4)) { throw new GitLabApiException("Api version must be v4"); } Form formData = new GitLabApiForm().withParam("text", text, true); Response response = post(Response.Status.OK, formData.asMap(), "markdown"); return (response.readEntity(Markdown.class)); }
[ "public", "Markdown", "getMarkdown", "(", "String", "text", ")", "throws", "GitLabApiException", "{", "if", "(", "!", "isApiVersion", "(", "ApiVersion", ".", "V4", ")", ")", "{", "throw", "new", "GitLabApiException", "(", "\"Api version must be v4\"", ")", ";", ...
Render an arbitrary Markdown document. <pre><code>GitLab Endpoint: POST /api/v4/markdown</code></pre> @param text text to be transformed @return a Markdown instance with transformed info @throws GitLabApiException if any exception occurs @since GitLab 11.0
[ "Render", "an", "arbitrary", "Markdown", "document", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/MarkdownApi.java#L27-L36
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/utils/FileUtils.java
FileUtils.getFilenameFromContentDisposition
public static String getFilenameFromContentDisposition(Response response) { String disposition = response.getHeaderString("Content-Disposition"); if (disposition == null || disposition.trim().length() == 0) return (null); return (disposition.replaceFirst("(?i)^.*filename=\"([^\"]+)\".*$", "$1")); }
java
public static String getFilenameFromContentDisposition(Response response) { String disposition = response.getHeaderString("Content-Disposition"); if (disposition == null || disposition.trim().length() == 0) return (null); return (disposition.replaceFirst("(?i)^.*filename=\"([^\"]+)\".*$", "$1")); }
[ "public", "static", "String", "getFilenameFromContentDisposition", "(", "Response", "response", ")", "{", "String", "disposition", "=", "response", ".", "getHeaderString", "(", "\"Content-Disposition\"", ")", ";", "if", "(", "disposition", "==", "null", "||", "dispo...
Get the filename from the "Content-Disposition" header of a JAX-RS response. @param response the JAX-RS Response instance to get the "Content-Disposition" header filename from @return the filename from the "Content-Disposition" header of a JAX-RS response, or null if the "Content-Disposition" header is not present in the response
[ "Get", "the", "filename", "from", "the", "Content", "-", "Disposition", "header", "of", "a", "JAX", "-", "RS", "response", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/utils/FileUtils.java#L55-L62
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/utils/FileUtils.java
FileUtils.readFileContents
public static String readFileContents(File file) throws IOException { try (Scanner in = new Scanner(file)) { in.useDelimiter("\\Z"); return (in.next()); } }
java
public static String readFileContents(File file) throws IOException { try (Scanner in = new Scanner(file)) { in.useDelimiter("\\Z"); return (in.next()); } }
[ "public", "static", "String", "readFileContents", "(", "File", "file", ")", "throws", "IOException", "{", "try", "(", "Scanner", "in", "=", "new", "Scanner", "(", "file", ")", ")", "{", "in", ".", "useDelimiter", "(", "\"\\\\Z\"", ")", ";", "return", "("...
Reads the contents of a File to a String. @param file the File instance to read the contents from @return the contents of file as a String @throws IOException if any errors occur while opening or reading the file
[ "Reads", "the", "contents", "of", "a", "File", "to", "a", "String", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/utils/FileUtils.java#L71-L77
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/GroupApi.java
GroupApi.getGroupsStream
public Stream<Group> getGroupsStream(String search) throws GitLabApiException { return (getGroups(search, getDefaultPerPage()).stream()); }
java
public Stream<Group> getGroupsStream(String search) throws GitLabApiException { return (getGroups(search, getDefaultPerPage()).stream()); }
[ "public", "Stream", "<", "Group", ">", "getGroupsStream", "(", "String", "search", ")", "throws", "GitLabApiException", "{", "return", "(", "getGroups", "(", "search", ",", "getDefaultPerPage", "(", ")", ")", ".", "stream", "(", ")", ")", ";", "}" ]
Get all groups that match your string in their name or path as a Stream. @param search the group name or path search criteria @return a Stream containing matching Group instances @throws GitLabApiException if any exception occurs
[ "Get", "all", "groups", "that", "match", "your", "string", "in", "their", "name", "or", "path", "as", "a", "Stream", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/GroupApi.java#L129-L131
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/GroupApi.java
GroupApi.getGroups
public List<Group> getGroups(GroupFilter filter) throws GitLabApiException { return (getGroups(filter, getDefaultPerPage()).all()); }
java
public List<Group> getGroups(GroupFilter filter) throws GitLabApiException { return (getGroups(filter, getDefaultPerPage()).all()); }
[ "public", "List", "<", "Group", ">", "getGroups", "(", "GroupFilter", "filter", ")", "throws", "GitLabApiException", "{", "return", "(", "getGroups", "(", "filter", ",", "getDefaultPerPage", "(", ")", ")", ".", "all", "(", ")", ")", ";", "}" ]
Get a list of visible groups for the authenticated user using the provided filter. <pre><code>GitLab Endpoint: GET /groups</code></pre> @param filter the GroupFilter to match against @return a List&lt;Group&gt; of the matching groups @throws GitLabApiException if any exception occurs
[ "Get", "a", "list", "of", "visible", "groups", "for", "the", "authenticated", "user", "using", "the", "provided", "filter", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/GroupApi.java#L142-L144
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/GroupApi.java
GroupApi.getGroups
public Pager<Group> getGroups(GroupFilter filter, int itemsPerPage) throws GitLabApiException { GitLabApiForm formData = filter.getQueryParams(); return (new Pager<Group>(this, Group.class, itemsPerPage, formData.asMap(), "groups")); }
java
public Pager<Group> getGroups(GroupFilter filter, int itemsPerPage) throws GitLabApiException { GitLabApiForm formData = filter.getQueryParams(); return (new Pager<Group>(this, Group.class, itemsPerPage, formData.asMap(), "groups")); }
[ "public", "Pager", "<", "Group", ">", "getGroups", "(", "GroupFilter", "filter", ",", "int", "itemsPerPage", ")", "throws", "GitLabApiException", "{", "GitLabApiForm", "formData", "=", "filter", ".", "getQueryParams", "(", ")", ";", "return", "(", "new", "Page...
Get a Pager of visible groups for the authenticated user using the provided filter. <pre><code>GitLab Endpoint: GET /groups</code></pre> @param filter the GroupFilter to match against @param itemsPerPage the number of Group instances that will be fetched per page @return a Pager containing matching Group instances @throws GitLabApiException if any exception occurs
[ "Get", "a", "Pager", "of", "visible", "groups", "for", "the", "authenticated", "user", "using", "the", "provided", "filter", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/GroupApi.java#L156-L159
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/GroupApi.java
GroupApi.getGroupsStream
public Stream<Group> getGroupsStream(GroupFilter filter) throws GitLabApiException { return (getGroups(filter, getDefaultPerPage()).stream()); }
java
public Stream<Group> getGroupsStream(GroupFilter filter) throws GitLabApiException { return (getGroups(filter, getDefaultPerPage()).stream()); }
[ "public", "Stream", "<", "Group", ">", "getGroupsStream", "(", "GroupFilter", "filter", ")", "throws", "GitLabApiException", "{", "return", "(", "getGroups", "(", "filter", ",", "getDefaultPerPage", "(", ")", ")", ".", "stream", "(", ")", ")", ";", "}" ]
Get a Stream of visible groups for the authenticated user using the provided filter. <pre><code>GitLab Endpoint: GET /groups</code></pre> @param filter the GroupFilter to match against @return a Stream&lt;Group&gt; of the matching groups @throws GitLabApiException if any exception occurs
[ "Get", "a", "Stream", "of", "visible", "groups", "for", "the", "authenticated", "user", "using", "the", "provided", "filter", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/GroupApi.java#L170-L172
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/GroupApi.java
GroupApi.getSubGroupsStream
public Stream<Group> getSubGroupsStream(Object groupIdOrPath) throws GitLabApiException { return (getSubGroups(groupIdOrPath, getDefaultPerPage()).stream()); }
java
public Stream<Group> getSubGroupsStream(Object groupIdOrPath) throws GitLabApiException { return (getSubGroups(groupIdOrPath, getDefaultPerPage()).stream()); }
[ "public", "Stream", "<", "Group", ">", "getSubGroupsStream", "(", "Object", "groupIdOrPath", ")", "throws", "GitLabApiException", "{", "return", "(", "getSubGroups", "(", "groupIdOrPath", ",", "getDefaultPerPage", "(", ")", ")", ".", "stream", "(", ")", ")", "...
Get a Stream of visible direct subgroups in this group. <pre><code>GitLab Endpoint: GET /groups/:id/subgroups</code></pre> @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path, required @return a Stream&lt;Group&gt; containing the group's sub-groups @throws GitLabApiException if any exception occurs @since GitLab 10.3.0
[ "Get", "a", "Stream", "of", "visible", "direct", "subgroups", "in", "this", "group", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/GroupApi.java#L213-L215
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/GroupApi.java
GroupApi.getProjects
public Pager<Project> getProjects(Object groupIdOrPath, GroupProjectsFilter filter, int itemsPerPage) throws GitLabApiException { GitLabApiForm formData = filter.getQueryParams(); return (new Pager<Project>(this, Project.class, itemsPerPage, formData.asMap(), "groups", getGroupIdOrPath(groupIdOrPath), "projects")); }
java
public Pager<Project> getProjects(Object groupIdOrPath, GroupProjectsFilter filter, int itemsPerPage) throws GitLabApiException { GitLabApiForm formData = filter.getQueryParams(); return (new Pager<Project>(this, Project.class, itemsPerPage, formData.asMap(), "groups", getGroupIdOrPath(groupIdOrPath), "projects")); }
[ "public", "Pager", "<", "Project", ">", "getProjects", "(", "Object", "groupIdOrPath", ",", "GroupProjectsFilter", "filter", ",", "int", "itemsPerPage", ")", "throws", "GitLabApiException", "{", "GitLabApiForm", "formData", "=", "filter", ".", "getQueryParams", "(",...
Get a Pager of projects belonging to the specified group ID and filter. <pre><code>GitLab Endpoint: GET /groups/:id/projects</code></pre> @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path @param filter the GroupProjectsFilter instance holding the filter values for the query @param itemsPerPage the number of Project instances that will be fetched per page @return a Pager containing Project instances that belong to the group and match the provided filter @throws GitLabApiException if any exception occurs
[ "Get", "a", "Pager", "of", "projects", "belonging", "to", "the", "specified", "group", "ID", "and", "filter", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/GroupApi.java#L353-L356
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/GroupApi.java
GroupApi.getProjectsStream
public Stream<Project> getProjectsStream(Object groupIdOrPath, GroupProjectsFilter filter) throws GitLabApiException { return (getProjects(groupIdOrPath, filter, getDefaultPerPage()).stream()); }
java
public Stream<Project> getProjectsStream(Object groupIdOrPath, GroupProjectsFilter filter) throws GitLabApiException { return (getProjects(groupIdOrPath, filter, getDefaultPerPage()).stream()); }
[ "public", "Stream", "<", "Project", ">", "getProjectsStream", "(", "Object", "groupIdOrPath", ",", "GroupProjectsFilter", "filter", ")", "throws", "GitLabApiException", "{", "return", "(", "getProjects", "(", "groupIdOrPath", ",", "filter", ",", "getDefaultPerPage", ...
Get a Stream of projects belonging to the specified group ID and filter. <pre><code>GitLab Endpoint: GET /groups/:id/projects</code></pre> @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path @param filter the GroupProjectsFilter instance holding the filter values for the query @return a Stream containing Project instances that belong to the group and match the provided filter @throws GitLabApiException if any exception occurs
[ "Get", "a", "Stream", "of", "projects", "belonging", "to", "the", "specified", "group", "ID", "and", "filter", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/GroupApi.java#L368-L370
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/GroupApi.java
GroupApi.getProjects
public List<Project> getProjects(Object groupIdOrPath) throws GitLabApiException { return (getProjects(groupIdOrPath, getDefaultPerPage()).all()); }
java
public List<Project> getProjects(Object groupIdOrPath) throws GitLabApiException { return (getProjects(groupIdOrPath, getDefaultPerPage()).all()); }
[ "public", "List", "<", "Project", ">", "getProjects", "(", "Object", "groupIdOrPath", ")", "throws", "GitLabApiException", "{", "return", "(", "getProjects", "(", "groupIdOrPath", ",", "getDefaultPerPage", "(", ")", ")", ".", "all", "(", ")", ")", ";", "}" ]
Get a list of projects belonging to the specified group ID. <pre><code>GitLab Endpoint: GET /groups/:id/projects</code></pre> @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path @return a list of projects belonging to the specified group ID @throws GitLabApiException if any exception occurs
[ "Get", "a", "list", "of", "projects", "belonging", "to", "the", "specified", "group", "ID", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/GroupApi.java#L381-L383
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/GroupApi.java
GroupApi.getProjects
public List<Project> getProjects(Object groupIdOrPath, int page, int perPage) throws GitLabApiException { Response response = get(Response.Status.OK, getPageQueryParams(page, perPage), "groups", getGroupIdOrPath(groupIdOrPath), "projects"); return (response.readEntity(new GenericType<List<Project>>() {})); }
java
public List<Project> getProjects(Object groupIdOrPath, int page, int perPage) throws GitLabApiException { Response response = get(Response.Status.OK, getPageQueryParams(page, perPage), "groups", getGroupIdOrPath(groupIdOrPath), "projects"); return (response.readEntity(new GenericType<List<Project>>() {})); }
[ "public", "List", "<", "Project", ">", "getProjects", "(", "Object", "groupIdOrPath", ",", "int", "page", ",", "int", "perPage", ")", "throws", "GitLabApiException", "{", "Response", "response", "=", "get", "(", "Response", ".", "Status", ".", "OK", ",", "...
Get a list of projects belonging to the specified group ID in the specified page range. <pre><code>GitLab Endpoint: GET /groups/:id/projects</code></pre> @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path @param page the page to get @param perPage the number of Project instances per page @return a list of projects belonging to the specified group ID in the specified page range @throws GitLabApiException if any exception occurs
[ "Get", "a", "list", "of", "projects", "belonging", "to", "the", "specified", "group", "ID", "in", "the", "specified", "page", "range", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/GroupApi.java#L396-L399
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/GroupApi.java
GroupApi.getProjects
public Pager<Project> getProjects(Object groupIdOrPath, int itemsPerPage) throws GitLabApiException { return (new Pager<Project>(this, Project.class, itemsPerPage, null, "groups", getGroupIdOrPath(groupIdOrPath), "projects")); }
java
public Pager<Project> getProjects(Object groupIdOrPath, int itemsPerPage) throws GitLabApiException { return (new Pager<Project>(this, Project.class, itemsPerPage, null, "groups", getGroupIdOrPath(groupIdOrPath), "projects")); }
[ "public", "Pager", "<", "Project", ">", "getProjects", "(", "Object", "groupIdOrPath", ",", "int", "itemsPerPage", ")", "throws", "GitLabApiException", "{", "return", "(", "new", "Pager", "<", "Project", ">", "(", "this", ",", "Project", ".", "class", ",", ...
Get a Pager of projects belonging to the specified group ID. <pre><code>GitLab Endpoint: GET /groups/:id/projects</code></pre> @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path @param itemsPerPage the number of Project instances that will be fetched per page @return a Pager of projects belonging to the specified group ID @throws GitLabApiException if any exception occurs
[ "Get", "a", "Pager", "of", "projects", "belonging", "to", "the", "specified", "group", "ID", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/GroupApi.java#L411-L413
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/GroupApi.java
GroupApi.getGroup
public Group getGroup(Object groupIdOrPath) throws GitLabApiException { Response response = get(Response.Status.OK, null, "groups", getGroupIdOrPath(groupIdOrPath)); return (response.readEntity(Group.class)); }
java
public Group getGroup(Object groupIdOrPath) throws GitLabApiException { Response response = get(Response.Status.OK, null, "groups", getGroupIdOrPath(groupIdOrPath)); return (response.readEntity(Group.class)); }
[ "public", "Group", "getGroup", "(", "Object", "groupIdOrPath", ")", "throws", "GitLabApiException", "{", "Response", "response", "=", "get", "(", "Response", ".", "Status", ".", "OK", ",", "null", ",", "\"groups\"", ",", "getGroupIdOrPath", "(", "groupIdOrPath",...
Get all details of a group. <pre><code>GitLab Endpoint: GET /groups/:id</code></pre> @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path @return the Group instance for the specified group path @throws GitLabApiException if any exception occurs
[ "Get", "all", "details", "of", "a", "group", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/GroupApi.java#L437-L440
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/GroupApi.java
GroupApi.getOptionalGroup
public Optional<Group> getOptionalGroup(Object groupIdOrPath) { try { return (Optional.ofNullable(getGroup(groupIdOrPath))); } catch (GitLabApiException glae) { return (GitLabApi.createOptionalFromException(glae)); } }
java
public Optional<Group> getOptionalGroup(Object groupIdOrPath) { try { return (Optional.ofNullable(getGroup(groupIdOrPath))); } catch (GitLabApiException glae) { return (GitLabApi.createOptionalFromException(glae)); } }
[ "public", "Optional", "<", "Group", ">", "getOptionalGroup", "(", "Object", "groupIdOrPath", ")", "{", "try", "{", "return", "(", "Optional", ".", "ofNullable", "(", "getGroup", "(", "groupIdOrPath", ")", ")", ")", ";", "}", "catch", "(", "GitLabApiException...
Get all details of a group as an Optional instance. <pre><code>GitLab Endpoint: GET /groups/:id</code></pre> @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path @return the Group for the specified group path as an Optional instance
[ "Get", "all", "details", "of", "a", "group", "as", "an", "Optional", "instance", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/GroupApi.java#L450-L456
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/GroupApi.java
GroupApi.deleteGroup
public void deleteGroup(Object groupIdOrPath) throws GitLabApiException { Response.Status expectedStatus = (isApiVersion(ApiVersion.V3) ? Response.Status.OK : Response.Status.NO_CONTENT); delete(expectedStatus, null, "groups", getGroupIdOrPath(groupIdOrPath)); }
java
public void deleteGroup(Object groupIdOrPath) throws GitLabApiException { Response.Status expectedStatus = (isApiVersion(ApiVersion.V3) ? Response.Status.OK : Response.Status.NO_CONTENT); delete(expectedStatus, null, "groups", getGroupIdOrPath(groupIdOrPath)); }
[ "public", "void", "deleteGroup", "(", "Object", "groupIdOrPath", ")", "throws", "GitLabApiException", "{", "Response", ".", "Status", "expectedStatus", "=", "(", "isApiVersion", "(", "ApiVersion", ".", "V3", ")", "?", "Response", ".", "Status", ".", "OK", ":",...
Removes group with all projects inside. <pre><code>GitLab Endpoint: DELETE /groups/:id</code></pre> @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path @throws GitLabApiException if any exception occurs
[ "Removes", "group", "with", "all", "projects", "inside", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/GroupApi.java#L660-L663
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/GroupApi.java
GroupApi.getMembers
public List<Member> getMembers(Object groupIdOrPath) throws GitLabApiException { return (getMembers(groupIdOrPath, getDefaultPerPage()).all()); }
java
public List<Member> getMembers(Object groupIdOrPath) throws GitLabApiException { return (getMembers(groupIdOrPath, getDefaultPerPage()).all()); }
[ "public", "List", "<", "Member", ">", "getMembers", "(", "Object", "groupIdOrPath", ")", "throws", "GitLabApiException", "{", "return", "(", "getMembers", "(", "groupIdOrPath", ",", "getDefaultPerPage", "(", ")", ")", ".", "all", "(", ")", ")", ";", "}" ]
Get a list of group members viewable by the authenticated user. <pre><code>GitLab Endpoint: GET /groups/:id/members</code></pre> @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path @return a list of group members viewable by the authenticated user @throws GitLabApiException if any exception occurs
[ "Get", "a", "list", "of", "group", "members", "viewable", "by", "the", "authenticated", "user", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/GroupApi.java#L674-L676
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/GroupApi.java
GroupApi.getMembers
public List<Member> getMembers(Object groupIdOrPath, int page, int perPage) throws GitLabApiException { Response response = get(Response.Status.OK, getPageQueryParams(page, perPage), "groups", getGroupIdOrPath(groupIdOrPath), "members"); return (response.readEntity(new GenericType<List<Member>>() {})); }
java
public List<Member> getMembers(Object groupIdOrPath, int page, int perPage) throws GitLabApiException { Response response = get(Response.Status.OK, getPageQueryParams(page, perPage), "groups", getGroupIdOrPath(groupIdOrPath), "members"); return (response.readEntity(new GenericType<List<Member>>() {})); }
[ "public", "List", "<", "Member", ">", "getMembers", "(", "Object", "groupIdOrPath", ",", "int", "page", ",", "int", "perPage", ")", "throws", "GitLabApiException", "{", "Response", "response", "=", "get", "(", "Response", ".", "Status", ".", "OK", ",", "ge...
Get a list of group members viewable by the authenticated user in the specified page range. <pre><code>GitLab Endpoint: GET /groups/:id/members</code></pre> @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path @param page the page to get @param perPage the number of Member instances per page @return a list of group members viewable by the authenticated user in the specified page range @throws GitLabApiException if any exception occurs
[ "Get", "a", "list", "of", "group", "members", "viewable", "by", "the", "authenticated", "user", "in", "the", "specified", "page", "range", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/GroupApi.java#L689-L692
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/GroupApi.java
GroupApi.getMembers
public Pager<Member> getMembers(Object groupIdOrPath, int itemsPerPage) throws GitLabApiException { return (new Pager<Member>(this, Member.class, itemsPerPage, null, "groups", getGroupIdOrPath(groupIdOrPath), "members")); }
java
public Pager<Member> getMembers(Object groupIdOrPath, int itemsPerPage) throws GitLabApiException { return (new Pager<Member>(this, Member.class, itemsPerPage, null, "groups", getGroupIdOrPath(groupIdOrPath), "members")); }
[ "public", "Pager", "<", "Member", ">", "getMembers", "(", "Object", "groupIdOrPath", ",", "int", "itemsPerPage", ")", "throws", "GitLabApiException", "{", "return", "(", "new", "Pager", "<", "Member", ">", "(", "this", ",", "Member", ".", "class", ",", "it...
Get a Pager of group members viewable by the authenticated user. <pre><code>GitLab Endpoint: GET /groups/:id/members</code></pre> @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path @param itemsPerPage the number of Member instances that will be fetched per page @return a list of group members viewable by the authenticated user @throws GitLabApiException if any exception occurs
[ "Get", "a", "Pager", "of", "group", "members", "viewable", "by", "the", "authenticated", "user", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/GroupApi.java#L704-L706
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/GroupApi.java
GroupApi.getMembersStream
public Stream<Member> getMembersStream(Object groupIdOrPath) throws GitLabApiException { return (getMembers(groupIdOrPath, getDefaultPerPage()).stream()); }
java
public Stream<Member> getMembersStream(Object groupIdOrPath) throws GitLabApiException { return (getMembers(groupIdOrPath, getDefaultPerPage()).stream()); }
[ "public", "Stream", "<", "Member", ">", "getMembersStream", "(", "Object", "groupIdOrPath", ")", "throws", "GitLabApiException", "{", "return", "(", "getMembers", "(", "groupIdOrPath", ",", "getDefaultPerPage", "(", ")", ")", ".", "stream", "(", ")", ")", ";",...
Get a Stream of group members viewable by the authenticated user. <pre><code>GitLab Endpoint: GET /groups/:id/members</code></pre> @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path @return a Stream of group members viewable by the authenticated user @throws GitLabApiException if any exception occurs
[ "Get", "a", "Stream", "of", "group", "members", "viewable", "by", "the", "authenticated", "user", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/GroupApi.java#L717-L719
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/GroupApi.java
GroupApi.getMember
public Member getMember(Object groupIdOrPath, int userId) throws GitLabApiException { Response response = get(Response.Status.OK, getDefaultPerPageParam(), "groups", getGroupIdOrPath(groupIdOrPath), "members", userId); return (response.readEntity(new GenericType<Member>() {})); }
java
public Member getMember(Object groupIdOrPath, int userId) throws GitLabApiException { Response response = get(Response.Status.OK, getDefaultPerPageParam(), "groups", getGroupIdOrPath(groupIdOrPath), "members", userId); return (response.readEntity(new GenericType<Member>() {})); }
[ "public", "Member", "getMember", "(", "Object", "groupIdOrPath", ",", "int", "userId", ")", "throws", "GitLabApiException", "{", "Response", "response", "=", "get", "(", "Response", ".", "Status", ".", "OK", ",", "getDefaultPerPageParam", "(", ")", ",", "\"gro...
Get a group member viewable by the authenticated user. <pre><code>GitLab Endpoint: GET /groups/:id/members/:id</code></pre> @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path @param userId the member ID of the member to get @return a member viewable by the authenticated user @throws GitLabApiException if any exception occurs
[ "Get", "a", "group", "member", "viewable", "by", "the", "authenticated", "user", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/GroupApi.java#L731-L734
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/GroupApi.java
GroupApi.getOptionalMember
public Optional<Member> getOptionalMember(Object groupIdOrPath, int userId) { try { return (Optional.ofNullable(getMember(groupIdOrPath, userId))); } catch (GitLabApiException glae) { return (GitLabApi.createOptionalFromException(glae)); } }
java
public Optional<Member> getOptionalMember(Object groupIdOrPath, int userId) { try { return (Optional.ofNullable(getMember(groupIdOrPath, userId))); } catch (GitLabApiException glae) { return (GitLabApi.createOptionalFromException(glae)); } }
[ "public", "Optional", "<", "Member", ">", "getOptionalMember", "(", "Object", "groupIdOrPath", ",", "int", "userId", ")", "{", "try", "{", "return", "(", "Optional", ".", "ofNullable", "(", "getMember", "(", "groupIdOrPath", ",", "userId", ")", ")", ")", "...
Get a group member viewable by the authenticated user as an Optional instance. <pre><code>GitLab Endpoint: GET /groups/:id/members/:id</code></pre> @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path @param userId the member ID of the member to get @return a member viewable by the authenticated user as an Optional instance
[ "Get", "a", "group", "member", "viewable", "by", "the", "authenticated", "user", "as", "an", "Optional", "instance", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/GroupApi.java#L745-L751
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/GroupApi.java
GroupApi.removeMember
public void removeMember(Object groupIdOrPath, Integer userId) throws GitLabApiException { Response.Status expectedStatus = (isApiVersion(ApiVersion.V3) ? Response.Status.OK : Response.Status.NO_CONTENT); delete(expectedStatus, null, "groups", getGroupIdOrPath(groupIdOrPath), "members", userId); }
java
public void removeMember(Object groupIdOrPath, Integer userId) throws GitLabApiException { Response.Status expectedStatus = (isApiVersion(ApiVersion.V3) ? Response.Status.OK : Response.Status.NO_CONTENT); delete(expectedStatus, null, "groups", getGroupIdOrPath(groupIdOrPath), "members", userId); }
[ "public", "void", "removeMember", "(", "Object", "groupIdOrPath", ",", "Integer", "userId", ")", "throws", "GitLabApiException", "{", "Response", ".", "Status", "expectedStatus", "=", "(", "isApiVersion", "(", "ApiVersion", ".", "V3", ")", "?", "Response", ".", ...
Removes member from the group. <pre><code>GitLab Endpoint: DELETE /groups/:id/members/:user_id</code></pre> @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path, required @param userId the user ID of the member to remove @throws GitLabApiException if any exception occurs
[ "Removes", "member", "from", "the", "group", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/GroupApi.java#L896-L899
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/GroupApi.java
GroupApi.ldapSync
public void ldapSync(Object groupIdOrPath) throws GitLabApiException { post(Response.Status.NO_CONTENT, (Form)null, "groups", getGroupIdOrPath(groupIdOrPath), "ldap_sync"); }
java
public void ldapSync(Object groupIdOrPath) throws GitLabApiException { post(Response.Status.NO_CONTENT, (Form)null, "groups", getGroupIdOrPath(groupIdOrPath), "ldap_sync"); }
[ "public", "void", "ldapSync", "(", "Object", "groupIdOrPath", ")", "throws", "GitLabApiException", "{", "post", "(", "Response", ".", "Status", ".", "NO_CONTENT", ",", "(", "Form", ")", "null", ",", "\"groups\"", ",", "getGroupIdOrPath", "(", "groupIdOrPath", ...
Syncs the group with its linked LDAP group. Only available to group owners and administrators. <pre><code>GitLab Endpoint: POST /groups/:id/ldap_sync</code></pre> @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path @throws GitLabApiException if any exception occurs
[ "Syncs", "the", "group", "with", "its", "linked", "LDAP", "group", ".", "Only", "available", "to", "group", "owners", "and", "administrators", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/GroupApi.java#L909-L911
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/GroupApi.java
GroupApi.deleteLdapGroupLink
public void deleteLdapGroupLink(Object groupIdOrPath, String cn) throws GitLabApiException { if (cn == null || cn.trim().isEmpty()) { throw new RuntimeException("cn cannot be null or empty"); } delete(Response.Status.OK, null, "groups", getGroupIdOrPath(groupIdOrPath), "ldap_group_links", cn); }
java
public void deleteLdapGroupLink(Object groupIdOrPath, String cn) throws GitLabApiException { if (cn == null || cn.trim().isEmpty()) { throw new RuntimeException("cn cannot be null or empty"); } delete(Response.Status.OK, null, "groups", getGroupIdOrPath(groupIdOrPath), "ldap_group_links", cn); }
[ "public", "void", "deleteLdapGroupLink", "(", "Object", "groupIdOrPath", ",", "String", "cn", ")", "throws", "GitLabApiException", "{", "if", "(", "cn", "==", "null", "||", "cn", ".", "trim", "(", ")", ".", "isEmpty", "(", ")", ")", "{", "throw", "new", ...
Deletes an LDAP group link. <pre><code>GitLab Endpoint: DELETE /groups/:id/ldap_group_links/:cn</code></pre> @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path @param cn the CN of the LDAP group link to delete @throws GitLabApiException if any exception occurs
[ "Deletes", "an", "LDAP", "group", "link", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/GroupApi.java#L961-L968
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/GroupApi.java
GroupApi.deleteLdapGroupLink
public void deleteLdapGroupLink(Object groupIdOrPath, String cn, String provider) throws GitLabApiException { if (cn == null || cn.trim().isEmpty()) { throw new RuntimeException("cn cannot be null or empty"); } if (provider == null || provider.trim().isEmpty()) { throw new RuntimeException("LDAP provider cannot be null or empty"); } delete(Response.Status.OK, null, "groups", getGroupIdOrPath(groupIdOrPath), "ldap_group_links", provider, cn); }
java
public void deleteLdapGroupLink(Object groupIdOrPath, String cn, String provider) throws GitLabApiException { if (cn == null || cn.trim().isEmpty()) { throw new RuntimeException("cn cannot be null or empty"); } if (provider == null || provider.trim().isEmpty()) { throw new RuntimeException("LDAP provider cannot be null or empty"); } delete(Response.Status.OK, null, "groups", getGroupIdOrPath(groupIdOrPath), "ldap_group_links", provider, cn); }
[ "public", "void", "deleteLdapGroupLink", "(", "Object", "groupIdOrPath", ",", "String", "cn", ",", "String", "provider", ")", "throws", "GitLabApiException", "{", "if", "(", "cn", "==", "null", "||", "cn", ".", "trim", "(", ")", ".", "isEmpty", "(", ")", ...
Deletes an LDAP group link for a specific LDAP provider. <pre><code>GitLab Endpoint: DELETE /groups/:id/ldap_group_links/:provider/:cn</code></pre> @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path @param cn the CN of the LDAP group link to delete @param provider the name of the LDAP provider @throws GitLabApiException if any exception occurs
[ "Deletes", "an", "LDAP", "group", "link", "for", "a", "specific", "LDAP", "provider", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/GroupApi.java#L980-L991
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/GroupApi.java
GroupApi.getVariables
public List<Variable> getVariables(Object groupIdOrPath, int page, int perPage) throws GitLabApiException { Response response = get(Response.Status.OK, getPageQueryParams(page, perPage), "groups", getGroupIdOrPath(groupIdOrPath), "variables"); return (response.readEntity(new GenericType<List<Variable>>() {})); }
java
public List<Variable> getVariables(Object groupIdOrPath, int page, int perPage) throws GitLabApiException { Response response = get(Response.Status.OK, getPageQueryParams(page, perPage), "groups", getGroupIdOrPath(groupIdOrPath), "variables"); return (response.readEntity(new GenericType<List<Variable>>() {})); }
[ "public", "List", "<", "Variable", ">", "getVariables", "(", "Object", "groupIdOrPath", ",", "int", "page", ",", "int", "perPage", ")", "throws", "GitLabApiException", "{", "Response", "response", "=", "get", "(", "Response", ".", "Status", ".", "OK", ",", ...
Get a list of variables for the specified group in the specified page range. <pre><code>GitLab Endpoint: GET /groups/:id/variables</code></pre> @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path @param page the page to get @param perPage the number of Variable instances per page @return a list of variables belonging to the specified group in the specified page range @throws GitLabApiException if any exception occurs
[ "Get", "a", "list", "of", "variables", "for", "the", "specified", "group", "in", "the", "specified", "page", "range", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/GroupApi.java#L1017-L1020
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/GroupApi.java
GroupApi.getVariables
public Pager<Variable> getVariables(Object groupIdOrPath, int itemsPerPage) throws GitLabApiException { return (new Pager<Variable>(this, Variable.class, itemsPerPage, null, "groups", getGroupIdOrPath(groupIdOrPath), "variables")); }
java
public Pager<Variable> getVariables(Object groupIdOrPath, int itemsPerPage) throws GitLabApiException { return (new Pager<Variable>(this, Variable.class, itemsPerPage, null, "groups", getGroupIdOrPath(groupIdOrPath), "variables")); }
[ "public", "Pager", "<", "Variable", ">", "getVariables", "(", "Object", "groupIdOrPath", ",", "int", "itemsPerPage", ")", "throws", "GitLabApiException", "{", "return", "(", "new", "Pager", "<", "Variable", ">", "(", "this", ",", "Variable", ".", "class", ",...
Get a Pager of variables belonging to the specified group. <pre><code>GitLab Endpoint: GET /groups/:id/variables</code></pre> @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path @param itemsPerPage the number of Variable instances that will be fetched per page @return a Pager of variables belonging to the specified group @throws GitLabApiException if any exception occurs
[ "Get", "a", "Pager", "of", "variables", "belonging", "to", "the", "specified", "group", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/GroupApi.java#L1032-L1034
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/GroupApi.java
GroupApi.getVariablesStream
public Stream<Variable> getVariablesStream(Object groupIdOrPath) throws GitLabApiException { return (getVariables(groupIdOrPath, getDefaultPerPage()).stream()); }
java
public Stream<Variable> getVariablesStream(Object groupIdOrPath) throws GitLabApiException { return (getVariables(groupIdOrPath, getDefaultPerPage()).stream()); }
[ "public", "Stream", "<", "Variable", ">", "getVariablesStream", "(", "Object", "groupIdOrPath", ")", "throws", "GitLabApiException", "{", "return", "(", "getVariables", "(", "groupIdOrPath", ",", "getDefaultPerPage", "(", ")", ")", ".", "stream", "(", ")", ")", ...
Get a Stream of variables belonging to the specified group. <pre><code>GitLab Endpoint: GET /groups/:id/variables</code></pre> @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path @return a Stream of variables belonging to the specified group @throws GitLabApiException if any exception occurs
[ "Get", "a", "Stream", "of", "variables", "belonging", "to", "the", "specified", "group", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/GroupApi.java#L1045-L1047
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/GroupApi.java
GroupApi.getVariable
public Variable getVariable(Object groupIdOrPath, String key) throws GitLabApiException { Response response = get(Response.Status.OK, null, "groups", getGroupIdOrPath(groupIdOrPath), "variables", key); return (response.readEntity(Variable.class)); }
java
public Variable getVariable(Object groupIdOrPath, String key) throws GitLabApiException { Response response = get(Response.Status.OK, null, "groups", getGroupIdOrPath(groupIdOrPath), "variables", key); return (response.readEntity(Variable.class)); }
[ "public", "Variable", "getVariable", "(", "Object", "groupIdOrPath", ",", "String", "key", ")", "throws", "GitLabApiException", "{", "Response", "response", "=", "get", "(", "Response", ".", "Status", ".", "OK", ",", "null", ",", "\"groups\"", ",", "getGroupId...
Get the details of a group variable. <pre><code>GitLab Endpoint: GET /groups/:id/variables/:key</code></pre> @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path @param key the key of an existing variable, required @return the Variable instance for the specified group variable @throws GitLabApiException if any exception occurs
[ "Get", "the", "details", "of", "a", "group", "variable", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/GroupApi.java#L1059-L1062
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/GroupApi.java
GroupApi.getOptionalVariable
public Optional<Variable> getOptionalVariable(Object groupIdOrPath, String key) { try { return (Optional.ofNullable(getVariable(groupIdOrPath, key))); } catch (GitLabApiException glae) { return (GitLabApi.createOptionalFromException(glae)); } }
java
public Optional<Variable> getOptionalVariable(Object groupIdOrPath, String key) { try { return (Optional.ofNullable(getVariable(groupIdOrPath, key))); } catch (GitLabApiException glae) { return (GitLabApi.createOptionalFromException(glae)); } }
[ "public", "Optional", "<", "Variable", ">", "getOptionalVariable", "(", "Object", "groupIdOrPath", ",", "String", "key", ")", "{", "try", "{", "return", "(", "Optional", ".", "ofNullable", "(", "getVariable", "(", "groupIdOrPath", ",", "key", ")", ")", ")", ...
Get the details of a group variable as an Optional instance. <pre><code>GitLab Endpoint: GET /groups/:id/variables/:key</code></pre> @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path @param key the key of an existing variable, required @return the Variable for the specified group variable as an Optional instance
[ "Get", "the", "details", "of", "a", "group", "variable", "as", "an", "Optional", "instance", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/GroupApi.java#L1073-L1079
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/GroupApi.java
GroupApi.createVariable
public Variable createVariable(Object groupIdOrPath, String key, String value, Boolean isProtected) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("key", key, true) .withParam("value", value, true) .withParam("protected", isProtected); Response response = post(Response.Status.CREATED, formData, "groups", getGroupIdOrPath(groupIdOrPath), "variables"); return (response.readEntity(Variable.class)); }
java
public Variable createVariable(Object groupIdOrPath, String key, String value, Boolean isProtected) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("key", key, true) .withParam("value", value, true) .withParam("protected", isProtected); Response response = post(Response.Status.CREATED, formData, "groups", getGroupIdOrPath(groupIdOrPath), "variables"); return (response.readEntity(Variable.class)); }
[ "public", "Variable", "createVariable", "(", "Object", "groupIdOrPath", ",", "String", "key", ",", "String", "value", ",", "Boolean", "isProtected", ")", "throws", "GitLabApiException", "{", "GitLabApiForm", "formData", "=", "new", "GitLabApiForm", "(", ")", ".", ...
Create a new group variable. <pre><code>GitLab Endpoint: POST /groups/:id/variables</code></pre> @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path, required @param key the key of a variable; must have no more than 255 characters; only A-Z, a-z, 0-9, and _ are allowed, required @param value the value for the variable, required @param isProtected whether the variable is protected, optional @return a Variable instance with the newly created variable @throws GitLabApiException if any exception occurs during execution
[ "Create", "a", "new", "group", "variable", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/GroupApi.java#L1093-L1101
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/GroupApi.java
GroupApi.deleteVariable
public void deleteVariable(Object groupIdOrPath, String key) throws GitLabApiException { delete(Response.Status.NO_CONTENT, null, "groups", getGroupIdOrPath(groupIdOrPath), "variables", key); }
java
public void deleteVariable(Object groupIdOrPath, String key) throws GitLabApiException { delete(Response.Status.NO_CONTENT, null, "groups", getGroupIdOrPath(groupIdOrPath), "variables", key); }
[ "public", "void", "deleteVariable", "(", "Object", "groupIdOrPath", ",", "String", "key", ")", "throws", "GitLabApiException", "{", "delete", "(", "Response", ".", "Status", ".", "NO_CONTENT", ",", "null", ",", "\"groups\"", ",", "getGroupIdOrPath", "(", "groupI...
Deletes a group variable. <pre><code>DELETE /groups/:id/variables/:key</code></pre> @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path, required @param key the key of an existing variable, required @throws GitLabApiException if any exception occurs
[ "Deletes", "a", "group", "variable", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/GroupApi.java#L1133-L1135
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/SnippetsApi.java
SnippetsApi.getSnippets
public List<Snippet> getSnippets(boolean downloadContent) throws GitLabApiException { Response response = get(Response.Status.OK, getDefaultPerPageParam(), "snippets"); List<Snippet> snippets = (response.readEntity(new GenericType<List<Snippet>>(){})); if (downloadContent) { for (Snippet snippet : snippets) { snippet.setContent(getSnippetContent(snippet.getId())); } } return snippets; }
java
public List<Snippet> getSnippets(boolean downloadContent) throws GitLabApiException { Response response = get(Response.Status.OK, getDefaultPerPageParam(), "snippets"); List<Snippet> snippets = (response.readEntity(new GenericType<List<Snippet>>(){})); if (downloadContent) { for (Snippet snippet : snippets) { snippet.setContent(getSnippetContent(snippet.getId())); } } return snippets; }
[ "public", "List", "<", "Snippet", ">", "getSnippets", "(", "boolean", "downloadContent", ")", "throws", "GitLabApiException", "{", "Response", "response", "=", "get", "(", "Response", ".", "Status", ".", "OK", ",", "getDefaultPerPageParam", "(", ")", ",", "\"s...
Get a list of the authenticated user's snippets. <pre><code>GitLab Endpoint: GET /snippets</code></pre> @param downloadContent indicating whether to download the snippet content @return a list of authenticated user's snippets @throws GitLabApiException if any exception occurs
[ "Get", "a", "list", "of", "the", "authenticated", "user", "s", "snippets", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/SnippetsApi.java#L31-L43
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/SnippetsApi.java
SnippetsApi.getSnippets
public Pager<Snippet> getSnippets(int itemsPerPage) throws GitLabApiException { return (new Pager<Snippet>(this, Snippet.class, itemsPerPage, null, "snippets")); }
java
public Pager<Snippet> getSnippets(int itemsPerPage) throws GitLabApiException { return (new Pager<Snippet>(this, Snippet.class, itemsPerPage, null, "snippets")); }
[ "public", "Pager", "<", "Snippet", ">", "getSnippets", "(", "int", "itemsPerPage", ")", "throws", "GitLabApiException", "{", "return", "(", "new", "Pager", "<", "Snippet", ">", "(", "this", ",", "Snippet", ".", "class", ",", "itemsPerPage", ",", "null", ",...
Get a Pager of the authenticated user's snippets. <pre><code>GitLab Endpoint: GET /snippets</code></pre> @param itemsPerPage the number of snippets per page @return the Pager of snippets @throws GitLabApiException if any exception occurs
[ "Get", "a", "Pager", "of", "the", "authenticated", "user", "s", "snippets", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/SnippetsApi.java#L66-L68
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/SnippetsApi.java
SnippetsApi.getSnippetContent
public String getSnippetContent(Integer snippetId) throws GitLabApiException { Response response = get(Response.Status.OK, null, "snippets", snippetId, "raw"); return (response.readEntity(String.class)); }
java
public String getSnippetContent(Integer snippetId) throws GitLabApiException { Response response = get(Response.Status.OK, null, "snippets", snippetId, "raw"); return (response.readEntity(String.class)); }
[ "public", "String", "getSnippetContent", "(", "Integer", "snippetId", ")", "throws", "GitLabApiException", "{", "Response", "response", "=", "get", "(", "Response", ".", "Status", ".", "OK", ",", "null", ",", "\"snippets\"", ",", "snippetId", ",", "\"raw\"", "...
Get the content of a Snippet. <pre><code>GitLab Endpoint: GET /snippets/:id/raw</code></pre> @param snippetId the snippet ID to remove @return the content of snippet @throws GitLabApiException if any exception occurs
[ "Get", "the", "content", "of", "a", "Snippet", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/SnippetsApi.java#L91-L94
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/SnippetsApi.java
SnippetsApi.getSnippet
public Snippet getSnippet(Integer snippetId, boolean downloadContent) throws GitLabApiException { if (snippetId == null) { throw new RuntimeException("snippetId can't be null"); } Response response = get(Response.Status.OK, null, "snippets", snippetId); Snippet snippet = response.readEntity(Snippet.class); if (downloadContent) { snippet.setContent(getSnippetContent(snippet.getId())); } return snippet; }
java
public Snippet getSnippet(Integer snippetId, boolean downloadContent) throws GitLabApiException { if (snippetId == null) { throw new RuntimeException("snippetId can't be null"); } Response response = get(Response.Status.OK, null, "snippets", snippetId); Snippet snippet = response.readEntity(Snippet.class); if (downloadContent) { snippet.setContent(getSnippetContent(snippet.getId())); } return snippet; }
[ "public", "Snippet", "getSnippet", "(", "Integer", "snippetId", ",", "boolean", "downloadContent", ")", "throws", "GitLabApiException", "{", "if", "(", "snippetId", "==", "null", ")", "{", "throw", "new", "RuntimeException", "(", "\"snippetId can't be null\"", ")", ...
Get a specific Snippet. @param snippetId the snippet ID to get @param downloadContent indicating whether to download the snippet content @return the snippet with the given id @throws GitLabApiException if any exception occurs
[ "Get", "a", "specific", "Snippet", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/SnippetsApi.java#L104-L118
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/SnippetsApi.java
SnippetsApi.getOptionalSnippet
public Optional<Snippet> getOptionalSnippet(Integer snippetId, boolean downloadContent) { try { return (Optional.ofNullable(getSnippet(snippetId, downloadContent))); } catch (GitLabApiException glae) { return (GitLabApi.createOptionalFromException(glae)); } }
java
public Optional<Snippet> getOptionalSnippet(Integer snippetId, boolean downloadContent) { try { return (Optional.ofNullable(getSnippet(snippetId, downloadContent))); } catch (GitLabApiException glae) { return (GitLabApi.createOptionalFromException(glae)); } }
[ "public", "Optional", "<", "Snippet", ">", "getOptionalSnippet", "(", "Integer", "snippetId", ",", "boolean", "downloadContent", ")", "{", "try", "{", "return", "(", "Optional", ".", "ofNullable", "(", "getSnippet", "(", "snippetId", ",", "downloadContent", ")",...
Get a specific snippet as an Optional instance. <pre><code>GitLab Endpoint: GET /snippets/:snippet_id</code></pre> @param snippetId the ID of the snippet to get the Optional instance for @param downloadContent indicating whether to download the snippet content @return the specified Snippet as an Optional instance
[ "Get", "a", "specific", "snippet", "as", "an", "Optional", "instance", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/SnippetsApi.java#L152-L158
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/SnippetsApi.java
SnippetsApi.createSnippet
public Snippet createSnippet(String title, String fileName, String content) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("title", title, true) .withParam("file_name", fileName, true) .withParam("content", content, true); Response response = post(Response.Status.CREATED, formData, "snippets"); return (response.readEntity(Snippet.class)); }
java
public Snippet createSnippet(String title, String fileName, String content) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("title", title, true) .withParam("file_name", fileName, true) .withParam("content", content, true); Response response = post(Response.Status.CREATED, formData, "snippets"); return (response.readEntity(Snippet.class)); }
[ "public", "Snippet", "createSnippet", "(", "String", "title", ",", "String", "fileName", ",", "String", "content", ")", "throws", "GitLabApiException", "{", "GitLabApiForm", "formData", "=", "new", "GitLabApiForm", "(", ")", ".", "withParam", "(", "\"title\"", "...
Create a new Snippet. @param title the title of the snippet @param fileName the file name of the snippet @param content the content of the snippet @return the created Snippet @throws GitLabApiException if any exception occurs
[ "Create", "a", "new", "Snippet", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/SnippetsApi.java#L169-L176
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/SnippetsApi.java
SnippetsApi.deleteSnippet
public void deleteSnippet(Integer snippetId) throws GitLabApiException { if (snippetId == null) { throw new RuntimeException("snippetId can't be null"); } delete(Response.Status.NO_CONTENT, null, "snippets", snippetId); }
java
public void deleteSnippet(Integer snippetId) throws GitLabApiException { if (snippetId == null) { throw new RuntimeException("snippetId can't be null"); } delete(Response.Status.NO_CONTENT, null, "snippets", snippetId); }
[ "public", "void", "deleteSnippet", "(", "Integer", "snippetId", ")", "throws", "GitLabApiException", "{", "if", "(", "snippetId", "==", "null", ")", "{", "throw", "new", "RuntimeException", "(", "\"snippetId can't be null\"", ")", ";", "}", "delete", "(", "Respo...
Removes Snippet. <pre><code>GitLab Endpoint: DELETE /snippets/:id</code></pre> @param snippetId the snippet ID to remove @throws GitLabApiException if any exception occurs
[ "Removes", "Snippet", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/SnippetsApi.java#L208-L215
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/DeployKeysApi.java
DeployKeysApi.getDeployKeys
public List<DeployKey> getDeployKeys(int page, int perPage) throws GitLabApiException { Response response = get(Response.Status.OK, getPageQueryParams(page, perPage), "deploy_keys"); return (response.readEntity(new GenericType<List<DeployKey>>() {})); }
java
public List<DeployKey> getDeployKeys(int page, int perPage) throws GitLabApiException { Response response = get(Response.Status.OK, getPageQueryParams(page, perPage), "deploy_keys"); return (response.readEntity(new GenericType<List<DeployKey>>() {})); }
[ "public", "List", "<", "DeployKey", ">", "getDeployKeys", "(", "int", "page", ",", "int", "perPage", ")", "throws", "GitLabApiException", "{", "Response", "response", "=", "get", "(", "Response", ".", "Status", ".", "OK", ",", "getPageQueryParams", "(", "pag...
Get a list of all deploy keys across all projects of the GitLab instance using the specified page and per page settings. This method requires admin access. <pre><code>GitLab Endpoint: GET /deploy_keys</code></pre> @param page the page to get @param perPage the number of deploy keys per page @return the list of DeployKey in the specified range @throws GitLabApiException if any exception occurs
[ "Get", "a", "list", "of", "all", "deploy", "keys", "across", "all", "projects", "of", "the", "GitLab", "instance", "using", "the", "specified", "page", "and", "per", "page", "settings", ".", "This", "method", "requires", "admin", "access", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/DeployKeysApi.java#L45-L48
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/DeployKeysApi.java
DeployKeysApi.getDeployKeys
public Pager<DeployKey> getDeployKeys(int itemsPerPage) throws GitLabApiException { return (new Pager<DeployKey>(this, DeployKey.class, itemsPerPage, null, "deploy_keys")); }
java
public Pager<DeployKey> getDeployKeys(int itemsPerPage) throws GitLabApiException { return (new Pager<DeployKey>(this, DeployKey.class, itemsPerPage, null, "deploy_keys")); }
[ "public", "Pager", "<", "DeployKey", ">", "getDeployKeys", "(", "int", "itemsPerPage", ")", "throws", "GitLabApiException", "{", "return", "(", "new", "Pager", "<", "DeployKey", ">", "(", "this", ",", "DeployKey", ".", "class", ",", "itemsPerPage", ",", "nul...
Get a Pager of all deploy keys across all projects of the GitLab instance. This method requires admin access. <pre><code>GitLab Endpoint: GET /deploy_keys</code></pre> @param itemsPerPage the number of DeployKey instances that will be fetched per page @return a Pager of DeployKey @throws GitLabApiException if any exception occurs
[ "Get", "a", "Pager", "of", "all", "deploy", "keys", "across", "all", "projects", "of", "the", "GitLab", "instance", ".", "This", "method", "requires", "admin", "access", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/DeployKeysApi.java#L59-L61
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/DeployKeysApi.java
DeployKeysApi.getProjectDeployKeys
public List<DeployKey> getProjectDeployKeys(Object projectIdOrPath, int page, int perPage) throws GitLabApiException { Response response = get(Response.Status.OK, getPageQueryParams(page, perPage), "projects", getProjectIdOrPath(projectIdOrPath), "deploy_keys"); return (response.readEntity(new GenericType<List<DeployKey>>() {})); }
java
public List<DeployKey> getProjectDeployKeys(Object projectIdOrPath, int page, int perPage) throws GitLabApiException { Response response = get(Response.Status.OK, getPageQueryParams(page, perPage), "projects", getProjectIdOrPath(projectIdOrPath), "deploy_keys"); return (response.readEntity(new GenericType<List<DeployKey>>() {})); }
[ "public", "List", "<", "DeployKey", ">", "getProjectDeployKeys", "(", "Object", "projectIdOrPath", ",", "int", "page", ",", "int", "perPage", ")", "throws", "GitLabApiException", "{", "Response", "response", "=", "get", "(", "Response", ".", "Status", ".", "OK...
Get a list of the deploy keys for the specified project using the specified page and per page settings. This method requires admin access. <pre><code>GitLab Endpoint: GET /projects/:id/deploy_keys</code></pre> @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @param page the page to get @param perPage the number of deploy keys per page @return the list of DeployKey in the specified range @throws GitLabApiException if any exception occurs
[ "Get", "a", "list", "of", "the", "deploy", "keys", "for", "the", "specified", "project", "using", "the", "specified", "page", "and", "per", "page", "settings", ".", "This", "method", "requires", "admin", "access", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/DeployKeysApi.java#L100-L104
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/DeployKeysApi.java
DeployKeysApi.getProjectDeployKeys
public Pager<DeployKey> getProjectDeployKeys(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException { return (new Pager<DeployKey>(this, DeployKey.class, itemsPerPage, null, "projects", getProjectIdOrPath(projectIdOrPath), "deploy_keys")); }
java
public Pager<DeployKey> getProjectDeployKeys(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException { return (new Pager<DeployKey>(this, DeployKey.class, itemsPerPage, null, "projects", getProjectIdOrPath(projectIdOrPath), "deploy_keys")); }
[ "public", "Pager", "<", "DeployKey", ">", "getProjectDeployKeys", "(", "Object", "projectIdOrPath", ",", "int", "itemsPerPage", ")", "throws", "GitLabApiException", "{", "return", "(", "new", "Pager", "<", "DeployKey", ">", "(", "this", ",", "DeployKey", ".", ...
Get a Pager of the deploy keys for the specified project. This method requires admin access. <pre><code>GitLab Endpoint: GET /projects/:id/deploy_keys</code></pre> @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance@param projectId the ID of the project @param itemsPerPage the number of DeployKey instances that will be fetched per page @return a Pager of DeployKey @throws GitLabApiException if any exception occurs
[ "Get", "a", "Pager", "of", "the", "deploy", "keys", "for", "the", "specified", "project", ".", "This", "method", "requires", "admin", "access", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/DeployKeysApi.java#L116-L119
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/DeployKeysApi.java
DeployKeysApi.getDeployKey
public DeployKey getDeployKey(Object projectIdOrPath, Integer keyId) throws GitLabApiException { if (keyId == null) { throw new RuntimeException("keyId cannot be null"); } Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "deploy_keys", keyId); return (response.readEntity(DeployKey.class)); }
java
public DeployKey getDeployKey(Object projectIdOrPath, Integer keyId) throws GitLabApiException { if (keyId == null) { throw new RuntimeException("keyId cannot be null"); } Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "deploy_keys", keyId); return (response.readEntity(DeployKey.class)); }
[ "public", "DeployKey", "getDeployKey", "(", "Object", "projectIdOrPath", ",", "Integer", "keyId", ")", "throws", "GitLabApiException", "{", "if", "(", "keyId", "==", "null", ")", "{", "throw", "new", "RuntimeException", "(", "\"keyId cannot be null\"", ")", ";", ...
Get a single deploy key for the specified project. <pre><code>GitLab Endpoint: GET /projects/:id/deploy_keys/:key_id</code></pre> @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @param keyId the ID of the deploy key to delete @return the DeployKey instance for the specified project ID and key ID @throws GitLabApiException if any exception occurs
[ "Get", "a", "single", "deploy", "key", "for", "the", "specified", "project", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/DeployKeysApi.java#L144-L153
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/DeployKeysApi.java
DeployKeysApi.getOptionalDeployKey
public Optional<DeployKey> getOptionalDeployKey(Object projectIdOrPath, Integer keyId) { try { return (Optional.ofNullable(getDeployKey(projectIdOrPath, keyId))); } catch (GitLabApiException glae) { return (GitLabApi.createOptionalFromException(glae)); } }
java
public Optional<DeployKey> getOptionalDeployKey(Object projectIdOrPath, Integer keyId) { try { return (Optional.ofNullable(getDeployKey(projectIdOrPath, keyId))); } catch (GitLabApiException glae) { return (GitLabApi.createOptionalFromException(glae)); } }
[ "public", "Optional", "<", "DeployKey", ">", "getOptionalDeployKey", "(", "Object", "projectIdOrPath", ",", "Integer", "keyId", ")", "{", "try", "{", "return", "(", "Optional", ".", "ofNullable", "(", "getDeployKey", "(", "projectIdOrPath", ",", "keyId", ")", ...
Get a single deploy key for the specified project as an Optional instance. <pre><code>GitLab Endpoint: GET /projects/:id/deploy_keys/:key_id</code></pre> @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @param keyId the ID of the deploy key to delete @return the DeployKey for the specified project ID and key ID as an Optional instance
[ "Get", "a", "single", "deploy", "key", "for", "the", "specified", "project", "as", "an", "Optional", "instance", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/DeployKeysApi.java#L164-L170
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/DeployKeysApi.java
DeployKeysApi.addDeployKey
public DeployKey addDeployKey(Object projectIdOrPath, String title, String key, Boolean canPush) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("title", title, true) .withParam("key", key, true) .withParam("can_push", canPush); Response response = post(Response.Status.CREATED, formData, "projects", getProjectIdOrPath(projectIdOrPath), "deploy_keys"); return (response.readEntity(DeployKey.class)); }
java
public DeployKey addDeployKey(Object projectIdOrPath, String title, String key, Boolean canPush) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("title", title, true) .withParam("key", key, true) .withParam("can_push", canPush); Response response = post(Response.Status.CREATED, formData, "projects", getProjectIdOrPath(projectIdOrPath), "deploy_keys"); return (response.readEntity(DeployKey.class)); }
[ "public", "DeployKey", "addDeployKey", "(", "Object", "projectIdOrPath", ",", "String", "title", ",", "String", "key", ",", "Boolean", "canPush", ")", "throws", "GitLabApiException", "{", "GitLabApiForm", "formData", "=", "new", "GitLabApiForm", "(", ")", ".", "...
Creates a new deploy key for a project. <pre><code>GitLab Endpoint: POST /projects/:id/deploy_keys</code></pre> @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @param title the new deploy key's title, required @param key the new deploy key, required @param canPush can deploy key push to the project's repository, optional @return an DeployKey instance with info on the added deploy key @throws GitLabApiException if any exception occurs
[ "Creates", "a", "new", "deploy", "key", "for", "a", "project", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/DeployKeysApi.java#L184-L193
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/DeployKeysApi.java
DeployKeysApi.deleteDeployKey
public void deleteDeployKey(Object projectIdOrPath, Integer keyId) throws GitLabApiException { if (keyId == null) { throw new RuntimeException("keyId cannot be null"); } delete(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "deploy_keys", keyId); }
java
public void deleteDeployKey(Object projectIdOrPath, Integer keyId) throws GitLabApiException { if (keyId == null) { throw new RuntimeException("keyId cannot be null"); } delete(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "deploy_keys", keyId); }
[ "public", "void", "deleteDeployKey", "(", "Object", "projectIdOrPath", ",", "Integer", "keyId", ")", "throws", "GitLabApiException", "{", "if", "(", "keyId", "==", "null", ")", "{", "throw", "new", "RuntimeException", "(", "\"keyId cannot be null\"", ")", ";", "...
Removes a deploy key from the project. If the deploy key is used only for this project,it will be deleted from the system. <pre><code>GitLab Endpoint: DELETE /projects/:id/deploy_keys/:key_id</code></pre> @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @param keyId the ID of the deploy key to delete @throws GitLabApiException if any exception occurs
[ "Removes", "a", "deploy", "key", "from", "the", "project", ".", "If", "the", "deploy", "key", "is", "used", "only", "for", "this", "project", "it", "will", "be", "deleted", "from", "the", "system", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/DeployKeysApi.java#L204-L211
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/DeployKeysApi.java
DeployKeysApi.enableDeployKey
public DeployKey enableDeployKey(Object projectIdOrPath, Integer keyId) throws GitLabApiException { if (keyId == null) { throw new RuntimeException("keyId cannot be null"); } Response response = post(Response.Status.CREATED, (Form)null, "projects", getProjectIdOrPath(projectIdOrPath), "deploy_keys", keyId, "enable"); return (response.readEntity(DeployKey.class)); }
java
public DeployKey enableDeployKey(Object projectIdOrPath, Integer keyId) throws GitLabApiException { if (keyId == null) { throw new RuntimeException("keyId cannot be null"); } Response response = post(Response.Status.CREATED, (Form)null, "projects", getProjectIdOrPath(projectIdOrPath), "deploy_keys", keyId, "enable"); return (response.readEntity(DeployKey.class)); }
[ "public", "DeployKey", "enableDeployKey", "(", "Object", "projectIdOrPath", ",", "Integer", "keyId", ")", "throws", "GitLabApiException", "{", "if", "(", "keyId", "==", "null", ")", "{", "throw", "new", "RuntimeException", "(", "\"keyId cannot be null\"", ")", ";"...
Enables a deploy key for a project so this can be used. Returns the enabled key when successful. <pre><code>GitLab Endpoint: POST /projects/:id/deploy_keys/:key_id/enable</code></pre> @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @param keyId the ID of the deploy key to enable @return an DeployKey instance with info on the enabled deploy key @throws GitLabApiException if any exception occurs
[ "Enables", "a", "deploy", "key", "for", "a", "project", "so", "this", "can", "be", "used", ".", "Returns", "the", "enabled", "key", "when", "successful", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/DeployKeysApi.java#L223-L232
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/MergeRequestApi.java
MergeRequestApi.getMergeRequestsStream
public Stream<MergeRequest> getMergeRequestsStream(MergeRequestFilter filter) throws GitLabApiException { return (getMergeRequests(filter, getDefaultPerPage()).stream()); }
java
public Stream<MergeRequest> getMergeRequestsStream(MergeRequestFilter filter) throws GitLabApiException { return (getMergeRequests(filter, getDefaultPerPage()).stream()); }
[ "public", "Stream", "<", "MergeRequest", ">", "getMergeRequestsStream", "(", "MergeRequestFilter", "filter", ")", "throws", "GitLabApiException", "{", "return", "(", "getMergeRequests", "(", "filter", ",", "getDefaultPerPage", "(", ")", ")", ".", "stream", "(", ")...
Get all merge requests matching the filter as a Stream. <pre><code>GitLab Endpoint: GET /merge_requests</code></pre> @param filter a MergeRequestFilter instance with the filter settings @return a Stream containing all the merge requests for the specified project matching the filter @throws GitLabApiException if any exception occurs
[ "Get", "all", "merge", "requests", "matching", "the", "filter", "as", "a", "Stream", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/MergeRequestApi.java#L107-L109
train