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/MilestonesApi.java | MilestonesApi.updateMilestone | public Milestone updateMilestone(Object projectIdOrPath, Integer milestoneId, String title, String description,
Date dueDate, Date startDate, MilestoneState milestoneState) throws GitLabApiException {
if (milestoneId == null) {
throw new RuntimeException("milestoneId cannot be null");
... | java | public Milestone updateMilestone(Object projectIdOrPath, Integer milestoneId, String title, String description,
Date dueDate, Date startDate, MilestoneState milestoneState) throws GitLabApiException {
if (milestoneId == null) {
throw new RuntimeException("milestoneId cannot be null");
... | [
"public",
"Milestone",
"updateMilestone",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"milestoneId",
",",
"String",
"title",
",",
"String",
"description",
",",
"Date",
"dueDate",
",",
"Date",
"startDate",
",",
"MilestoneState",
"milestoneState",
")",
"throws",... | Update the specified milestone.
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param milestoneId the milestone ID to update
@param title the updated title for the milestone
@param description the updated description for the milestone
@param dueDate the updated due ... | [
"Update",
"the",
"specified",
"milestone",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/MilestonesApi.java#L474-L490 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/IssuesApi.java | IssuesApi.getIssues | public List<Issue> getIssues(int page, int perPage) throws GitLabApiException {
Response response = get(Response.Status.OK, getPageQueryParams(page, perPage), "issues");
return (response.readEntity(new GenericType<List<Issue>>() {}));
} | java | public List<Issue> getIssues(int page, int perPage) throws GitLabApiException {
Response response = get(Response.Status.OK, getPageQueryParams(page, perPage), "issues");
return (response.readEntity(new GenericType<List<Issue>>() {}));
} | [
"public",
"List",
"<",
"Issue",
">",
"getIssues",
"(",
"int",
"page",
",",
"int",
"perPage",
")",
"throws",
"GitLabApiException",
"{",
"Response",
"response",
"=",
"get",
"(",
"Response",
".",
"Status",
".",
"OK",
",",
"getPageQueryParams",
"(",
"page",
",... | Get all issues the authenticated user has access to using the specified page and per page setting. Only returns issues created by the current user.
<pre><code>GitLab Endpoint: GET /issues</code></pre>
@param page the page to get
@param perPage the number of issues per page
@return the list of issues in the specified ... | [
"Get",
"all",
"issues",
"the",
"authenticated",
"user",
"has",
"access",
"to",
"using",
"the",
"specified",
"page",
"and",
"per",
"page",
"setting",
".",
"Only",
"returns",
"issues",
"created",
"by",
"the",
"current",
"user",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/IssuesApi.java#L73-L76 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/IssuesApi.java | IssuesApi.getIssues | public Pager<Issue> getIssues(int itemsPerPage) throws GitLabApiException {
return (new Pager<Issue>(this, Issue.class, itemsPerPage, null, "issues"));
} | java | public Pager<Issue> getIssues(int itemsPerPage) throws GitLabApiException {
return (new Pager<Issue>(this, Issue.class, itemsPerPage, null, "issues"));
} | [
"public",
"Pager",
"<",
"Issue",
">",
"getIssues",
"(",
"int",
"itemsPerPage",
")",
"throws",
"GitLabApiException",
"{",
"return",
"(",
"new",
"Pager",
"<",
"Issue",
">",
"(",
"this",
",",
"Issue",
".",
"class",
",",
"itemsPerPage",
",",
"null",
",",
"\"... | Get a Pager of all issues the authenticated user has access to. Only returns issues created by the current user.
<pre><code>GitLab Endpoint: GET /issues</code></pre>
r
@param itemsPerPage the number of issues per page
@return the list of issues in the specified range
@throws GitLabApiException if any exception occurs | [
"Get",
"a",
"Pager",
"of",
"all",
"issues",
"the",
"authenticated",
"user",
"has",
"access",
"to",
".",
"Only",
"returns",
"issues",
"created",
"by",
"the",
"current",
"user",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/IssuesApi.java#L87-L89 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/IssuesApi.java | IssuesApi.getIssues | public Pager<Issue> getIssues(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException {
return (new Pager<Issue>(this, Issue.class, itemsPerPage, null, "projects", getProjectIdOrPath(projectIdOrPath), "issues"));
} | java | public Pager<Issue> getIssues(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException {
return (new Pager<Issue>(this, Issue.class, itemsPerPage, null, "projects", getProjectIdOrPath(projectIdOrPath), "issues"));
} | [
"public",
"Pager",
"<",
"Issue",
">",
"getIssues",
"(",
"Object",
"projectIdOrPath",
",",
"int",
"itemsPerPage",
")",
"throws",
"GitLabApiException",
"{",
"return",
"(",
"new",
"Pager",
"<",
"Issue",
">",
"(",
"this",
",",
"Issue",
".",
"class",
",",
"item... | Get a Pager of project's issues.
<pre><code>GitLab Endpoint: GET /projects/:id/issues</code></pre>
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param itemsPerPage the number of issues per page
@return the list of issues in the specified range
@throws GitLabApiEx... | [
"Get",
"a",
"Pager",
"of",
"project",
"s",
"issues",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/IssuesApi.java#L142-L144 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/IssuesApi.java | IssuesApi.getIssues | public Pager<Issue> getIssues(IssueFilter filter, int itemsPerPage) throws GitLabApiException {
GitLabApiForm formData = filter.getQueryParams();
return (new Pager<Issue>(this, Issue.class, itemsPerPage, formData.asMap(), "issues"));
} | java | public Pager<Issue> getIssues(IssueFilter filter, int itemsPerPage) throws GitLabApiException {
GitLabApiForm formData = filter.getQueryParams();
return (new Pager<Issue>(this, Issue.class, itemsPerPage, formData.asMap(), "issues"));
} | [
"public",
"Pager",
"<",
"Issue",
">",
"getIssues",
"(",
"IssueFilter",
"filter",
",",
"int",
"itemsPerPage",
")",
"throws",
"GitLabApiException",
"{",
"GitLabApiForm",
"formData",
"=",
"filter",
".",
"getQueryParams",
"(",
")",
";",
"return",
"(",
"new",
"Page... | Get all issues the authenticated user has access to.
By default it returns only issues created by the current user.
<pre><code>GitLab Endpoint: GET /issues</code></pre>
@param filter {@link IssueFilter} a IssueFilter instance with the filter settings.
@param itemsPerPage the number of Project instances that will be f... | [
"Get",
"all",
"issues",
"the",
"authenticated",
"user",
"has",
"access",
"to",
".",
"By",
"default",
"it",
"returns",
"only",
"issues",
"created",
"by",
"the",
"current",
"user",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/IssuesApi.java#L264-L267 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/IssuesApi.java | IssuesApi.getIssue | public Issue getIssue(Object projectIdOrPath, Integer issueIid) throws GitLabApiException {
Response response = get(Response.Status.OK, getDefaultPerPageParam(),
"projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid);
return (response.readEntity(Issue.class));
} | java | public Issue getIssue(Object projectIdOrPath, Integer issueIid) throws GitLabApiException {
Response response = get(Response.Status.OK, getDefaultPerPageParam(),
"projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid);
return (response.readEntity(Issue.class));
} | [
"public",
"Issue",
"getIssue",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"issueIid",
")",
"throws",
"GitLabApiException",
"{",
"Response",
"response",
"=",
"get",
"(",
"Response",
".",
"Status",
".",
"OK",
",",
"getDefaultPerPageParam",
"(",
")",
",",
... | Get a single project issue.
<pre><code>GitLab Endpoint: GET /projects/:id/issues/:issue_iid</code></pre>
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param issueIid the internal ID of a project's issue
@return the specified Issue instance
@throws GitLabApiExcept... | [
"Get",
"a",
"single",
"project",
"issue",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/IssuesApi.java#L293-L297 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/IssuesApi.java | IssuesApi.getOptionalIssue | public Optional<Issue> getOptionalIssue(Object projectIdOrPath, Integer issueIid) {
try {
return (Optional.ofNullable(getIssue(projectIdOrPath, issueIid)));
} catch (GitLabApiException glae) {
return (GitLabApi.createOptionalFromException(glae));
}
} | java | public Optional<Issue> getOptionalIssue(Object projectIdOrPath, Integer issueIid) {
try {
return (Optional.ofNullable(getIssue(projectIdOrPath, issueIid)));
} catch (GitLabApiException glae) {
return (GitLabApi.createOptionalFromException(glae));
}
} | [
"public",
"Optional",
"<",
"Issue",
">",
"getOptionalIssue",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"issueIid",
")",
"{",
"try",
"{",
"return",
"(",
"Optional",
".",
"ofNullable",
"(",
"getIssue",
"(",
"projectIdOrPath",
",",
"issueIid",
")",
")",
... | Get a single project issue as an Optional instance.
<pre><code>GitLab Endpoint: GET /projects/:id/issues/:issue_iid</code></pre>
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param issueIid the internal ID of a project's issue
@return the specified Issue as an Op... | [
"Get",
"a",
"single",
"project",
"issue",
"as",
"an",
"Optional",
"instance",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/IssuesApi.java#L308-L314 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/IssuesApi.java | IssuesApi.closeIssue | public Issue closeIssue(Object projectIdOrPath, Integer issueIid) throws GitLabApiException {
if (issueIid == null) {
throw new RuntimeException("issue IID cannot be null");
}
GitLabApiForm formData = new GitLabApiForm().withParam("state_event", StateEvent.CLOSE);
... | java | public Issue closeIssue(Object projectIdOrPath, Integer issueIid) throws GitLabApiException {
if (issueIid == null) {
throw new RuntimeException("issue IID cannot be null");
}
GitLabApiForm formData = new GitLabApiForm().withParam("state_event", StateEvent.CLOSE);
... | [
"public",
"Issue",
"closeIssue",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"issueIid",
")",
"throws",
"GitLabApiException",
"{",
"if",
"(",
"issueIid",
"==",
"null",
")",
"{",
"throw",
"new",
"RuntimeException",
"(",
"\"issue IID cannot be null\"",
")",
";... | Closes an existing project issue.
<pre><code>GitLab Endpoint: PUT /projects/:id/issues/:issue_iid</code></pre>
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required
@param issueIid the issue IID to update, required
@return an instance of the updated Issue
@throw... | [
"Closes",
"an",
"existing",
"project",
"issue",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/IssuesApi.java#L380-L389 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/IssuesApi.java | IssuesApi.updateIssue | public Issue updateIssue(Object projectIdOrPath, Integer issueIid, String title, String description, Boolean confidential, List<Integer> assigneeIds,
Integer milestoneId, String labels, StateEvent stateEvent, Date updatedAt, Date dueDate) throws GitLabApiException {
if (issueIid == null) {
... | java | public Issue updateIssue(Object projectIdOrPath, Integer issueIid, String title, String description, Boolean confidential, List<Integer> assigneeIds,
Integer milestoneId, String labels, StateEvent stateEvent, Date updatedAt, Date dueDate) throws GitLabApiException {
if (issueIid == null) {
... | [
"public",
"Issue",
"updateIssue",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"issueIid",
",",
"String",
"title",
",",
"String",
"description",
",",
"Boolean",
"confidential",
",",
"List",
"<",
"Integer",
">",
"assigneeIds",
",",
"Integer",
"milestoneId",
... | Updates an existing project issue. This call can also be used to mark an issue as closed.
<pre><code>GitLab Endpoint: PUT /projects/:id/issues/:issue_iid</code></pre>
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required
@param issueIid the issue IID to update, ... | [
"Updates",
"an",
"existing",
"project",
"issue",
".",
"This",
"call",
"can",
"also",
"be",
"used",
"to",
"mark",
"an",
"issue",
"as",
"closed",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/IssuesApi.java#L410-L429 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/IssuesApi.java | IssuesApi.deleteIssue | public void deleteIssue(Object projectIdOrPath, Integer issueIid) throws GitLabApiException {
if (issueIid == null) {
throw new RuntimeException("issue IID cannot be null");
}
Response.Status expectedStatus = (isApiVersion(ApiVersion.V3) ? Response.Status.OK : Response.Status.NO_CO... | java | public void deleteIssue(Object projectIdOrPath, Integer issueIid) throws GitLabApiException {
if (issueIid == null) {
throw new RuntimeException("issue IID cannot be null");
}
Response.Status expectedStatus = (isApiVersion(ApiVersion.V3) ? Response.Status.OK : Response.Status.NO_CO... | [
"public",
"void",
"deleteIssue",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"issueIid",
")",
"throws",
"GitLabApiException",
"{",
"if",
"(",
"issueIid",
"==",
"null",
")",
"{",
"throw",
"new",
"RuntimeException",
"(",
"\"issue IID cannot be null\"",
")",
";... | Delete an issue.
<pre><code>GitLab Endpoint: DELETE /projects/:id/issues/:issue_iid</code></pre>
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required
@param issueIid the internal ID of a project's issue
@throws GitLabApiException if any exception occurs | [
"Delete",
"an",
"issue",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/IssuesApi.java#L440-L448 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/IssuesApi.java | IssuesApi.resetSpentTime | public TimeStats resetSpentTime(Object projectIdOrPath, Integer issueIid) throws GitLabApiException {
if (issueIid == null) {
throw new RuntimeException("issue IID cannot be null");
}
Response response = post(Response.Status.OK, new GitLabApiForm().asMap(),
"project... | java | public TimeStats resetSpentTime(Object projectIdOrPath, Integer issueIid) throws GitLabApiException {
if (issueIid == null) {
throw new RuntimeException("issue IID cannot be null");
}
Response response = post(Response.Status.OK, new GitLabApiForm().asMap(),
"project... | [
"public",
"TimeStats",
"resetSpentTime",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"issueIid",
")",
"throws",
"GitLabApiException",
"{",
"if",
"(",
"issueIid",
"==",
"null",
")",
"{",
"throw",
"new",
"RuntimeException",
"(",
"\"issue IID cannot be null\"",
"... | Resets the total spent time for this issue to 0 seconds.
<pre><code>GitLab Endpoint: POST /projects/:id/issues/:issue_iid/reset_spent_time</code></pre>
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param issueIid the internal ID of a project's issue
@return a Tim... | [
"Resets",
"the",
"total",
"spent",
"time",
"for",
"this",
"issue",
"to",
"0",
"seconds",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/IssuesApi.java#L591-L600 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/IssuesApi.java | IssuesApi.getOptionalTimeTrackingStats | public Optional<TimeStats> getOptionalTimeTrackingStats(Object projectIdOrPath, Integer issueIid) {
try {
return (Optional.ofNullable(getTimeTrackingStats(projectIdOrPath, issueIid)));
} catch (GitLabApiException glae) {
return (GitLabApi.createOptionalFromException(glae));
... | java | public Optional<TimeStats> getOptionalTimeTrackingStats(Object projectIdOrPath, Integer issueIid) {
try {
return (Optional.ofNullable(getTimeTrackingStats(projectIdOrPath, issueIid)));
} catch (GitLabApiException glae) {
return (GitLabApi.createOptionalFromException(glae));
... | [
"public",
"Optional",
"<",
"TimeStats",
">",
"getOptionalTimeTrackingStats",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"issueIid",
")",
"{",
"try",
"{",
"return",
"(",
"Optional",
".",
"ofNullable",
"(",
"getTimeTrackingStats",
"(",
"projectIdOrPath",
",",
... | Get time tracking stats as an Optional instance
<pre><code>GitLab Endpoint: GET /projects/:id/issues/:issue_iid/time_stats</code></pre>
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param issueIid the internal ID of a project's issue
@return a TimeStats as an Opt... | [
"Get",
"time",
"tracking",
"stats",
"as",
"an",
"Optional",
"instance"
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/IssuesApi.java#L632-L638 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/IssuesApi.java | IssuesApi.getClosedByMergeRequests | public Pager<MergeRequest> getClosedByMergeRequests(Object projectIdOrPath, Integer issueIid, int itemsPerPage) throws GitLabApiException {
return new Pager<MergeRequest>(this, MergeRequest.class, itemsPerPage, null,
"projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "closed_by... | java | public Pager<MergeRequest> getClosedByMergeRequests(Object projectIdOrPath, Integer issueIid, int itemsPerPage) throws GitLabApiException {
return new Pager<MergeRequest>(this, MergeRequest.class, itemsPerPage, null,
"projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "closed_by... | [
"public",
"Pager",
"<",
"MergeRequest",
">",
"getClosedByMergeRequests",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"issueIid",
",",
"int",
"itemsPerPage",
")",
"throws",
"GitLabApiException",
"{",
"return",
"new",
"Pager",
"<",
"MergeRequest",
">",
"(",
"t... | Get a Pager containing all the merge requests that will close issue when merged.
<pre><code>GitLab Endpoint: GET /projects/:id/issues/:issue_iid/closed_by</code></pre>
@param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path
@param issueIid the internal ID of a project's is... | [
"Get",
"a",
"Pager",
"containing",
"all",
"the",
"merge",
"requests",
"that",
"will",
"close",
"issue",
"when",
"merged",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/IssuesApi.java#L683-L686 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/GitLabApi.java | GitLabApi.duplicate | public final GitLabApi duplicate() {
Integer sudoUserId = this.getSudoAsId();
GitLabApi gitLabApi = new GitLabApi(apiVersion, gitLabServerUrl,
getTokenType(), getAuthToken(), getSecretToken(), clientConfigProperties);
if (sudoUserId != null) {
gitLabApi.apiClient.set... | java | public final GitLabApi duplicate() {
Integer sudoUserId = this.getSudoAsId();
GitLabApi gitLabApi = new GitLabApi(apiVersion, gitLabServerUrl,
getTokenType(), getAuthToken(), getSecretToken(), clientConfigProperties);
if (sudoUserId != null) {
gitLabApi.apiClient.set... | [
"public",
"final",
"GitLabApi",
"duplicate",
"(",
")",
"{",
"Integer",
"sudoUserId",
"=",
"this",
".",
"getSudoAsId",
"(",
")",
";",
"GitLabApi",
"gitLabApi",
"=",
"new",
"GitLabApi",
"(",
"apiVersion",
",",
"gitLabServerUrl",
",",
"getTokenType",
"(",
")",
... | Create a new GitLabApi instance that is logically a duplicate of this instance, with the exception off sudo state.
@return a new GitLabApi instance that is logically a duplicate of this instance, with the exception off sudo state. | [
"Create",
"a",
"new",
"GitLabApi",
"instance",
"that",
"is",
"logically",
"a",
"duplicate",
"of",
"this",
"instance",
"with",
"the",
"exception",
"off",
"sudo",
"state",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/GitLabApi.java#L102-L117 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/GitLabApi.java | GitLabApi.enableRequestResponseLogging | public void enableRequestResponseLogging(Logger logger, Level level, int maxEntitySize) {
enableRequestResponseLogging(logger, level, maxEntitySize, MaskingLoggingFilter.DEFAULT_MASKED_HEADER_NAMES);
} | java | public void enableRequestResponseLogging(Logger logger, Level level, int maxEntitySize) {
enableRequestResponseLogging(logger, level, maxEntitySize, MaskingLoggingFilter.DEFAULT_MASKED_HEADER_NAMES);
} | [
"public",
"void",
"enableRequestResponseLogging",
"(",
"Logger",
"logger",
",",
"Level",
"level",
",",
"int",
"maxEntitySize",
")",
"{",
"enableRequestResponseLogging",
"(",
"logger",
",",
"level",
",",
"maxEntitySize",
",",
"MaskingLoggingFilter",
".",
"DEFAULT_MASKE... | Enable the logging of the requests to and the responses from the GitLab server API using the
specified logger. Logging will mask PRIVATE-TOKEN and Authorization headers.
@param logger the Logger instance to log to
@param level the logging level (SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST)
@param maxEntitySize ... | [
"Enable",
"the",
"logging",
"of",
"the",
"requests",
"to",
"and",
"the",
"responses",
"from",
"the",
"GitLab",
"server",
"API",
"using",
"the",
"specified",
"logger",
".",
"Logging",
"will",
"mask",
"PRIVATE",
"-",
"TOKEN",
"and",
"Authorization",
"headers",
... | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/GitLabApi.java#L667-L669 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/GitLabApi.java | GitLabApi.enableRequestResponseLogging | public void enableRequestResponseLogging(Level level, int maxEntitySize, List<String> maskedHeaderNames) {
apiClient.enableRequestResponseLogging(LOGGER, level, maxEntitySize, maskedHeaderNames);
} | java | public void enableRequestResponseLogging(Level level, int maxEntitySize, List<String> maskedHeaderNames) {
apiClient.enableRequestResponseLogging(LOGGER, level, maxEntitySize, maskedHeaderNames);
} | [
"public",
"void",
"enableRequestResponseLogging",
"(",
"Level",
"level",
",",
"int",
"maxEntitySize",
",",
"List",
"<",
"String",
">",
"maskedHeaderNames",
")",
"{",
"apiClient",
".",
"enableRequestResponseLogging",
"(",
"LOGGER",
",",
"level",
",",
"maxEntitySize",... | Enable the logging of the requests to and the responses from the GitLab server API using the
GitLab4J shared Logger instance.
@param level the logging level (SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST)
@param maxEntitySize maximum number of entity bytes to be logged. When logging if the maxEntitySize
is reach... | [
"Enable",
"the",
"logging",
"of",
"the",
"requests",
"to",
"and",
"the",
"responses",
"from",
"the",
"GitLab",
"server",
"API",
"using",
"the",
"GitLab4J",
"shared",
"Logger",
"instance",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/GitLabApi.java#L704-L706 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/GitLabApi.java | GitLabApi.enableRequestResponseLogging | public void enableRequestResponseLogging(Logger logger, Level level, int maxEntitySize, List<String> maskedHeaderNames) {
apiClient.enableRequestResponseLogging(logger, level, maxEntitySize, maskedHeaderNames);
} | java | public void enableRequestResponseLogging(Logger logger, Level level, int maxEntitySize, List<String> maskedHeaderNames) {
apiClient.enableRequestResponseLogging(logger, level, maxEntitySize, maskedHeaderNames);
} | [
"public",
"void",
"enableRequestResponseLogging",
"(",
"Logger",
"logger",
",",
"Level",
"level",
",",
"int",
"maxEntitySize",
",",
"List",
"<",
"String",
">",
"maskedHeaderNames",
")",
"{",
"apiClient",
".",
"enableRequestResponseLogging",
"(",
"logger",
",",
"le... | Enable the logging of the requests to and the responses from the GitLab server API using the
specified logger.
@param logger the Logger instance to log to
@param level the logging level (SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST)
@param maxEntitySize maximum number of entity bytes to be logged. When logging ... | [
"Enable",
"the",
"logging",
"of",
"the",
"requests",
"to",
"and",
"the",
"responses",
"from",
"the",
"GitLab",
"server",
"API",
"using",
"the",
"specified",
"logger",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/GitLabApi.java#L719-L721 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/GitLabApi.java | GitLabApi.getVersion | public Version getVersion() throws GitLabApiException {
class VersionApi extends AbstractApi {
VersionApi(GitLabApi gitlabApi) {
super(gitlabApi);
}
}
Response response = new VersionApi(this).get(Response.Status.OK, null, "version");
return (resp... | java | public Version getVersion() throws GitLabApiException {
class VersionApi extends AbstractApi {
VersionApi(GitLabApi gitlabApi) {
super(gitlabApi);
}
}
Response response = new VersionApi(this).get(Response.Status.OK, null, "version");
return (resp... | [
"public",
"Version",
"getVersion",
"(",
")",
"throws",
"GitLabApiException",
"{",
"class",
"VersionApi",
"extends",
"AbstractApi",
"{",
"VersionApi",
"(",
"GitLabApi",
"gitlabApi",
")",
"{",
"super",
"(",
"gitlabApi",
")",
";",
"}",
"}",
"Response",
"response",
... | Get the version info for the GitLab server using the GitLab Version API.
@return the version info for the GitLab server
@throws GitLabApiException if any exception occurs | [
"Get",
"the",
"version",
"info",
"for",
"the",
"GitLab",
"server",
"using",
"the",
"GitLab",
"Version",
"API",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/GitLabApi.java#L883-L893 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/GitLabApi.java | GitLabApi.createOptionalFromException | protected static final <T> Optional<T> createOptionalFromException(GitLabApiException glae) {
Optional<T> optional = Optional.empty();
optionalExceptionMap.put(System.identityHashCode(optional), glae);
return (optional);
} | java | protected static final <T> Optional<T> createOptionalFromException(GitLabApiException glae) {
Optional<T> optional = Optional.empty();
optionalExceptionMap.put(System.identityHashCode(optional), glae);
return (optional);
} | [
"protected",
"static",
"final",
"<",
"T",
">",
"Optional",
"<",
"T",
">",
"createOptionalFromException",
"(",
"GitLabApiException",
"glae",
")",
"{",
"Optional",
"<",
"T",
">",
"optional",
"=",
"Optional",
".",
"empty",
"(",
")",
";",
"optionalExceptionMap",
... | Create and return an Optional instance associated with a GitLabApiException.
@param <T> the type of the Optional instance
@param glae the GitLabApiException that was the result of a call to the GitLab API
@return the created Optional instance | [
"Create",
"and",
"return",
"an",
"Optional",
"instance",
"associated",
"with",
"a",
"GitLabApiException",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/GitLabApi.java#L1484-L1488 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/GitLabApi.java | GitLabApi.orElseThrow | public static final <T> T orElseThrow(Optional<T> optional) throws GitLabApiException {
GitLabApiException glea = getOptionalException(optional);
if (glea != null) {
throw (glea);
}
return (optional.get());
} | java | public static final <T> T orElseThrow(Optional<T> optional) throws GitLabApiException {
GitLabApiException glea = getOptionalException(optional);
if (glea != null) {
throw (glea);
}
return (optional.get());
} | [
"public",
"static",
"final",
"<",
"T",
">",
"T",
"orElseThrow",
"(",
"Optional",
"<",
"T",
">",
"optional",
")",
"throws",
"GitLabApiException",
"{",
"GitLabApiException",
"glea",
"=",
"getOptionalException",
"(",
"optional",
")",
";",
"if",
"(",
"glea",
"!=... | Return the Optional instances contained value, if present, otherwise throw the exception that is
associated with the Optional instance.
@param <T> the type for the Optional parameter
@param optional the Optional instance to get the value for
@return the value of the Optional instance if no exception is associated with... | [
"Return",
"the",
"Optional",
"instances",
"contained",
"value",
"if",
"present",
"otherwise",
"throw",
"the",
"exception",
"that",
"is",
"associated",
"with",
"the",
"Optional",
"instance",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/GitLabApi.java#L1511-L1519 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/AwardEmojiApi.java | AwardEmojiApi.getNoteAwardEmojis | public List<AwardEmoji> getNoteAwardEmojis(Object projectIdOrPath, Integer issueIid, Integer noteId) throws GitLabApiException {
Response response = get(Response.Status.OK, getPageQueryParams(1, getDefaultPerPage()),
"projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "notes", n... | java | public List<AwardEmoji> getNoteAwardEmojis(Object projectIdOrPath, Integer issueIid, Integer noteId) throws GitLabApiException {
Response response = get(Response.Status.OK, getPageQueryParams(1, getDefaultPerPage()),
"projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "notes", n... | [
"public",
"List",
"<",
"AwardEmoji",
">",
"getNoteAwardEmojis",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"issueIid",
",",
"Integer",
"noteId",
")",
"throws",
"GitLabApiException",
"{",
"Response",
"response",
"=",
"get",
"(",
"Response",
".",
"Status",
... | Get a list of award emoji for the specified note.
<pre><code>GitLab Endpoint: GET /projects/:id/issues/:issue_iid/notes/:note_id/award_emoji</code></pre>
@param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path
@param issueIid the issue IID of the issue that owns the note
@... | [
"Get",
"a",
"list",
"of",
"award",
"emoji",
"for",
"the",
"specified",
"note",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/AwardEmojiApi.java#L81-L85 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/AwardEmojiApi.java | AwardEmojiApi.getIssueAwardEmoji | public AwardEmoji getIssueAwardEmoji(Object projectIdOrPath, Integer issueIid, Integer awardId) throws GitLabApiException {
Response response = get(Response.Status.OK, getPageQueryParams(1, getDefaultPerPage()),
"projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "award_emoji", ... | java | public AwardEmoji getIssueAwardEmoji(Object projectIdOrPath, Integer issueIid, Integer awardId) throws GitLabApiException {
Response response = get(Response.Status.OK, getPageQueryParams(1, getDefaultPerPage()),
"projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "award_emoji", ... | [
"public",
"AwardEmoji",
"getIssueAwardEmoji",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"issueIid",
",",
"Integer",
"awardId",
")",
"throws",
"GitLabApiException",
"{",
"Response",
"response",
"=",
"get",
"(",
"Response",
".",
"Status",
".",
"OK",
",",
"... | Get the specified award emoji for the specified issue.
<pre><code>GitLab Endpoint: GET /projects/:id/issues/:issue_iid/award_emoji/:award_id</code></pre>
@param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path
@param issueIid the issue IID to get the award emoji for
@param... | [
"Get",
"the",
"specified",
"award",
"emoji",
"for",
"the",
"specified",
"issue",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/AwardEmojiApi.java#L98-L102 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/AwardEmojiApi.java | AwardEmojiApi.getMergeRequestAwardEmoji | public AwardEmoji getMergeRequestAwardEmoji(Object projectIdOrPath, Integer mergeRequestIid, Integer awardId) throws GitLabApiException {
Response response = get(Response.Status.OK, getPageQueryParams(1, getDefaultPerPage()),
"projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mer... | java | public AwardEmoji getMergeRequestAwardEmoji(Object projectIdOrPath, Integer mergeRequestIid, Integer awardId) throws GitLabApiException {
Response response = get(Response.Status.OK, getPageQueryParams(1, getDefaultPerPage()),
"projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mer... | [
"public",
"AwardEmoji",
"getMergeRequestAwardEmoji",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"mergeRequestIid",
",",
"Integer",
"awardId",
")",
"throws",
"GitLabApiException",
"{",
"Response",
"response",
"=",
"get",
"(",
"Response",
".",
"Status",
".",
"O... | Get the specified award emoji for the specified merge request.
<pre><code>GitLab Endpoint: GET /projects/:id/merge_requests/:merge_request_iid/award_emoji/:award_id</code></pre>
@param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path
@param mergeRequestIid the merge reques... | [
"Get",
"the",
"specified",
"award",
"emoji",
"for",
"the",
"specified",
"merge",
"request",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/AwardEmojiApi.java#L115-L119 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/AwardEmojiApi.java | AwardEmojiApi.getSnippetAwardEmoji | public AwardEmoji getSnippetAwardEmoji(Object projectIdOrPath, Integer snippetId, Integer awardId) throws GitLabApiException {
Response response = get(Response.Status.OK, getPageQueryParams(1, getDefaultPerPage()),
"projects", getProjectIdOrPath(projectIdOrPath), "snippets", snippetId, "award_em... | java | public AwardEmoji getSnippetAwardEmoji(Object projectIdOrPath, Integer snippetId, Integer awardId) throws GitLabApiException {
Response response = get(Response.Status.OK, getPageQueryParams(1, getDefaultPerPage()),
"projects", getProjectIdOrPath(projectIdOrPath), "snippets", snippetId, "award_em... | [
"public",
"AwardEmoji",
"getSnippetAwardEmoji",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"snippetId",
",",
"Integer",
"awardId",
")",
"throws",
"GitLabApiException",
"{",
"Response",
"response",
"=",
"get",
"(",
"Response",
".",
"Status",
".",
"OK",
",",
... | Get the specified award emoji for the specified snippet.
<pre><code>GitLab Endpoint: GET /projects/:id/snippets/:snippet_id/award_emoji/:award_id</code></pre>
@param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path
@param snippetId the snippet ID to get the award emoji for... | [
"Get",
"the",
"specified",
"award",
"emoji",
"for",
"the",
"specified",
"snippet",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/AwardEmojiApi.java#L132-L136 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/AwardEmojiApi.java | AwardEmojiApi.addNoteAwardEmoji | public AwardEmoji addNoteAwardEmoji(Object projectIdOrPath, Integer issueIid, Integer noteId, String name) throws GitLabApiException {
GitLabApiForm form = new GitLabApiForm().withParam("name", name, true);
Response response = post(Response.Status.CREATED, form.asMap(),
"projects", getP... | java | public AwardEmoji addNoteAwardEmoji(Object projectIdOrPath, Integer issueIid, Integer noteId, String name) throws GitLabApiException {
GitLabApiForm form = new GitLabApiForm().withParam("name", name, true);
Response response = post(Response.Status.CREATED, form.asMap(),
"projects", getP... | [
"public",
"AwardEmoji",
"addNoteAwardEmoji",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"issueIid",
",",
"Integer",
"noteId",
",",
"String",
"name",
")",
"throws",
"GitLabApiException",
"{",
"GitLabApiForm",
"form",
"=",
"new",
"GitLabApiForm",
"(",
")",
".... | Add an award emoji for the specified note.
<pre><code>GitLab Endpoint: POST /projects/:id/issues/:issue_iid/notes/:noteId/award_emoji</code></pre>
@param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path
@param issueIid the issue IID of the issue that owns the note
@param n... | [
"Add",
"an",
"award",
"emoji",
"for",
"the",
"specified",
"note",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/AwardEmojiApi.java#L222-L227 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/AwardEmojiApi.java | AwardEmojiApi.deleteIssueAwardEmoji | public void deleteIssueAwardEmoji(Object projectIdOrPath, Integer issueIid, Integer awardId) throws GitLabApiException {
delete(Response.Status.NO_CONTENT, null,
"projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "award_emoji", awardId);
} | java | public void deleteIssueAwardEmoji(Object projectIdOrPath, Integer issueIid, Integer awardId) throws GitLabApiException {
delete(Response.Status.NO_CONTENT, null,
"projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid, "award_emoji", awardId);
} | [
"public",
"void",
"deleteIssueAwardEmoji",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"issueIid",
",",
"Integer",
"awardId",
")",
"throws",
"GitLabApiException",
"{",
"delete",
"(",
"Response",
".",
"Status",
".",
"NO_CONTENT",
",",
"null",
",",
"\"projects... | Delete an award emoji from the specified issue.
<pre><code>GitLab Endpoint: DELETE /projects/:id/issues/:issue_iid/award_emoji/:award_id</code></pre>
@param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path
@param issueIid the issue IID to delete the award emoji from
@param... | [
"Delete",
"an",
"award",
"emoji",
"from",
"the",
"specified",
"issue",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/AwardEmojiApi.java#L239-L242 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/AwardEmojiApi.java | AwardEmojiApi.deleteMergeRequestAwardEmoji | public void deleteMergeRequestAwardEmoji(Object projectIdOrPath, Integer mergeRequestIid, Integer awardId) throws GitLabApiException {
delete(Response.Status.NO_CONTENT, null,
"projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "award_emoji", awardId);
} | java | public void deleteMergeRequestAwardEmoji(Object projectIdOrPath, Integer mergeRequestIid, Integer awardId) throws GitLabApiException {
delete(Response.Status.NO_CONTENT, null,
"projects", getProjectIdOrPath(projectIdOrPath), "merge_requests", mergeRequestIid, "award_emoji", awardId);
} | [
"public",
"void",
"deleteMergeRequestAwardEmoji",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"mergeRequestIid",
",",
"Integer",
"awardId",
")",
"throws",
"GitLabApiException",
"{",
"delete",
"(",
"Response",
".",
"Status",
".",
"NO_CONTENT",
",",
"null",
",",... | Delete an award emoji from the specified merge request.
<pre><code>GitLab Endpoint: DELETE /projects/:id/merge_requests/:merge_request_iid/award_emoji/:award_id</code></pre>
@param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path
@param mergeRequestIid the merge request II... | [
"Delete",
"an",
"award",
"emoji",
"from",
"the",
"specified",
"merge",
"request",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/AwardEmojiApi.java#L254-L257 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/AwardEmojiApi.java | AwardEmojiApi.deleteSnippetAwardEmoji | public void deleteSnippetAwardEmoji(Object projectIdOrPath, Integer snippetId, Integer awardId) throws GitLabApiException {
delete(Response.Status.NO_CONTENT, null,
"projects", getProjectIdOrPath(projectIdOrPath), "snippets", snippetId, "award_emoji", awardId);
} | java | public void deleteSnippetAwardEmoji(Object projectIdOrPath, Integer snippetId, Integer awardId) throws GitLabApiException {
delete(Response.Status.NO_CONTENT, null,
"projects", getProjectIdOrPath(projectIdOrPath), "snippets", snippetId, "award_emoji", awardId);
} | [
"public",
"void",
"deleteSnippetAwardEmoji",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"snippetId",
",",
"Integer",
"awardId",
")",
"throws",
"GitLabApiException",
"{",
"delete",
"(",
"Response",
".",
"Status",
".",
"NO_CONTENT",
",",
"null",
",",
"\"proje... | Delete an award emoji from the specified snippet.
<pre><code>GitLab Endpoint: DELETE /projects/:id/snippets/:snippet_id/award_emoji/:award_id</code></pre>
@param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path
@param snippetId the snippet ID to delete the award emoji from... | [
"Delete",
"an",
"award",
"emoji",
"from",
"the",
"specified",
"snippet",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/AwardEmojiApi.java#L269-L272 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/RepositoryApi.java | RepositoryApi.getBranches | public Pager<Branch> getBranches(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException {
return (new Pager<Branch>(this, Branch.class, itemsPerPage, null, "projects",
getProjectIdOrPath(projectIdOrPath), "repository", "branches"));
} | java | public Pager<Branch> getBranches(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException {
return (new Pager<Branch>(this, Branch.class, itemsPerPage, null, "projects",
getProjectIdOrPath(projectIdOrPath), "repository", "branches"));
} | [
"public",
"Pager",
"<",
"Branch",
">",
"getBranches",
"(",
"Object",
"projectIdOrPath",
",",
"int",
"itemsPerPage",
")",
"throws",
"GitLabApiException",
"{",
"return",
"(",
"new",
"Pager",
"<",
"Branch",
">",
"(",
"this",
",",
"Branch",
".",
"class",
",",
... | Get a Pager of repository branches from a project, sorted by name alphabetically.
<pre><code>GitLab Endpoint: GET /projects/:id/repository/branches</code></pre>
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param itemsPerPage the number of Project instances that ... | [
"Get",
"a",
"Pager",
"of",
"repository",
"branches",
"from",
"a",
"project",
"sorted",
"by",
"name",
"alphabetically",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/RepositoryApi.java#L76-L79 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/RepositoryApi.java | RepositoryApi.getBranchesStream | public Stream<Branch> getBranchesStream(Object projectIdOrPath) throws GitLabApiException {
return (getBranches(projectIdOrPath, getDefaultPerPage()).stream());
} | java | public Stream<Branch> getBranchesStream(Object projectIdOrPath) throws GitLabApiException {
return (getBranches(projectIdOrPath, getDefaultPerPage()).stream());
} | [
"public",
"Stream",
"<",
"Branch",
">",
"getBranchesStream",
"(",
"Object",
"projectIdOrPath",
")",
"throws",
"GitLabApiException",
"{",
"return",
"(",
"getBranches",
"(",
"projectIdOrPath",
",",
"getDefaultPerPage",
"(",
")",
")",
".",
"stream",
"(",
")",
")",
... | Get a Stream of repository branches from a project, sorted by name alphabetically.
<pre><code>GitLab Endpoint: GET /projects/:id/repository/branches</code></pre>
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@return a Stream of repository branches for the specifie... | [
"Get",
"a",
"Stream",
"of",
"repository",
"branches",
"from",
"a",
"project",
"sorted",
"by",
"name",
"alphabetically",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/RepositoryApi.java#L90-L92 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/RepositoryApi.java | RepositoryApi.getBranch | public Branch getBranch(Object projectIdOrPath, String branchName) throws GitLabApiException {
Response response = get(Response.Status.OK, null, "projects",
getProjectIdOrPath(projectIdOrPath), "repository", "branches", urlEncode(branchName));
return (response.readEntity(Branch.class));
... | java | public Branch getBranch(Object projectIdOrPath, String branchName) throws GitLabApiException {
Response response = get(Response.Status.OK, null, "projects",
getProjectIdOrPath(projectIdOrPath), "repository", "branches", urlEncode(branchName));
return (response.readEntity(Branch.class));
... | [
"public",
"Branch",
"getBranch",
"(",
"Object",
"projectIdOrPath",
",",
"String",
"branchName",
")",
"throws",
"GitLabApiException",
"{",
"Response",
"response",
"=",
"get",
"(",
"Response",
".",
"Status",
".",
"OK",
",",
"null",
",",
"\"projects\"",
",",
"get... | Get a single project repository branch.
<pre><code>GitLab Endpoint: GET /projects/:id/repository/branches/:branch</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 get
@return the branch info for the specified p... | [
"Get",
"a",
"single",
"project",
"repository",
"branch",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/RepositoryApi.java#L104-L108 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/RepositoryApi.java | RepositoryApi.getOptionalBranch | public Optional<Branch> getOptionalBranch(Object projectIdOrPath, String branchName) throws GitLabApiException {
try {
return (Optional.ofNullable(getBranch(projectIdOrPath, branchName)));
} catch (GitLabApiException glae) {
return (GitLabApi.createOptionalFromException(glae));
... | java | public Optional<Branch> getOptionalBranch(Object projectIdOrPath, String branchName) throws GitLabApiException {
try {
return (Optional.ofNullable(getBranch(projectIdOrPath, branchName)));
} catch (GitLabApiException glae) {
return (GitLabApi.createOptionalFromException(glae));
... | [
"public",
"Optional",
"<",
"Branch",
">",
"getOptionalBranch",
"(",
"Object",
"projectIdOrPath",
",",
"String",
"branchName",
")",
"throws",
"GitLabApiException",
"{",
"try",
"{",
"return",
"(",
"Optional",
".",
"ofNullable",
"(",
"getBranch",
"(",
"projectIdOrPat... | Get an Optional instance with the value for the specific repository branch.
<pre><code>GitLab Endpoint: GET /projects/:id/repository/branches/:branch</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 get
@return... | [
"Get",
"an",
"Optional",
"instance",
"with",
"the",
"value",
"for",
"the",
"specific",
"repository",
"branch",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/RepositoryApi.java#L120-L126 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/RepositoryApi.java | RepositoryApi.createBranch | public Branch createBranch(Object projectIdOrPath, String branchName, String ref) throws GitLabApiException {
Form formData = new GitLabApiForm()
.withParam(isApiVersion(ApiVersion.V3) ? "branch_name" : "branch", branchName, true)
.withParam("ref", ref, true);
Response r... | java | public Branch createBranch(Object projectIdOrPath, String branchName, String ref) throws GitLabApiException {
Form formData = new GitLabApiForm()
.withParam(isApiVersion(ApiVersion.V3) ? "branch_name" : "branch", branchName, true)
.withParam("ref", ref, true);
Response r... | [
"public",
"Branch",
"createBranch",
"(",
"Object",
"projectIdOrPath",
",",
"String",
"branchName",
",",
"String",
"ref",
")",
"throws",
"GitLabApiException",
"{",
"Form",
"formData",
"=",
"new",
"GitLabApiForm",
"(",
")",
".",
"withParam",
"(",
"isApiVersion",
"... | Creates a branch for the project. Support as of version 6.8.x
<pre><code>GitLab Endpoint: POST /projects/:id/repository/branches</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 create
@param ref Source to crea... | [
"Creates",
"a",
"branch",
"for",
"the",
"project",
".",
"Support",
"as",
"of",
"version",
"6",
".",
"8",
".",
"x"
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/RepositoryApi.java#L139-L147 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/RepositoryApi.java | RepositoryApi.deleteBranch | public void deleteBranch(Object projectIdOrPath, String branchName) throws GitLabApiException {
Response.Status expectedStatus = (isApiVersion(ApiVersion.V3) ? Response.Status.OK : Response.Status.NO_CONTENT);
delete(expectedStatus, null, "projects",
getProjectIdOrPath(projectIdOrPath), ... | java | public void deleteBranch(Object projectIdOrPath, String branchName) throws GitLabApiException {
Response.Status expectedStatus = (isApiVersion(ApiVersion.V3) ? Response.Status.OK : Response.Status.NO_CONTENT);
delete(expectedStatus, null, "projects",
getProjectIdOrPath(projectIdOrPath), ... | [
"public",
"void",
"deleteBranch",
"(",
"Object",
"projectIdOrPath",
",",
"String",
"branchName",
")",
"throws",
"GitLabApiException",
"{",
"Response",
".",
"Status",
"expectedStatus",
"=",
"(",
"isApiVersion",
"(",
"ApiVersion",
".",
"V3",
")",
"?",
"Response",
... | Delete a single project repository branch.
<pre><code>GitLab Endpoint: DELETE /projects/:id/repository/branches/:branch</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 delete
@throws GitLabApiException if any ... | [
"Delete",
"a",
"single",
"project",
"repository",
"branch",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/RepositoryApi.java#L158-L162 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/RepositoryApi.java | RepositoryApi.protectBranch | public Branch protectBranch(Object projectIdOrPath, String branchName) throws GitLabApiException {
Response response = put(Response.Status.OK, null, "projects",
getProjectIdOrPath(projectIdOrPath), "repository", "branches", urlEncode(branchName), "protect");
return (response.readEntity(B... | java | public Branch protectBranch(Object projectIdOrPath, String branchName) throws GitLabApiException {
Response response = put(Response.Status.OK, null, "projects",
getProjectIdOrPath(projectIdOrPath), "repository", "branches", urlEncode(branchName), "protect");
return (response.readEntity(B... | [
"public",
"Branch",
"protectBranch",
"(",
"Object",
"projectIdOrPath",
",",
"String",
"branchName",
")",
"throws",
"GitLabApiException",
"{",
"Response",
"response",
"=",
"put",
"(",
"Response",
".",
"Status",
".",
"OK",
",",
"null",
",",
"\"projects\"",
",",
... | Protects a single project repository branch. This is an idempotent function,
protecting an already protected repository branch will not produce an error.
<pre><code>GitLab Endpoint: PUT /projects/:id/repository/branches/:branch/protect</code></pre>
@param projectIdOrPath the project in the form of an Integer(ID), Str... | [
"Protects",
"a",
"single",
"project",
"repository",
"branch",
".",
"This",
"is",
"an",
"idempotent",
"function",
"protecting",
"an",
"already",
"protected",
"repository",
"branch",
"will",
"not",
"produce",
"an",
"error",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/RepositoryApi.java#L175-L179 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/RepositoryApi.java | RepositoryApi.createTag | public Tag createTag(Object projectIdOrPath, String tagName, String ref, String message, String releaseNotes) throws GitLabApiException {
Form formData = new GitLabApiForm()
.withParam("tag_name", tagName, true)
.withParam("ref", ref, true)
.withParam("message", ... | java | public Tag createTag(Object projectIdOrPath, String tagName, String ref, String message, String releaseNotes) throws GitLabApiException {
Form formData = new GitLabApiForm()
.withParam("tag_name", tagName, true)
.withParam("ref", ref, true)
.withParam("message", ... | [
"public",
"Tag",
"createTag",
"(",
"Object",
"projectIdOrPath",
",",
"String",
"tagName",
",",
"String",
"ref",
",",
"String",
"message",
",",
"String",
"releaseNotes",
")",
"throws",
"GitLabApiException",
"{",
"Form",
"formData",
"=",
"new",
"GitLabApiForm",
"(... | Creates a tag on a particular ref of the given project. A message and release notes are optional.
<pre><code>GitLab Endpoint: POST /projects/:id/repository/tags</code></pre>
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param tagName The name of the tag Must be u... | [
"Creates",
"a",
"tag",
"on",
"a",
"particular",
"ref",
"of",
"the",
"given",
"project",
".",
"A",
"message",
"and",
"release",
"notes",
"are",
"optional",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/RepositoryApi.java#L265-L275 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/RepositoryApi.java | RepositoryApi.deleteTag | public void deleteTag(Object projectIdOrPath, String tagName) throws GitLabApiException {
Response.Status expectedStatus = (isApiVersion(ApiVersion.V3) ? Response.Status.OK : Response.Status.NO_CONTENT);
delete(expectedStatus, null, "projects", getProjectIdOrPath(projectIdOrPath), "repository", "tags", ... | java | public void deleteTag(Object projectIdOrPath, String tagName) throws GitLabApiException {
Response.Status expectedStatus = (isApiVersion(ApiVersion.V3) ? Response.Status.OK : Response.Status.NO_CONTENT);
delete(expectedStatus, null, "projects", getProjectIdOrPath(projectIdOrPath), "repository", "tags", ... | [
"public",
"void",
"deleteTag",
"(",
"Object",
"projectIdOrPath",
",",
"String",
"tagName",
")",
"throws",
"GitLabApiException",
"{",
"Response",
".",
"Status",
"expectedStatus",
"=",
"(",
"isApiVersion",
"(",
"ApiVersion",
".",
"V3",
")",
"?",
"Response",
".",
... | Deletes the tag from a project with the specified tag name.
<pre><code>GitLab Endpoint: DELETE /projects/:id/repository/tags/:tag_name</code></pre>
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param tagName The name of the tag to delete
@throws GitLabApiExceptio... | [
"Deletes",
"the",
"tag",
"from",
"a",
"project",
"with",
"the",
"specified",
"tag",
"name",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/RepositoryApi.java#L319-L322 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/RepositoryApi.java | RepositoryApi.getContributors | public List<Contributor> getContributors(Object projectIdOrPath, int page, int perPage) throws GitLabApiException {
Response response = get(Response.Status.OK, getPageQueryParams(page, perPage),
"projects", getProjectIdOrPath(projectIdOrPath), "repository", "contributors");
return (respo... | java | public List<Contributor> getContributors(Object projectIdOrPath, int page, int perPage) throws GitLabApiException {
Response response = get(Response.Status.OK, getPageQueryParams(page, perPage),
"projects", getProjectIdOrPath(projectIdOrPath), "repository", "contributors");
return (respo... | [
"public",
"List",
"<",
"Contributor",
">",
"getContributors",
"(",
"Object",
"projectIdOrPath",
",",
"int",
"page",
",",
"int",
"perPage",
")",
"throws",
"GitLabApiException",
"{",
"Response",
"response",
"=",
"get",
"(",
"Response",
".",
"Status",
".",
"OK",
... | Get a list of contributors from a project and in the specified page range.
<pre><code>GitLab Endpoint: GET /projects/:id/repository/contributors</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 pro... | [
"Get",
"a",
"list",
"of",
"contributors",
"from",
"a",
"project",
"and",
"in",
"the",
"specified",
"page",
"range",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/RepositoryApi.java#L732-L736 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/RepositoryApi.java | RepositoryApi.getContributors | public Pager<Contributor> getContributors(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException {
return new Pager<Contributor>(this, Contributor.class, itemsPerPage, null, "projects",
getProjectIdOrPath(projectIdOrPath), "repository", "contributors");
} | java | public Pager<Contributor> getContributors(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException {
return new Pager<Contributor>(this, Contributor.class, itemsPerPage, null, "projects",
getProjectIdOrPath(projectIdOrPath), "repository", "contributors");
} | [
"public",
"Pager",
"<",
"Contributor",
">",
"getContributors",
"(",
"Object",
"projectIdOrPath",
",",
"int",
"itemsPerPage",
")",
"throws",
"GitLabApiException",
"{",
"return",
"new",
"Pager",
"<",
"Contributor",
">",
"(",
"this",
",",
"Contributor",
".",
"class... | Get a Pager of contributors from a project.
<pre><code>GitLab Endpoint: GET /projects/:id/repository/contributors</code></pre>
@param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
@param itemsPerPage the number of Project instances that will be fetched per page
@return a... | [
"Get",
"a",
"Pager",
"of",
"contributors",
"from",
"a",
"project",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/RepositoryApi.java#L748-L751 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/AbstractApi.java | AbstractApi.getProjectIdOrPath | public Object getProjectIdOrPath(Object obj) throws GitLabApiException {
if (obj == null) {
throw (new RuntimeException("Cannot determine ID or path from null object"));
} else if (obj instanceof Integer) {
return (obj);
} else if (obj instanceof String) {
re... | java | public Object getProjectIdOrPath(Object obj) throws GitLabApiException {
if (obj == null) {
throw (new RuntimeException("Cannot determine ID or path from null object"));
} else if (obj instanceof Integer) {
return (obj);
} else if (obj instanceof String) {
re... | [
"public",
"Object",
"getProjectIdOrPath",
"(",
"Object",
"obj",
")",
"throws",
"GitLabApiException",
"{",
"if",
"(",
"obj",
"==",
"null",
")",
"{",
"throw",
"(",
"new",
"RuntimeException",
"(",
"\"Cannot determine ID or path from null object\"",
")",
")",
";",
"}"... | Returns the project ID or path from the provided Integer, String, or Project instance.
@param obj the object to determine the ID or path from
@return the project ID or path from the provided Integer, String, or Project instance
@throws GitLabApiException if any exception occurs during execution | [
"Returns",
"the",
"project",
"ID",
"or",
"path",
"from",
"the",
"provided",
"Integer",
"String",
"or",
"Project",
"instance",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/AbstractApi.java#L37-L64 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/AbstractApi.java | AbstractApi.getGroupIdOrPath | public Object getGroupIdOrPath(Object obj) throws GitLabApiException {
if (obj == null) {
throw (new RuntimeException("Cannot determine ID or path from null object"));
} else if (obj instanceof Integer) {
return (obj);
} else if (obj instanceof String) {
retu... | java | public Object getGroupIdOrPath(Object obj) throws GitLabApiException {
if (obj == null) {
throw (new RuntimeException("Cannot determine ID or path from null object"));
} else if (obj instanceof Integer) {
return (obj);
} else if (obj instanceof String) {
retu... | [
"public",
"Object",
"getGroupIdOrPath",
"(",
"Object",
"obj",
")",
"throws",
"GitLabApiException",
"{",
"if",
"(",
"obj",
"==",
"null",
")",
"{",
"throw",
"(",
"new",
"RuntimeException",
"(",
"\"Cannot determine ID or path from null object\"",
")",
")",
";",
"}",
... | Returns the group ID or path from the provided Integer, String, or Group instance.
@param obj the object to determine the ID or path from
@return the group ID or path from the provided Integer, String, or Group instance
@throws GitLabApiException if any exception occurs during execution | [
"Returns",
"the",
"group",
"ID",
"or",
"path",
"from",
"the",
"provided",
"Integer",
"String",
"or",
"Group",
"instance",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/AbstractApi.java#L73-L100 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/AbstractApi.java | AbstractApi.getUserIdOrUsername | public Object getUserIdOrUsername(Object obj) throws GitLabApiException {
if (obj == null) {
throw (new RuntimeException("Cannot determine ID or username from null object"));
} else if (obj instanceof Integer) {
return (obj);
} else if (obj instanceof String) {
... | java | public Object getUserIdOrUsername(Object obj) throws GitLabApiException {
if (obj == null) {
throw (new RuntimeException("Cannot determine ID or username from null object"));
} else if (obj instanceof Integer) {
return (obj);
} else if (obj instanceof String) {
... | [
"public",
"Object",
"getUserIdOrUsername",
"(",
"Object",
"obj",
")",
"throws",
"GitLabApiException",
"{",
"if",
"(",
"obj",
"==",
"null",
")",
"{",
"throw",
"(",
"new",
"RuntimeException",
"(",
"\"Cannot determine ID or username from null object\"",
")",
")",
";",
... | Returns the user ID or path from the provided Integer, String, or User instance.
@param obj the object to determine the ID or username from
@return the user ID or username from the provided Integer, String, or User instance
@throws GitLabApiException if any exception occurs during execution | [
"Returns",
"the",
"user",
"ID",
"or",
"path",
"from",
"the",
"provided",
"Integer",
"String",
"or",
"User",
"instance",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/AbstractApi.java#L109-L136 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/AbstractApi.java | AbstractApi.urlEncode | protected String urlEncode(String s) throws GitLabApiException {
try {
String encoded = URLEncoder.encode(s, "UTF-8");
// Since the encode method encodes plus signs as %2B,
// we can simply replace the encoded spaces with the correct encoding here
encoded = encod... | java | protected String urlEncode(String s) throws GitLabApiException {
try {
String encoded = URLEncoder.encode(s, "UTF-8");
// Since the encode method encodes plus signs as %2B,
// we can simply replace the encoded spaces with the correct encoding here
encoded = encod... | [
"protected",
"String",
"urlEncode",
"(",
"String",
"s",
")",
"throws",
"GitLabApiException",
"{",
"try",
"{",
"String",
"encoded",
"=",
"URLEncoder",
".",
"encode",
"(",
"s",
",",
"\"UTF-8\"",
")",
";",
"// Since the encode method encodes plus signs as %2B,",
"// we... | Encode a string to be used as in-path argument for a gitlab api request.
Standard URL encoding changes spaces to plus signs, but for arguments that are part of the path,
like the :file_path in a "Get raw file" request, gitlab expects spaces to be encoded with %20.
@param s the string to encode
@return encoded version... | [
"Encode",
"a",
"string",
"to",
"be",
"used",
"as",
"in",
"-",
"path",
"argument",
"for",
"a",
"gitlab",
"api",
"request",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/AbstractApi.java#L164-L177 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/AbstractApi.java | AbstractApi.post | protected Response post(Response.Status expectedStatus, StreamingOutput stream, String mediaType, Object... pathArgs) throws GitLabApiException {
try {
return validate(getApiClient().post(stream, mediaType, pathArgs), expectedStatus);
} catch (Exception e) {
throw handle(e);
... | java | protected Response post(Response.Status expectedStatus, StreamingOutput stream, String mediaType, Object... pathArgs) throws GitLabApiException {
try {
return validate(getApiClient().post(stream, mediaType, pathArgs), expectedStatus);
} catch (Exception e) {
throw handle(e);
... | [
"protected",
"Response",
"post",
"(",
"Response",
".",
"Status",
"expectedStatus",
",",
"StreamingOutput",
"stream",
",",
"String",
"mediaType",
",",
"Object",
"...",
"pathArgs",
")",
"throws",
"GitLabApiException",
"{",
"try",
"{",
"return",
"validate",
"(",
"g... | Perform an HTTP POST call with the specified payload object and path objects, returning
a ClientResponse instance with the data returned from the endpoint.
@param expectedStatus the HTTP status that should be returned from the server
@param stream the StreamingOutput that will be used for the POST data
@param mediaTyp... | [
"Perform",
"an",
"HTTP",
"POST",
"call",
"with",
"the",
"specified",
"payload",
"object",
"and",
"path",
"objects",
"returning",
"a",
"ClientResponse",
"instance",
"with",
"the",
"data",
"returned",
"from",
"the",
"endpoint",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/AbstractApi.java#L299-L305 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/AbstractApi.java | AbstractApi.upload | protected Response upload(Response.Status expectedStatus, String name, File fileToUpload, String mediaType, URL url) throws GitLabApiException {
try {
return validate(getApiClient().upload(name, fileToUpload, mediaType, url), expectedStatus);
} catch (Exception e) {
throw handle(... | java | protected Response upload(Response.Status expectedStatus, String name, File fileToUpload, String mediaType, URL url) throws GitLabApiException {
try {
return validate(getApiClient().upload(name, fileToUpload, mediaType, url), expectedStatus);
} catch (Exception e) {
throw handle(... | [
"protected",
"Response",
"upload",
"(",
"Response",
".",
"Status",
"expectedStatus",
",",
"String",
"name",
",",
"File",
"fileToUpload",
",",
"String",
"mediaType",
",",
"URL",
"url",
")",
"throws",
"GitLabApiException",
"{",
"try",
"{",
"return",
"validate",
... | Perform a file upload with the specified File instance and path objects, returning
a ClientResponse instance with the data returned from the endpoint.
@param expectedStatus the HTTP status that should be returned from the server
@param name the name for the form field that contains the file name
@param fileToUpload a ... | [
"Perform",
"a",
"file",
"upload",
"with",
"the",
"specified",
"File",
"instance",
"and",
"path",
"objects",
"returning",
"a",
"ClientResponse",
"instance",
"with",
"the",
"data",
"returned",
"from",
"the",
"endpoint",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/AbstractApi.java#L375-L381 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/AbstractApi.java | AbstractApi.put | protected Response put(Response.Status expectedStatus, MultivaluedMap<String, String> queryParams, Object... pathArgs) throws GitLabApiException {
try {
return validate(getApiClient().put(queryParams, pathArgs), expectedStatus);
} catch (Exception e) {
throw handle(e);
}
... | java | protected Response put(Response.Status expectedStatus, MultivaluedMap<String, String> queryParams, Object... pathArgs) throws GitLabApiException {
try {
return validate(getApiClient().put(queryParams, pathArgs), expectedStatus);
} catch (Exception e) {
throw handle(e);
}
... | [
"protected",
"Response",
"put",
"(",
"Response",
".",
"Status",
"expectedStatus",
",",
"MultivaluedMap",
"<",
"String",
",",
"String",
">",
"queryParams",
",",
"Object",
"...",
"pathArgs",
")",
"throws",
"GitLabApiException",
"{",
"try",
"{",
"return",
"validate... | Perform an HTTP PUT call with the specified form data and path objects, returning
a ClientResponse instance with the data returned from the endpoint.
@param expectedStatus the HTTP status that should be returned from the server
@param queryParams multivalue map of request parameters
@param pathArgs variable list of ar... | [
"Perform",
"an",
"HTTP",
"PUT",
"call",
"with",
"the",
"specified",
"form",
"data",
"and",
"path",
"objects",
"returning",
"a",
"ClientResponse",
"instance",
"with",
"the",
"data",
"returned",
"from",
"the",
"endpoint",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/AbstractApi.java#L415-L421 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/AbstractApi.java | AbstractApi.putUpload | protected Response putUpload(Response.Status expectedStatus, String name, File fileToUpload, Object... pathArgs) throws GitLabApiException {
try {
return validate(getApiClient().putUpload(name, fileToUpload, pathArgs), expectedStatus);
} catch (Exception e) {
throw handle(e);
... | java | protected Response putUpload(Response.Status expectedStatus, String name, File fileToUpload, Object... pathArgs) throws GitLabApiException {
try {
return validate(getApiClient().putUpload(name, fileToUpload, pathArgs), expectedStatus);
} catch (Exception e) {
throw handle(e);
... | [
"protected",
"Response",
"putUpload",
"(",
"Response",
".",
"Status",
"expectedStatus",
",",
"String",
"name",
",",
"File",
"fileToUpload",
",",
"Object",
"...",
"pathArgs",
")",
"throws",
"GitLabApiException",
"{",
"try",
"{",
"return",
"validate",
"(",
"getApi... | Perform a file upload using the HTTP PUT method with the specified File instance and path objects,
returning a ClientResponse instance with the data returned from the endpoint.
@param expectedStatus the HTTP status that should be returned from the server
@param name the name for the form field that contains the file n... | [
"Perform",
"a",
"file",
"upload",
"using",
"the",
"HTTP",
"PUT",
"method",
"with",
"the",
"specified",
"File",
"instance",
"and",
"path",
"objects",
"returning",
"a",
"ClientResponse",
"instance",
"with",
"the",
"data",
"returned",
"from",
"the",
"endpoint",
"... | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/AbstractApi.java#L471-L477 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/AbstractApi.java | AbstractApi.validate | protected Response validate(Response response, Response.Status expected) throws GitLabApiException {
int responseCode = response.getStatus();
int expectedResponseCode = expected.getStatusCode();
if (responseCode != expectedResponseCode) {
// If the expected code is 200-204 and the... | java | protected Response validate(Response response, Response.Status expected) throws GitLabApiException {
int responseCode = response.getStatus();
int expectedResponseCode = expected.getStatusCode();
if (responseCode != expectedResponseCode) {
// If the expected code is 200-204 and the... | [
"protected",
"Response",
"validate",
"(",
"Response",
"response",
",",
"Response",
".",
"Status",
"expected",
")",
"throws",
"GitLabApiException",
"{",
"int",
"responseCode",
"=",
"response",
".",
"getStatus",
"(",
")",
";",
"int",
"expectedResponseCode",
"=",
"... | Validates response the response from the server against the expected HTTP status and
the returned secret token, if either is not correct will throw a GitLabApiException.
@param response response
@param expected expected response status
@return original response if the response status is expected
@throws GitLabApiExcep... | [
"Validates",
"response",
"the",
"response",
"from",
"the",
"server",
"against",
"the",
"expected",
"HTTP",
"status",
"and",
"the",
"returned",
"secret",
"token",
"if",
"either",
"is",
"not",
"correct",
"will",
"throw",
"a",
"GitLabApiException",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/AbstractApi.java#L583-L601 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/AbstractApi.java | AbstractApi.handle | protected GitLabApiException handle(Exception thrown) {
if (thrown instanceof GitLabApiException) {
return ((GitLabApiException) thrown);
}
return (new GitLabApiException(thrown));
} | java | protected GitLabApiException handle(Exception thrown) {
if (thrown instanceof GitLabApiException) {
return ((GitLabApiException) thrown);
}
return (new GitLabApiException(thrown));
} | [
"protected",
"GitLabApiException",
"handle",
"(",
"Exception",
"thrown",
")",
"{",
"if",
"(",
"thrown",
"instanceof",
"GitLabApiException",
")",
"{",
"return",
"(",
"(",
"GitLabApiException",
")",
"thrown",
")",
";",
"}",
"return",
"(",
"new",
"GitLabApiExceptio... | Wraps an exception in a GitLabApiException if needed.
@param thrown the exception that should be wrapped
@return either the untouched GitLabApiException or a new GitLabApiExceptin wrapping a non-GitLabApiException | [
"Wraps",
"an",
"exception",
"in",
"a",
"GitLabApiException",
"if",
"needed",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/AbstractApi.java#L609-L616 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/AbstractApi.java | AbstractApi.getPerPageQueryParam | protected MultivaluedMap<String, String> getPerPageQueryParam(int perPage) {
return (new GitLabApiForm().withParam(PER_PAGE_PARAM, perPage).asMap());
} | java | protected MultivaluedMap<String, String> getPerPageQueryParam(int perPage) {
return (new GitLabApiForm().withParam(PER_PAGE_PARAM, perPage).asMap());
} | [
"protected",
"MultivaluedMap",
"<",
"String",
",",
"String",
">",
"getPerPageQueryParam",
"(",
"int",
"perPage",
")",
"{",
"return",
"(",
"new",
"GitLabApiForm",
"(",
")",
".",
"withParam",
"(",
"PER_PAGE_PARAM",
",",
"perPage",
")",
".",
"asMap",
"(",
")",
... | Creates a MultivaluedMap instance containing the "per_page" param.
@param perPage the number of projects per page
@return a MultivaluedMap instance containing the "per_page" param | [
"Creates",
"a",
"MultivaluedMap",
"instance",
"containing",
"the",
"per_page",
"param",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/AbstractApi.java#L624-L626 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/AbstractApi.java | AbstractApi.getDefaultPerPageParam | protected MultivaluedMap<String, String> getDefaultPerPageParam(boolean customAttributesEnabled) {
GitLabApiForm form = new GitLabApiForm().withParam(PER_PAGE_PARAM, getDefaultPerPage());
if (customAttributesEnabled)
return (form.withParam("with_custom_attributes", true).asMap());
... | java | protected MultivaluedMap<String, String> getDefaultPerPageParam(boolean customAttributesEnabled) {
GitLabApiForm form = new GitLabApiForm().withParam(PER_PAGE_PARAM, getDefaultPerPage());
if (customAttributesEnabled)
return (form.withParam("with_custom_attributes", true).asMap());
... | [
"protected",
"MultivaluedMap",
"<",
"String",
",",
"String",
">",
"getDefaultPerPageParam",
"(",
"boolean",
"customAttributesEnabled",
")",
"{",
"GitLabApiForm",
"form",
"=",
"new",
"GitLabApiForm",
"(",
")",
".",
"withParam",
"(",
"PER_PAGE_PARAM",
",",
"getDefault... | Creates a MultivaluedMap instance containing the "per_page" param with the default value.
@param customAttributesEnabled enables customAttributes for this query
@return a MultivaluedMap instance containing the "per_page" param with the default value | [
"Creates",
"a",
"MultivaluedMap",
"instance",
"containing",
"the",
"per_page",
"param",
"with",
"the",
"default",
"value",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/AbstractApi.java#L671-L678 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/GitLabApiClient.java | GitLabApiClient.enableRequestResponseLogging | void enableRequestResponseLogging(Logger logger, Level level, int maxEntityLength, List<String> maskedHeaderNames) {
MaskingLoggingFilter loggingFilter = new MaskingLoggingFilter(logger, level, maxEntityLength, maskedHeaderNames);
clientConfig.register(loggingFilter);
// Recreate the Client in... | java | void enableRequestResponseLogging(Logger logger, Level level, int maxEntityLength, List<String> maskedHeaderNames) {
MaskingLoggingFilter loggingFilter = new MaskingLoggingFilter(logger, level, maxEntityLength, maskedHeaderNames);
clientConfig.register(loggingFilter);
// Recreate the Client in... | [
"void",
"enableRequestResponseLogging",
"(",
"Logger",
"logger",
",",
"Level",
"level",
",",
"int",
"maxEntityLength",
",",
"List",
"<",
"String",
">",
"maskedHeaderNames",
")",
"{",
"MaskingLoggingFilter",
"loggingFilter",
"=",
"new",
"MaskingLoggingFilter",
"(",
"... | Enable the logging of the requests to and the responses from the GitLab server API.
@param logger the Logger instance to log to
@param level the logging level (SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST)
@param maxEntitySize maximum number of entity bytes to be logged. When logging if the maxEntitySize
is rea... | [
"Enable",
"the",
"logging",
"of",
"the",
"requests",
"to",
"and",
"the",
"responses",
"from",
"the",
"GitLab",
"server",
"API",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/GitLabApiClient.java#L253-L262 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/GitLabApiClient.java | GitLabApiClient.getApiUrl | protected URL getApiUrl(Object... pathArgs) throws IOException {
String url = appendPathArgs(this.hostUrl, pathArgs);
return (new URL(url));
} | java | protected URL getApiUrl(Object... pathArgs) throws IOException {
String url = appendPathArgs(this.hostUrl, pathArgs);
return (new URL(url));
} | [
"protected",
"URL",
"getApiUrl",
"(",
"Object",
"...",
"pathArgs",
")",
"throws",
"IOException",
"{",
"String",
"url",
"=",
"appendPathArgs",
"(",
"this",
".",
"hostUrl",
",",
"pathArgs",
")",
";",
"return",
"(",
"new",
"URL",
"(",
"url",
")",
")",
";",
... | Construct a REST URL with the specified path arguments.
@param pathArgs variable list of arguments used to build the URI
@return a REST URL with the specified path arguments
@throws IOException if an error occurs while constructing the URL | [
"Construct",
"a",
"REST",
"URL",
"with",
"the",
"specified",
"path",
"arguments",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/GitLabApiClient.java#L315-L318 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/GitLabApiClient.java | GitLabApiClient.getUrlWithBase | protected URL getUrlWithBase(Object... pathArgs) throws IOException {
String url = appendPathArgs(this.baseUrl, pathArgs);
return (new URL(url));
} | java | protected URL getUrlWithBase(Object... pathArgs) throws IOException {
String url = appendPathArgs(this.baseUrl, pathArgs);
return (new URL(url));
} | [
"protected",
"URL",
"getUrlWithBase",
"(",
"Object",
"...",
"pathArgs",
")",
"throws",
"IOException",
"{",
"String",
"url",
"=",
"appendPathArgs",
"(",
"this",
".",
"baseUrl",
",",
"pathArgs",
")",
";",
"return",
"(",
"new",
"URL",
"(",
"url",
")",
")",
... | Construct a REST URL with the specified path arguments using
Gitlab base url.
@param pathArgs variable list of arguments used to build the URI
@return a REST URL with the specified path arguments
@throws IOException if an error occurs while constructing the URL | [
"Construct",
"a",
"REST",
"URL",
"with",
"the",
"specified",
"path",
"arguments",
"using",
"Gitlab",
"base",
"url",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/GitLabApiClient.java#L328-L331 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/GitLabApiClient.java | GitLabApiClient.getWithAccepts | protected Response getWithAccepts(MultivaluedMap<String, String> queryParams, String accepts, Object... pathArgs) throws IOException {
URL url = getApiUrl(pathArgs);
return (getWithAccepts(queryParams, url, accepts));
} | java | protected Response getWithAccepts(MultivaluedMap<String, String> queryParams, String accepts, Object... pathArgs) throws IOException {
URL url = getApiUrl(pathArgs);
return (getWithAccepts(queryParams, url, accepts));
} | [
"protected",
"Response",
"getWithAccepts",
"(",
"MultivaluedMap",
"<",
"String",
",",
"String",
">",
"queryParams",
",",
"String",
"accepts",
",",
"Object",
"...",
"pathArgs",
")",
"throws",
"IOException",
"{",
"URL",
"url",
"=",
"getApiUrl",
"(",
"pathArgs",
... | Perform an HTTP GET call with the specified query parameters and path objects, returning
a ClientResponse instance with the data returned from the endpoint.
@param queryParams multivalue map of request parameters
@param accepts if non-empty will set the Accepts header to this value
@param pathArgs variable list of arg... | [
"Perform",
"an",
"HTTP",
"GET",
"call",
"with",
"the",
"specified",
"query",
"parameters",
"and",
"path",
"objects",
"returning",
"a",
"ClientResponse",
"instance",
"with",
"the",
"data",
"returned",
"from",
"the",
"endpoint",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/GitLabApiClient.java#L399-L402 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/GitLabApiClient.java | GitLabApiClient.head | protected Response head(MultivaluedMap<String, String> queryParams, Object... pathArgs) throws IOException {
URL url = getApiUrl(pathArgs);
return (head(queryParams, url));
} | java | protected Response head(MultivaluedMap<String, String> queryParams, Object... pathArgs) throws IOException {
URL url = getApiUrl(pathArgs);
return (head(queryParams, url));
} | [
"protected",
"Response",
"head",
"(",
"MultivaluedMap",
"<",
"String",
",",
"String",
">",
"queryParams",
",",
"Object",
"...",
"pathArgs",
")",
"throws",
"IOException",
"{",
"URL",
"url",
"=",
"getApiUrl",
"(",
"pathArgs",
")",
";",
"return",
"(",
"head",
... | Perform an HTTP HEAD call with the specified query parameters and path objects, returning
a ClientResponse instance with the data returned from the endpoint.
@param queryParams multivalue map of request parameters
@param pathArgs variable list of arguments used to build the URI
@return a ClientResponse instance with t... | [
"Perform",
"an",
"HTTP",
"HEAD",
"call",
"with",
"the",
"specified",
"query",
"parameters",
"and",
"path",
"objects",
"returning",
"a",
"ClientResponse",
"instance",
"with",
"the",
"data",
"returned",
"from",
"the",
"endpoint",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/GitLabApiClient.java#L426-L429 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/GitLabApiClient.java | GitLabApiClient.head | protected Response head(MultivaluedMap<String, String> queryParams, URL url) {
return (invocation(url, queryParams).head());
} | java | protected Response head(MultivaluedMap<String, String> queryParams, URL url) {
return (invocation(url, queryParams).head());
} | [
"protected",
"Response",
"head",
"(",
"MultivaluedMap",
"<",
"String",
",",
"String",
">",
"queryParams",
",",
"URL",
"url",
")",
"{",
"return",
"(",
"invocation",
"(",
"url",
",",
"queryParams",
")",
".",
"head",
"(",
")",
")",
";",
"}"
] | Perform an HTTP HEAD call with the specified query parameters and URL, returning
a ClientResponse instance with the data returned from the endpoint.
@param queryParams multivalue map of request parameters
@param url the fully formed path to the GitLab API endpoint
@return a ClientResponse instance with the data return... | [
"Perform",
"an",
"HTTP",
"HEAD",
"call",
"with",
"the",
"specified",
"query",
"parameters",
"and",
"URL",
"returning",
"a",
"ClientResponse",
"instance",
"with",
"the",
"data",
"returned",
"from",
"the",
"endpoint",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/GitLabApiClient.java#L439-L441 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/GitLabApiClient.java | GitLabApiClient.post | protected Response post(Object payload, Object... pathArgs) throws IOException {
URL url = getApiUrl(pathArgs);
Entity<?> entity = Entity.entity(payload, MediaType.APPLICATION_JSON);
return (invocation(url, null).post(entity));
} | java | protected Response post(Object payload, Object... pathArgs) throws IOException {
URL url = getApiUrl(pathArgs);
Entity<?> entity = Entity.entity(payload, MediaType.APPLICATION_JSON);
return (invocation(url, null).post(entity));
} | [
"protected",
"Response",
"post",
"(",
"Object",
"payload",
",",
"Object",
"...",
"pathArgs",
")",
"throws",
"IOException",
"{",
"URL",
"url",
"=",
"getApiUrl",
"(",
"pathArgs",
")",
";",
"Entity",
"<",
"?",
">",
"entity",
"=",
"Entity",
".",
"entity",
"(... | Perform an HTTP POST call with the specified payload object and URL, returning
a ClientResponse instance with the data returned from the endpoint.
@param payload the object instance that will be serialized to JSON and used as the POST data
@param pathArgs variable list of arguments used to build the URI
@return a Clie... | [
"Perform",
"an",
"HTTP",
"POST",
"call",
"with",
"the",
"specified",
"payload",
"object",
"and",
"URL",
"returning",
"a",
"ClientResponse",
"instance",
"with",
"the",
"data",
"returned",
"from",
"the",
"endpoint",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/GitLabApiClient.java#L507-L511 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/GitLabApiClient.java | GitLabApiClient.post | protected Response post(StreamingOutput stream, String mediaType, Object... pathArgs) throws IOException {
URL url = getApiUrl(pathArgs);
return (invocation(url, null).post(Entity.entity(stream, mediaType)));
} | java | protected Response post(StreamingOutput stream, String mediaType, Object... pathArgs) throws IOException {
URL url = getApiUrl(pathArgs);
return (invocation(url, null).post(Entity.entity(stream, mediaType)));
} | [
"protected",
"Response",
"post",
"(",
"StreamingOutput",
"stream",
",",
"String",
"mediaType",
",",
"Object",
"...",
"pathArgs",
")",
"throws",
"IOException",
"{",
"URL",
"url",
"=",
"getApiUrl",
"(",
"pathArgs",
")",
";",
"return",
"(",
"invocation",
"(",
"... | Perform an HTTP POST call with the specified StreamingOutput, MediaType, and path objects, returning
a ClientResponse instance with the data returned from the endpoint.
@param stream the StreamingOutput instance that contains the POST data
@param mediaType the content-type of the POST data
@param pathArgs variable lis... | [
"Perform",
"an",
"HTTP",
"POST",
"call",
"with",
"the",
"specified",
"StreamingOutput",
"MediaType",
"and",
"path",
"objects",
"returning",
"a",
"ClientResponse",
"instance",
"with",
"the",
"data",
"returned",
"from",
"the",
"endpoint",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/GitLabApiClient.java#L523-L526 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/GitLabApiClient.java | GitLabApiClient.upload | protected Response upload(String name, File fileToUpload, String mediaTypeString, Object... pathArgs) throws IOException {
URL url = getApiUrl(pathArgs);
return (upload(name, fileToUpload, mediaTypeString, null, url));
} | java | protected Response upload(String name, File fileToUpload, String mediaTypeString, Object... pathArgs) throws IOException {
URL url = getApiUrl(pathArgs);
return (upload(name, fileToUpload, mediaTypeString, null, url));
} | [
"protected",
"Response",
"upload",
"(",
"String",
"name",
",",
"File",
"fileToUpload",
",",
"String",
"mediaTypeString",
",",
"Object",
"...",
"pathArgs",
")",
"throws",
"IOException",
"{",
"URL",
"url",
"=",
"getApiUrl",
"(",
"pathArgs",
")",
";",
"return",
... | Perform a file upload using the specified media type, returning
a ClientResponse instance with the data returned from the endpoint.
@param name the name for the form field that contains the file name
@param fileToUpload a File instance pointing to the file to upload
@param mediaTypeString the content-type of the uploa... | [
"Perform",
"a",
"file",
"upload",
"using",
"the",
"specified",
"media",
"type",
"returning",
"a",
"ClientResponse",
"instance",
"with",
"the",
"data",
"returned",
"from",
"the",
"endpoint",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/GitLabApiClient.java#L539-L542 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/GitLabApiClient.java | GitLabApiClient.delete | protected Response delete(MultivaluedMap<String, String> queryParams, Object... pathArgs) throws IOException {
return (delete(queryParams, getApiUrl(pathArgs)));
} | java | protected Response delete(MultivaluedMap<String, String> queryParams, Object... pathArgs) throws IOException {
return (delete(queryParams, getApiUrl(pathArgs)));
} | [
"protected",
"Response",
"delete",
"(",
"MultivaluedMap",
"<",
"String",
",",
"String",
">",
"queryParams",
",",
"Object",
"...",
"pathArgs",
")",
"throws",
"IOException",
"{",
"return",
"(",
"delete",
"(",
"queryParams",
",",
"getApiUrl",
"(",
"pathArgs",
")"... | Perform an HTTP DELETE call with the specified form data and path objects, returning
a Response instance with the data returned from the endpoint.
@param queryParams multivalue map of request parameters
@param pathArgs variable list of arguments used to build the URI
@return a Response instance with the data returned ... | [
"Perform",
"an",
"HTTP",
"DELETE",
"call",
"with",
"the",
"specified",
"form",
"data",
"and",
"path",
"objects",
"returning",
"a",
"Response",
"instance",
"with",
"the",
"data",
"returned",
"from",
"the",
"endpoint",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/GitLabApiClient.java#L700-L702 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/GitLabApiClient.java | GitLabApiClient.delete | protected Response delete(MultivaluedMap<String, String> queryParams, URL url) {
return (invocation(url, queryParams).delete());
} | java | protected Response delete(MultivaluedMap<String, String> queryParams, URL url) {
return (invocation(url, queryParams).delete());
} | [
"protected",
"Response",
"delete",
"(",
"MultivaluedMap",
"<",
"String",
",",
"String",
">",
"queryParams",
",",
"URL",
"url",
")",
"{",
"return",
"(",
"invocation",
"(",
"url",
",",
"queryParams",
")",
".",
"delete",
"(",
")",
")",
";",
"}"
] | Perform an HTTP DELETE call with the specified form data and URL, returning
a Response instance with the data returned from the endpoint.
@param queryParams multivalue map of request parameters
@param url the fully formed path to the GitLab API endpoint
@return a Response instance with the data returned from the endpo... | [
"Perform",
"an",
"HTTP",
"DELETE",
"call",
"with",
"the",
"specified",
"form",
"data",
"and",
"URL",
"returning",
"a",
"Response",
"instance",
"with",
"the",
"data",
"returned",
"from",
"the",
"endpoint",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/GitLabApiClient.java#L712-L714 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/GitLabApiClient.java | GitLabApiClient.setIgnoreCertificateErrors | public void setIgnoreCertificateErrors(boolean ignoreCertificateErrors) {
if (this.ignoreCertificateErrors == ignoreCertificateErrors) {
return;
}
if (!ignoreCertificateErrors) {
this.ignoreCertificateErrors = false;
openSslContext = null;
openH... | java | public void setIgnoreCertificateErrors(boolean ignoreCertificateErrors) {
if (this.ignoreCertificateErrors == ignoreCertificateErrors) {
return;
}
if (!ignoreCertificateErrors) {
this.ignoreCertificateErrors = false;
openSslContext = null;
openH... | [
"public",
"void",
"setIgnoreCertificateErrors",
"(",
"boolean",
"ignoreCertificateErrors",
")",
"{",
"if",
"(",
"this",
".",
"ignoreCertificateErrors",
"==",
"ignoreCertificateErrors",
")",
"{",
"return",
";",
"}",
"if",
"(",
"!",
"ignoreCertificateErrors",
")",
"{"... | Sets up the Jersey system ignore SSL certificate errors or not.
@param ignoreCertificateErrors if true will set up the Jersey system ignore SSL certificate errors | [
"Sets",
"up",
"the",
"Jersey",
"system",
"ignore",
"SSL",
"certificate",
"errors",
"or",
"not",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/GitLabApiClient.java#L777-L801 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/GitLabApiClient.java | GitLabApiClient.setupIgnoreCertificateErrors | private boolean setupIgnoreCertificateErrors() {
// Create a TrustManager that trusts all certificates
TrustManager[] trustAllCerts = new TrustManager[] { new X509ExtendedTrustManager() {
@Override
public X509Certificate[] getAcceptedIssuers() {
return null;
... | java | private boolean setupIgnoreCertificateErrors() {
// Create a TrustManager that trusts all certificates
TrustManager[] trustAllCerts = new TrustManager[] { new X509ExtendedTrustManager() {
@Override
public X509Certificate[] getAcceptedIssuers() {
return null;
... | [
"private",
"boolean",
"setupIgnoreCertificateErrors",
"(",
")",
"{",
"// Create a TrustManager that trusts all certificates",
"TrustManager",
"[",
"]",
"trustAllCerts",
"=",
"new",
"TrustManager",
"[",
"]",
"{",
"new",
"X509ExtendedTrustManager",
"(",
")",
"{",
"@",
"Ov... | Sets up Jersey client to ignore certificate errors.
@return true if successful at setting up to ignore certificate errors, otherwise returns false. | [
"Sets",
"up",
"Jersey",
"client",
"to",
"ignore",
"certificate",
"errors",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/GitLabApiClient.java#L808-L861 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/JobApi.java | JobApi.getJobs | public List<Job> getJobs(Object projectIdOrPath, int page, int perPage) throws GitLabApiException {
Response response = get(Response.Status.OK, getPageQueryParams(page, perPage), "projects", getProjectIdOrPath(projectIdOrPath), "jobs");
return (response.readEntity(new GenericType<List<Job>>() {}));
... | java | public List<Job> getJobs(Object projectIdOrPath, int page, int perPage) throws GitLabApiException {
Response response = get(Response.Status.OK, getPageQueryParams(page, perPage), "projects", getProjectIdOrPath(projectIdOrPath), "jobs");
return (response.readEntity(new GenericType<List<Job>>() {}));
... | [
"public",
"List",
"<",
"Job",
">",
"getJobs",
"(",
"Object",
"projectIdOrPath",
",",
"int",
"page",
",",
"int",
"perPage",
")",
"throws",
"GitLabApiException",
"{",
"Response",
"response",
"=",
"get",
"(",
"Response",
".",
"Status",
".",
"OK",
",",
"getPag... | Get a list of jobs in a project in the specified page range.
<pre><code>GitLab Endpoint: GET /projects/:id/jobs</code></pre>
@param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path to get the jobs for
@param page the page to get
@param perPage the number of Job instances p... | [
"Get",
"a",
"list",
"of",
"jobs",
"in",
"a",
"project",
"in",
"the",
"specified",
"page",
"range",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/JobApi.java#L55-L58 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/JobApi.java | JobApi.getJobs | public Pager<Job> getJobs(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException {
return (new Pager<Job>(this, Job.class, itemsPerPage, null, "projects", getProjectIdOrPath(projectIdOrPath), "jobs"));
} | java | public Pager<Job> getJobs(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException {
return (new Pager<Job>(this, Job.class, itemsPerPage, null, "projects", getProjectIdOrPath(projectIdOrPath), "jobs"));
} | [
"public",
"Pager",
"<",
"Job",
">",
"getJobs",
"(",
"Object",
"projectIdOrPath",
",",
"int",
"itemsPerPage",
")",
"throws",
"GitLabApiException",
"{",
"return",
"(",
"new",
"Pager",
"<",
"Job",
">",
"(",
"this",
",",
"Job",
".",
"class",
",",
"itemsPerPage... | Get a Pager of jobs in a project.
<pre><code>GitLab Endpoint: GET /projects/:id/jobs</code></pre>
@param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path to get the jobs for
@param itemsPerPage the number of Job instances that will be fetched per page
@return a Pager conta... | [
"Get",
"a",
"Pager",
"of",
"jobs",
"in",
"a",
"project",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/JobApi.java#L70-L72 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/JobApi.java | JobApi.getJobsStream | public Stream<Job> getJobsStream(Object projectIdOrPath) throws GitLabApiException {
return (getJobs(projectIdOrPath, getDefaultPerPage()).stream());
} | java | public Stream<Job> getJobsStream(Object projectIdOrPath) throws GitLabApiException {
return (getJobs(projectIdOrPath, getDefaultPerPage()).stream());
} | [
"public",
"Stream",
"<",
"Job",
">",
"getJobsStream",
"(",
"Object",
"projectIdOrPath",
")",
"throws",
"GitLabApiException",
"{",
"return",
"(",
"getJobs",
"(",
"projectIdOrPath",
",",
"getDefaultPerPage",
"(",
")",
")",
".",
"stream",
"(",
")",
")",
";",
"}... | Get a Stream of jobs in a project.
<pre><code>GitLab Endpoint: GET /projects/:id/jobs</code></pre>
@param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path
@return a Stream containing the jobs for the specified project ID
@throws GitLabApiException if any exception occurs d... | [
"Get",
"a",
"Stream",
"of",
"jobs",
"in",
"a",
"project",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/JobApi.java#L83-L85 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/JobApi.java | JobApi.getJob | public Job getJob(Object projectIdOrPath, int jobId) throws GitLabApiException {
Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId);
return (response.readEntity(Job.class));
} | java | public Job getJob(Object projectIdOrPath, int jobId) throws GitLabApiException {
Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId);
return (response.readEntity(Job.class));
} | [
"public",
"Job",
"getJob",
"(",
"Object",
"projectIdOrPath",
",",
"int",
"jobId",
")",
"throws",
"GitLabApiException",
"{",
"Response",
"response",
"=",
"get",
"(",
"Response",
".",
"Status",
".",
"OK",
",",
"null",
",",
"\"projects\"",
",",
"getProjectIdOrPat... | Get single job in a project.
<pre><code>GitLab Endpoint: GET /projects/:id/jobs/:job_id</code></pre>
@param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path to get the job for
@param jobId the job ID to get
@return a single job for the specified project ID
@throws GitLabAp... | [
"Get",
"single",
"job",
"in",
"a",
"project",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/JobApi.java#L175-L178 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/JobApi.java | JobApi.getOptionalJob | public Optional<Job> getOptionalJob(Object projectIdOrPath, int jobId) {
try {
return (Optional.ofNullable(getJob(projectIdOrPath, jobId)));
} catch (GitLabApiException glae) {
return (GitLabApi.createOptionalFromException(glae));
}
} | java | public Optional<Job> getOptionalJob(Object projectIdOrPath, int jobId) {
try {
return (Optional.ofNullable(getJob(projectIdOrPath, jobId)));
} catch (GitLabApiException glae) {
return (GitLabApi.createOptionalFromException(glae));
}
} | [
"public",
"Optional",
"<",
"Job",
">",
"getOptionalJob",
"(",
"Object",
"projectIdOrPath",
",",
"int",
"jobId",
")",
"{",
"try",
"{",
"return",
"(",
"Optional",
".",
"ofNullable",
"(",
"getJob",
"(",
"projectIdOrPath",
",",
"jobId",
")",
")",
")",
";",
"... | Get single job in a project as an Optional instance.
<pre><code>GitLab Endpoint: GET /projects/:id/jobs/:job_id</code></pre>
@param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path to get the job for
@param jobId the job ID to get
@return a single job for the specified pro... | [
"Get",
"single",
"job",
"in",
"a",
"project",
"as",
"an",
"Optional",
"instance",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/JobApi.java#L189-L195 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/JobApi.java | JobApi.downloadArtifactsFile | public InputStream downloadArtifactsFile(Object projectIdOrPath, String ref, String jobName) throws GitLabApiException {
Form formData = new GitLabApiForm().withParam("job", jobName, true);
Response response = getWithAccepts(Response.Status.OK, formData.asMap(), MediaType.MEDIA_TYPE_WILDCARD,
... | java | public InputStream downloadArtifactsFile(Object projectIdOrPath, String ref, String jobName) throws GitLabApiException {
Form formData = new GitLabApiForm().withParam("job", jobName, true);
Response response = getWithAccepts(Response.Status.OK, formData.asMap(), MediaType.MEDIA_TYPE_WILDCARD,
... | [
"public",
"InputStream",
"downloadArtifactsFile",
"(",
"Object",
"projectIdOrPath",
",",
"String",
"ref",
",",
"String",
"jobName",
")",
"throws",
"GitLabApiException",
"{",
"Form",
"formData",
"=",
"new",
"GitLabApiForm",
"(",
")",
".",
"withParam",
"(",
"\"job\"... | Get an InputStream pointing to the artifacts file from the given reference name and job
provided the job finished successfully. The file will be saved to the specified directory.
If the file already exists in the directory it will be overwritten.
<pre><code>GitLab Endpoint: GET /projects/:id/jobs/artifacts/:ref_name/d... | [
"Get",
"an",
"InputStream",
"pointing",
"to",
"the",
"artifacts",
"file",
"from",
"the",
"given",
"reference",
"name",
"and",
"job",
"provided",
"the",
"job",
"finished",
"successfully",
".",
"The",
"file",
"will",
"be",
"saved",
"to",
"the",
"specified",
"d... | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/JobApi.java#L247-L252 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/JobApi.java | JobApi.downloadArtifactsFile | public InputStream downloadArtifactsFile(Object projectIdOrPath, Integer jobId) throws GitLabApiException {
Response response = getWithAccepts(Response.Status.OK, null, MediaType.MEDIA_TYPE_WILDCARD,
"projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId, "artifacts");
return (re... | java | public InputStream downloadArtifactsFile(Object projectIdOrPath, Integer jobId) throws GitLabApiException {
Response response = getWithAccepts(Response.Status.OK, null, MediaType.MEDIA_TYPE_WILDCARD,
"projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId, "artifacts");
return (re... | [
"public",
"InputStream",
"downloadArtifactsFile",
"(",
"Object",
"projectIdOrPath",
",",
"Integer",
"jobId",
")",
"throws",
"GitLabApiException",
"{",
"Response",
"response",
"=",
"getWithAccepts",
"(",
"Response",
".",
"Status",
".",
"OK",
",",
"null",
",",
"Medi... | Get an InputStream pointing to the job artifacts file for the specified job ID.
<pre><code>GitLab Endpoint: GET /projects/:id/jobs/:job_id/artifacts</code></pre>
@param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path
@param jobId the job ID to get the artifacts for
@retur... | [
"Get",
"an",
"InputStream",
"pointing",
"to",
"the",
"job",
"artifacts",
"file",
"for",
"the",
"specified",
"job",
"ID",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/JobApi.java#L298-L302 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/JobApi.java | JobApi.getTrace | public String getTrace(Object projectIdOrPath, int jobId) throws GitLabApiException {
Response response = get(Response.Status.OK, getDefaultPerPageParam(),
"projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId, "trace");
return (response.readEntity(String.class));
} | java | public String getTrace(Object projectIdOrPath, int jobId) throws GitLabApiException {
Response response = get(Response.Status.OK, getDefaultPerPageParam(),
"projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId, "trace");
return (response.readEntity(String.class));
} | [
"public",
"String",
"getTrace",
"(",
"Object",
"projectIdOrPath",
",",
"int",
"jobId",
")",
"throws",
"GitLabApiException",
"{",
"Response",
"response",
"=",
"get",
"(",
"Response",
".",
"Status",
".",
"OK",
",",
"getDefaultPerPageParam",
"(",
")",
",",
"\"pro... | Get a trace of a specific job of a project
<pre><code>GitLab Endpoint: GET /projects/:id/jobs/:id/trace</code></pre>
@param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path
to get the specified job's trace for
@param jobId the job ID to get the trace for
@return a String c... | [
"Get",
"a",
"trace",
"of",
"a",
"specific",
"job",
"of",
"a",
"project"
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/JobApi.java#L425-L429 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/JobApi.java | JobApi.playJob | public Job playJob(Object projectIdOrPath, int jobId) throws GitLabApiException {
GitLabApiForm formData = null;
Response response = post(Status.CREATED, formData, "projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId, "play");
return (response.readEntity(Job.class));
} | java | public Job playJob(Object projectIdOrPath, int jobId) throws GitLabApiException {
GitLabApiForm formData = null;
Response response = post(Status.CREATED, formData, "projects", getProjectIdOrPath(projectIdOrPath), "jobs", jobId, "play");
return (response.readEntity(Job.class));
} | [
"public",
"Job",
"playJob",
"(",
"Object",
"projectIdOrPath",
",",
"int",
"jobId",
")",
"throws",
"GitLabApiException",
"{",
"GitLabApiForm",
"formData",
"=",
"null",
";",
"Response",
"response",
"=",
"post",
"(",
"Status",
".",
"CREATED",
",",
"formData",
","... | Play specified job in a project.
<pre><code>GitLab Endpoint: POST /projects/:id/jobs/:job_id/play</code></pre>
@param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path
@param jobId the ID to play job
@return job instance which just played
@throws GitLabApiException if any e... | [
"Play",
"specified",
"job",
"in",
"a",
"project",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/JobApi.java#L489-L493 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/utils/JacksonJson.java | JacksonJson.readTree | public JsonNode readTree(String postData) throws JsonParseException, JsonMappingException, IOException {
return (objectMapper.readTree(postData));
} | java | public JsonNode readTree(String postData) throws JsonParseException, JsonMappingException, IOException {
return (objectMapper.readTree(postData));
} | [
"public",
"JsonNode",
"readTree",
"(",
"String",
"postData",
")",
"throws",
"JsonParseException",
",",
"JsonMappingException",
",",
"IOException",
"{",
"return",
"(",
"objectMapper",
".",
"readTree",
"(",
"postData",
")",
")",
";",
"}"
] | Reads and parses the String containing JSON data and returns a JsonNode tree representation.
@param postData a String holding the POST data
@return a JsonNode instance containing the parsed JSON
@throws JsonParseException when an error occurs parsing the provided JSON
@throws JsonMappingException if a JSON error occur... | [
"Reads",
"and",
"parses",
"the",
"String",
"containing",
"JSON",
"data",
"and",
"returns",
"a",
"JsonNode",
"tree",
"representation",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/utils/JacksonJson.java#L100-L102 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/utils/JacksonJson.java | JacksonJson.readTree | public JsonNode readTree(Reader reader) throws JsonParseException, JsonMappingException, IOException {
return (objectMapper.readTree(reader));
} | java | public JsonNode readTree(Reader reader) throws JsonParseException, JsonMappingException, IOException {
return (objectMapper.readTree(reader));
} | [
"public",
"JsonNode",
"readTree",
"(",
"Reader",
"reader",
")",
"throws",
"JsonParseException",
",",
"JsonMappingException",
",",
"IOException",
"{",
"return",
"(",
"objectMapper",
".",
"readTree",
"(",
"reader",
")",
")",
";",
"}"
] | Reads and parses the JSON data on the specified Reader instance to a JsonNode tree representation.
@param reader the Reader instance that contains the JSON data
@return a JsonNode instance containing the parsed JSON
@throws JsonParseException when an error occurs parsing the provided JSON
@throws JsonMappingException ... | [
"Reads",
"and",
"parses",
"the",
"JSON",
"data",
"on",
"the",
"specified",
"Reader",
"instance",
"to",
"a",
"JsonNode",
"tree",
"representation",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/utils/JacksonJson.java#L113-L115 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/utils/JacksonJson.java | JacksonJson.unmarshal | public <T> T unmarshal(Class<T> returnType, Reader reader) throws JsonParseException, JsonMappingException, IOException {
ObjectMapper objectMapper = getContext(returnType);
return (objectMapper.readValue(reader, returnType));
} | java | public <T> T unmarshal(Class<T> returnType, Reader reader) throws JsonParseException, JsonMappingException, IOException {
ObjectMapper objectMapper = getContext(returnType);
return (objectMapper.readValue(reader, returnType));
} | [
"public",
"<",
"T",
">",
"T",
"unmarshal",
"(",
"Class",
"<",
"T",
">",
"returnType",
",",
"Reader",
"reader",
")",
"throws",
"JsonParseException",
",",
"JsonMappingException",
",",
"IOException",
"{",
"ObjectMapper",
"objectMapper",
"=",
"getContext",
"(",
"r... | Unmarshal the JSON data on the specified Reader instance to an instance of the provided class.
@param <T> the generics type for the return value
@param returnType an instance of this type class will be returned
@param reader the Reader instance that contains the JSON data
@return an instance of the provided class cont... | [
"Unmarshal",
"the",
"JSON",
"data",
"on",
"the",
"specified",
"Reader",
"instance",
"to",
"an",
"instance",
"of",
"the",
"provided",
"class",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/utils/JacksonJson.java#L144-L147 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/utils/JacksonJson.java | JacksonJson.unmarshal | public <T> T unmarshal(Class<T> returnType, String postData) throws JsonParseException, JsonMappingException, IOException {
ObjectMapper objectMapper = getContext(returnType);
return (objectMapper.readValue(postData, returnType));
} | java | public <T> T unmarshal(Class<T> returnType, String postData) throws JsonParseException, JsonMappingException, IOException {
ObjectMapper objectMapper = getContext(returnType);
return (objectMapper.readValue(postData, returnType));
} | [
"public",
"<",
"T",
">",
"T",
"unmarshal",
"(",
"Class",
"<",
"T",
">",
"returnType",
",",
"String",
"postData",
")",
"throws",
"JsonParseException",
",",
"JsonMappingException",
",",
"IOException",
"{",
"ObjectMapper",
"objectMapper",
"=",
"getContext",
"(",
... | Unmarshal the JSON data contained by the string and populate an instance of the provided returnType class.
@param <T> the generics type for the return value
@param returnType an instance of this type class will be returned
@param postData a String holding the POST data
@return an instance of the provided class contain... | [
"Unmarshal",
"the",
"JSON",
"data",
"contained",
"by",
"the",
"string",
"and",
"populate",
"an",
"instance",
"of",
"the",
"provided",
"returnType",
"class",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/utils/JacksonJson.java#L160-L163 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/utils/JacksonJson.java | JacksonJson.unmarshalList | public <T> List<T> unmarshalList(Class<T> returnType, Reader reader) throws JsonParseException, JsonMappingException, IOException {
ObjectMapper objectMapper = getContext(null);
CollectionType javaType = objectMapper.getTypeFactory().constructCollectionType(List.class, returnType);
return (objec... | java | public <T> List<T> unmarshalList(Class<T> returnType, Reader reader) throws JsonParseException, JsonMappingException, IOException {
ObjectMapper objectMapper = getContext(null);
CollectionType javaType = objectMapper.getTypeFactory().constructCollectionType(List.class, returnType);
return (objec... | [
"public",
"<",
"T",
">",
"List",
"<",
"T",
">",
"unmarshalList",
"(",
"Class",
"<",
"T",
">",
"returnType",
",",
"Reader",
"reader",
")",
"throws",
"JsonParseException",
",",
"JsonMappingException",
",",
"IOException",
"{",
"ObjectMapper",
"objectMapper",
"=",... | Unmarshal the JSON data on the specified Reader instance and populate a List of instances of the provided returnType class.
@param <T> the generics type for the List
@param returnType an instance of this type class will be contained in the returned List
@param reader the Reader instance that contains the JSON data
@re... | [
"Unmarshal",
"the",
"JSON",
"data",
"on",
"the",
"specified",
"Reader",
"instance",
"and",
"populate",
"a",
"List",
"of",
"instances",
"of",
"the",
"provided",
"returnType",
"class",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/utils/JacksonJson.java#L176-L180 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/utils/JacksonJson.java | JacksonJson.unmarshalMap | public <T> Map<String, T> unmarshalMap(Class<T> returnType, Reader reader) throws JsonParseException, JsonMappingException, IOException {
ObjectMapper objectMapper = getContext(null);
return (objectMapper.readValue(reader, new TypeReference<Map<String, T>>() {}));
} | java | public <T> Map<String, T> unmarshalMap(Class<T> returnType, Reader reader) throws JsonParseException, JsonMappingException, IOException {
ObjectMapper objectMapper = getContext(null);
return (objectMapper.readValue(reader, new TypeReference<Map<String, T>>() {}));
} | [
"public",
"<",
"T",
">",
"Map",
"<",
"String",
",",
"T",
">",
"unmarshalMap",
"(",
"Class",
"<",
"T",
">",
"returnType",
",",
"Reader",
"reader",
")",
"throws",
"JsonParseException",
",",
"JsonMappingException",
",",
"IOException",
"{",
"ObjectMapper",
"obje... | Unmarshal the JSON data on the specified Reader instance and populate a Map of String keys and values of the provided returnType class.
@param <T> the generics type for the Map value
@param returnType an instance of this type class will be contained the values of the Map
@param reader the Reader instance that contains... | [
"Unmarshal",
"the",
"JSON",
"data",
"on",
"the",
"specified",
"Reader",
"instance",
"and",
"populate",
"a",
"Map",
"of",
"String",
"keys",
"and",
"values",
"of",
"the",
"provided",
"returnType",
"class",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/utils/JacksonJson.java#L210-L213 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/utils/JacksonJson.java | JacksonJson.marshal | public <T> String marshal(final T object) {
if (object == null) {
throw new IllegalArgumentException("object parameter is null");
}
ObjectWriter writer = objectMapper.writer().withDefaultPrettyPrinter();
String results = null;
try {
results = writer.writ... | java | public <T> String marshal(final T object) {
if (object == null) {
throw new IllegalArgumentException("object parameter is null");
}
ObjectWriter writer = objectMapper.writer().withDefaultPrettyPrinter();
String results = null;
try {
results = writer.writ... | [
"public",
"<",
"T",
">",
"String",
"marshal",
"(",
"final",
"T",
"object",
")",
"{",
"if",
"(",
"object",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"object parameter is null\"",
")",
";",
"}",
"ObjectWriter",
"writer",
"=",
... | Marshals the supplied object out as a formatted JSON string.
@param <T> the generics type for the provided object
@param object the object to output as a JSON string
@return a String containing the JSON for the specified object | [
"Marshals",
"the",
"supplied",
"object",
"out",
"as",
"a",
"formatted",
"JSON",
"string",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/utils/JacksonJson.java#L238-L258 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/utils/JacksonJson.java | JacksonJson.toJsonNode | public static JsonNode toJsonNode(String jsonString) throws IOException {
return (JacksonJsonSingletonHelper.JACKSON_JSON.objectMapper.readTree(jsonString));
} | java | public static JsonNode toJsonNode(String jsonString) throws IOException {
return (JacksonJsonSingletonHelper.JACKSON_JSON.objectMapper.readTree(jsonString));
} | [
"public",
"static",
"JsonNode",
"toJsonNode",
"(",
"String",
"jsonString",
")",
"throws",
"IOException",
"{",
"return",
"(",
"JacksonJsonSingletonHelper",
".",
"JACKSON_JSON",
".",
"objectMapper",
".",
"readTree",
"(",
"jsonString",
")",
")",
";",
"}"
] | Parse the provided String into a JsonNode instance.
@param jsonString a String containing JSON to parse
@return a JsonNode with the String parsed into a JSON tree
@throws IOException if any IO error occurs | [
"Parse",
"the",
"provided",
"String",
"into",
"a",
"JsonNode",
"instance",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/utils/JacksonJson.java#L365-L367 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/LicensesApi.java | LicensesApi.getAllLicenseTemplates | public List<LicenseTemplate> getAllLicenseTemplates() throws GitLabApiException {
Response response = get(Response.Status.OK, null, "licenses");
return (response.readEntity(new GenericType<List<LicenseTemplate>>() {}));
} | java | public List<LicenseTemplate> getAllLicenseTemplates() throws GitLabApiException {
Response response = get(Response.Status.OK, null, "licenses");
return (response.readEntity(new GenericType<List<LicenseTemplate>>() {}));
} | [
"public",
"List",
"<",
"LicenseTemplate",
">",
"getAllLicenseTemplates",
"(",
")",
"throws",
"GitLabApiException",
"{",
"Response",
"response",
"=",
"get",
"(",
"Response",
".",
"Status",
".",
"OK",
",",
"null",
",",
"\"licenses\"",
")",
";",
"return",
"(",
... | Get all license templates.
GET /licenses
@return a list of LicenseTemplate instances
@throws GitLabApiException if any exception occurs | [
"Get",
"all",
"license",
"templates",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/LicensesApi.java#L28-L31 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/LicensesApi.java | LicensesApi.getPopularLicenseTemplates | public List<LicenseTemplate> getPopularLicenseTemplates() throws GitLabApiException {
Form formData = new GitLabApiForm().withParam("popular", true, true);
Response response = get(Response.Status.OK, formData.asMap(), "licenses");
return (response.readEntity(new GenericType<List<LicenseTemplate>... | java | public List<LicenseTemplate> getPopularLicenseTemplates() throws GitLabApiException {
Form formData = new GitLabApiForm().withParam("popular", true, true);
Response response = get(Response.Status.OK, formData.asMap(), "licenses");
return (response.readEntity(new GenericType<List<LicenseTemplate>... | [
"public",
"List",
"<",
"LicenseTemplate",
">",
"getPopularLicenseTemplates",
"(",
")",
"throws",
"GitLabApiException",
"{",
"Form",
"formData",
"=",
"new",
"GitLabApiForm",
"(",
")",
".",
"withParam",
"(",
"\"popular\"",
",",
"true",
",",
"true",
")",
";",
"Re... | Get popular license templates.
GET /licenses
@return a list of LicenseTemplate instances
@throws GitLabApiException if any exception occurs | [
"Get",
"popular",
"license",
"templates",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/LicensesApi.java#L41-L45 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/LicensesApi.java | LicensesApi.getSingleLicenseTemplate | public LicenseTemplate getSingleLicenseTemplate(String key) throws GitLabApiException {
Response response = get(Response.Status.OK, null, "licenses", key);
return (response.readEntity(LicenseTemplate.class));
} | java | public LicenseTemplate getSingleLicenseTemplate(String key) throws GitLabApiException {
Response response = get(Response.Status.OK, null, "licenses", key);
return (response.readEntity(LicenseTemplate.class));
} | [
"public",
"LicenseTemplate",
"getSingleLicenseTemplate",
"(",
"String",
"key",
")",
"throws",
"GitLabApiException",
"{",
"Response",
"response",
"=",
"get",
"(",
"Response",
".",
"Status",
".",
"OK",
",",
"null",
",",
"\"licenses\"",
",",
"key",
")",
";",
"ret... | Get a single license template.
GET /licenses
@param key The key of the license template
@return a LicenseTemplate instance
@throws GitLabApiException if any exception occurs | [
"Get",
"a",
"single",
"license",
"template",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/LicensesApi.java#L56-L59 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/HealthCheckApi.java | HealthCheckApi.getLiveness | public HealthCheckInfo getLiveness(String token) throws GitLabApiException {
try {
URL livenessUrl = getApiClient().getUrlWithBase("-", "liveness");
GitLabApiForm formData = new GitLabApiForm().withParam("token", token, false);
Response response = get(Response.Status.OK, form... | java | public HealthCheckInfo getLiveness(String token) throws GitLabApiException {
try {
URL livenessUrl = getApiClient().getUrlWithBase("-", "liveness");
GitLabApiForm formData = new GitLabApiForm().withParam("token", token, false);
Response response = get(Response.Status.OK, form... | [
"public",
"HealthCheckInfo",
"getLiveness",
"(",
"String",
"token",
")",
"throws",
"GitLabApiException",
"{",
"try",
"{",
"URL",
"livenessUrl",
"=",
"getApiClient",
"(",
")",
".",
"getUrlWithBase",
"(",
"\"-\"",
",",
"\"liveness\"",
")",
";",
"GitLabApiForm",
"f... | Get Health Checks from the liveness endpoint.
<pre><code>GitLab Endpoint: GET /-/liveness</code></pre>
@param token Health Status token
@return HealthCheckInfo instance
@throws GitLabApiException if any exception occurs
@deprecated | [
"Get",
"Health",
"Checks",
"from",
"the",
"liveness",
"endpoint",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/HealthCheckApi.java#L40-L49 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/ServicesApi.java | ServicesApi.setGitLabCI | public void setGitLabCI(Object projectIdOrPath, String token, String projectCIUrl) throws GitLabApiException {
final Form formData = new Form();
formData.param("token", token);
formData.param("project_url", projectCIUrl);
put(Response.Status.OK, formData.asMap(), "projects", getProjectId... | java | public void setGitLabCI(Object projectIdOrPath, String token, String projectCIUrl) throws GitLabApiException {
final Form formData = new Form();
formData.param("token", token);
formData.param("project_url", projectCIUrl);
put(Response.Status.OK, formData.asMap(), "projects", getProjectId... | [
"public",
"void",
"setGitLabCI",
"(",
"Object",
"projectIdOrPath",
",",
"String",
"token",
",",
"String",
"projectCIUrl",
")",
"throws",
"GitLabApiException",
"{",
"final",
"Form",
"formData",
"=",
"new",
"Form",
"(",
")",
";",
"formData",
".",
"param",
"(",
... | Activates the gitlab-ci service for a project.
<pre><code>GitLab Endpoint: PUT /projects/:id/services/gitlab-ci</code></pre>
@param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path
@param token for authentication
@param projectCIUrl URL of the GitLab-CI projec... | [
"Activates",
"the",
"gitlab",
"-",
"ci",
"service",
"for",
"a",
"project",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ServicesApi.java#L33-L38 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/ServicesApi.java | ServicesApi.deleteGitLabCI | public void deleteGitLabCI(Object projectIdOrPath) throws GitLabApiException {
Response.Status expectedStatus = (isApiVersion(ApiVersion.V3) ? Response.Status.OK : Response.Status.NO_CONTENT);
delete(expectedStatus, null, "projects", getProjectIdOrPath(projectIdOrPath), "services", "gitlab-ci");
} | java | public void deleteGitLabCI(Object projectIdOrPath) throws GitLabApiException {
Response.Status expectedStatus = (isApiVersion(ApiVersion.V3) ? Response.Status.OK : Response.Status.NO_CONTENT);
delete(expectedStatus, null, "projects", getProjectIdOrPath(projectIdOrPath), "services", "gitlab-ci");
} | [
"public",
"void",
"deleteGitLabCI",
"(",
"Object",
"projectIdOrPath",
")",
"throws",
"GitLabApiException",
"{",
"Response",
".",
"Status",
"expectedStatus",
"=",
"(",
"isApiVersion",
"(",
"ApiVersion",
".",
"V3",
")",
"?",
"Response",
".",
"Status",
".",
"OK",
... | Deletes the gitlab-ci service for a project.
<pre><code>GitLab Endpoint: DELETE /projects/:id/services/gitlab-ci</code></pre>
@param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path
@throws GitLabApiException if any exception occurs
@deprecated No longer supported | [
"Deletes",
"the",
"gitlab",
"-",
"ci",
"service",
"for",
"a",
"project",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ServicesApi.java#L49-L52 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/ServicesApi.java | ServicesApi.getHipChatService | public HipChatService getHipChatService(Object projectIdOrPath) throws GitLabApiException {
Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "services", "hipchat");
return (response.readEntity(HipChatService.class));
} | java | public HipChatService getHipChatService(Object projectIdOrPath) throws GitLabApiException {
Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "services", "hipchat");
return (response.readEntity(HipChatService.class));
} | [
"public",
"HipChatService",
"getHipChatService",
"(",
"Object",
"projectIdOrPath",
")",
"throws",
"GitLabApiException",
"{",
"Response",
"response",
"=",
"get",
"(",
"Response",
".",
"Status",
".",
"OK",
",",
"null",
",",
"\"projects\"",
",",
"getProjectIdOrPath",
... | Get the HipChatService notification configuration for a project.
<pre><code>GitLab Endpoint: GET /projects/:id/services/hipchat</code></pre>
@param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path
@return a HipChatService instance holding the HipChatService notification se... | [
"Get",
"the",
"HipChatService",
"notification",
"configuration",
"for",
"a",
"project",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ServicesApi.java#L63-L66 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/ServicesApi.java | ServicesApi.updateHipChatService | public HipChatService updateHipChatService(Object projectIdOrPath, HipChatService hipChat) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm()
.withParam("push_events", hipChat.getPushEvents())
.withParam("issues_events", hipChat.getIssuesEvents())
... | java | public HipChatService updateHipChatService(Object projectIdOrPath, HipChatService hipChat) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm()
.withParam("push_events", hipChat.getPushEvents())
.withParam("issues_events", hipChat.getIssuesEvents())
... | [
"public",
"HipChatService",
"updateHipChatService",
"(",
"Object",
"projectIdOrPath",
",",
"HipChatService",
"hipChat",
")",
"throws",
"GitLabApiException",
"{",
"GitLabApiForm",
"formData",
"=",
"new",
"GitLabApiForm",
"(",
")",
".",
"withParam",
"(",
"\"push_events\""... | Updates the HipChatService notification settings for a project.
<pre><code>GitLab Endpoint: PUT /projects/:id/services/hipchat</code></pre>
The following properties on the HipChatService instance are utilized in the update of the settings:
<p>
pushEvents (optional) - Enable notifications for push events
issuesEvents ... | [
"Updates",
"the",
"HipChatService",
"notification",
"settings",
"for",
"a",
"project",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ServicesApi.java#L96-L115 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/ServicesApi.java | ServicesApi.setHipChat | public void setHipChat(Object projectIdOrPath, String token, String room, String server) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm()
.withParam("token", token)
.withParam("room", room)
.withParam("server", server);
put(Response... | java | public void setHipChat(Object projectIdOrPath, String token, String room, String server) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm()
.withParam("token", token)
.withParam("room", room)
.withParam("server", server);
put(Response... | [
"public",
"void",
"setHipChat",
"(",
"Object",
"projectIdOrPath",
",",
"String",
"token",
",",
"String",
"room",
",",
"String",
"server",
")",
"throws",
"GitLabApiException",
"{",
"GitLabApiForm",
"formData",
"=",
"new",
"GitLabApiForm",
"(",
")",
".",
"withPara... | Activates HipChatService notifications.
<pre><code>GitLab Endpoint: PUT /projects/:id/services/hipchat</code></pre>
@param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path
@param token for authentication
@param room HipChatService Room
@param server ... | [
"Activates",
"HipChatService",
"notifications",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ServicesApi.java#L129-L135 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/ServicesApi.java | ServicesApi.getSlackService | public SlackService getSlackService(Object projectIdOrPath) throws GitLabApiException {
Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "services", "slack");
return (response.readEntity(SlackService.class));
} | java | public SlackService getSlackService(Object projectIdOrPath) throws GitLabApiException {
Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "services", "slack");
return (response.readEntity(SlackService.class));
} | [
"public",
"SlackService",
"getSlackService",
"(",
"Object",
"projectIdOrPath",
")",
"throws",
"GitLabApiException",
"{",
"Response",
"response",
"=",
"get",
"(",
"Response",
".",
"Status",
".",
"OK",
",",
"null",
",",
"\"projects\"",
",",
"getProjectIdOrPath",
"("... | Get the Slack notification settings for a project.
<pre><code>GitLab Endpoint: GET /projects/:id/services/slack</code></pre>
@param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path
@return a SlackService instance holding the Slack notification settings
@throws GitLabApiExc... | [
"Get",
"the",
"Slack",
"notification",
"settings",
"for",
"a",
"project",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ServicesApi.java#L172-L175 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/ServicesApi.java | ServicesApi.updateSlackService | public SlackService updateSlackService(Object projectIdOrPath, SlackService slackNotifications) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm()
.withParam("webhook", slackNotifications.getWebhook(), true)
.withParam("username", slackNotifications.getUsern... | java | public SlackService updateSlackService(Object projectIdOrPath, SlackService slackNotifications) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm()
.withParam("webhook", slackNotifications.getWebhook(), true)
.withParam("username", slackNotifications.getUsern... | [
"public",
"SlackService",
"updateSlackService",
"(",
"Object",
"projectIdOrPath",
",",
"SlackService",
"slackNotifications",
")",
"throws",
"GitLabApiException",
"{",
"GitLabApiForm",
"formData",
"=",
"new",
"GitLabApiForm",
"(",
")",
".",
"withParam",
"(",
"\"webhook\"... | Updates the Slack notification settings for a project.
<pre><code>GitLab Endpoint: PUT /projects/:id/services/slack</code></pre>
The following properties on the SlackService instance are utilized in the update of the settings:
<p>
webhook (required) - https://hooks.slack.com/services/...
username (optional) - usernam... | [
"Updates",
"the",
"Slack",
"notification",
"settings",
"for",
"a",
"project",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ServicesApi.java#L213-L240 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/ServicesApi.java | ServicesApi.updateJiraService | public JiraService updateJiraService(Object projectIdOrPath, JiraService jira) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm()
.withParam("merge_requests_events", jira.getMergeRequestsEvents())
.withParam("commit_events", jira.getCommitEvents())
... | java | public JiraService updateJiraService(Object projectIdOrPath, JiraService jira) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm()
.withParam("merge_requests_events", jira.getMergeRequestsEvents())
.withParam("commit_events", jira.getCommitEvents())
... | [
"public",
"JiraService",
"updateJiraService",
"(",
"Object",
"projectIdOrPath",
",",
"JiraService",
"jira",
")",
"throws",
"GitLabApiException",
"{",
"GitLabApiForm",
"formData",
"=",
"new",
"GitLabApiForm",
"(",
")",
".",
"withParam",
"(",
"\"merge_requests_events\"",
... | Updates the JIRA service settings for a project.
<pre><code>GitLab Endpoint: PUT /projects/:id/services/jira</code></pre>
The following properties on the JiraService instance are utilized in the update of the settings:
<p>
mergeRequestsEvents (optional) - Enable notifications for merge request events
commitEvents (op... | [
"Updates",
"the",
"JIRA",
"service",
"settings",
"for",
"a",
"project",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ServicesApi.java#L290-L302 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/ServicesApi.java | ServicesApi.updateExternalWikiService | public ExternalWikiService updateExternalWikiService(Object projectIdOrPath, ExternalWikiService externalWiki) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm()
.withParam("external_wiki_url", externalWiki.getExternalWikiUrl());
Response response = put(Response.St... | java | public ExternalWikiService updateExternalWikiService(Object projectIdOrPath, ExternalWikiService externalWiki) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm()
.withParam("external_wiki_url", externalWiki.getExternalWikiUrl());
Response response = put(Response.St... | [
"public",
"ExternalWikiService",
"updateExternalWikiService",
"(",
"Object",
"projectIdOrPath",
",",
"ExternalWikiService",
"externalWiki",
")",
"throws",
"GitLabApiException",
"{",
"GitLabApiForm",
"formData",
"=",
"new",
"GitLabApiForm",
"(",
")",
".",
"withParam",
"(",... | Updates the ExternalWikiService service settings for a project.
<pre><code>GitLab Endpoint: PUT /projects/:id/services/external-wiki</code></pre>
The following properties on the JiraService instance are utilized in the update of the settings:
<p>
external_wiki_url (required) - The URL to the External Wiki project whi... | [
"Updates",
"the",
"ExternalWikiService",
"service",
"settings",
"for",
"a",
"project",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ServicesApi.java#L345-L350 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/systemhooks/SystemHookManager.java | SystemHookManager.handleEvent | public void handleEvent(HttpServletRequest request) throws GitLabApiException {
String eventName = request.getHeader("X-Gitlab-Event");
if (eventName == null || eventName.trim().isEmpty()) {
String message = "X-Gitlab-Event header is missing!";
LOGGER.warning(message);
... | java | public void handleEvent(HttpServletRequest request) throws GitLabApiException {
String eventName = request.getHeader("X-Gitlab-Event");
if (eventName == null || eventName.trim().isEmpty()) {
String message = "X-Gitlab-Event header is missing!";
LOGGER.warning(message);
... | [
"public",
"void",
"handleEvent",
"(",
"HttpServletRequest",
"request",
")",
"throws",
"GitLabApiException",
"{",
"String",
"eventName",
"=",
"request",
".",
"getHeader",
"(",
"\"X-Gitlab-Event\"",
")",
";",
"if",
"(",
"eventName",
"==",
"null",
"||",
"eventName",
... | Parses and verifies an SystemHookEvent instance from the HTTP request and
fires it off to the registered listeners.
@param request the HttpServletRequest to read the Event instance from
@throws GitLabApiException if the parsed event is not supported | [
"Parses",
"and",
"verifies",
"an",
"SystemHookEvent",
"instance",
"from",
"the",
"HTTP",
"request",
"and",
"fires",
"it",
"off",
"to",
"the",
"registered",
"listeners",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/systemhooks/SystemHookManager.java#L57-L135 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/RunnersApi.java | RunnersApi.getRunnersStream | public Stream<Runner> getRunnersStream(Runner.RunnerStatus scope) throws GitLabApiException {
return (getRunners(scope, getDefaultPerPage()).stream());
} | java | public Stream<Runner> getRunnersStream(Runner.RunnerStatus scope) throws GitLabApiException {
return (getRunners(scope, getDefaultPerPage()).stream());
} | [
"public",
"Stream",
"<",
"Runner",
">",
"getRunnersStream",
"(",
"Runner",
".",
"RunnerStatus",
"scope",
")",
"throws",
"GitLabApiException",
"{",
"return",
"(",
"getRunners",
"(",
"scope",
",",
"getDefaultPerPage",
"(",
")",
")",
".",
"stream",
"(",
")",
")... | Get a Stream of all available runners available to the user with pagination support.
<pre><code>GitLab Endpoint: GET /runners</code></pre>
@param scope The scope of specific runners to show, one of: active, paused, online; showing all runners null
@return Stream of Runners
@throws GitLabApiException if any exception ... | [
"Get",
"a",
"Stream",
"of",
"all",
"available",
"runners",
"available",
"to",
"the",
"user",
"with",
"pagination",
"support",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/RunnersApi.java#L68-L70 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/RunnersApi.java | RunnersApi.getRunners | public Pager<Runner> getRunners(Runner.RunnerStatus scope, int itemsPerPage) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm().withParam("scope", scope, false);
return (new Pager<>(this, Runner.class, itemsPerPage, formData.asMap(), "runners"));
} | java | public Pager<Runner> getRunners(Runner.RunnerStatus scope, int itemsPerPage) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm().withParam("scope", scope, false);
return (new Pager<>(this, Runner.class, itemsPerPage, formData.asMap(), "runners"));
} | [
"public",
"Pager",
"<",
"Runner",
">",
"getRunners",
"(",
"Runner",
".",
"RunnerStatus",
"scope",
",",
"int",
"itemsPerPage",
")",
"throws",
"GitLabApiException",
"{",
"GitLabApiForm",
"formData",
"=",
"new",
"GitLabApiForm",
"(",
")",
".",
"withParam",
"(",
"... | Get a list of specific runners available to the user.
<pre><code>GitLab Endpoint: GET /runners</code></pre>
@param scope the scope of specific runners to show, one of: active, paused, online; showing all runners null
@param itemsPerPage The number of Runner instances that will be fetched per page
@return a Pager cont... | [
"Get",
"a",
"list",
"of",
"specific",
"runners",
"available",
"to",
"the",
"user",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/RunnersApi.java#L130-L133 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/RunnersApi.java | RunnersApi.getRunnerDetail | public RunnerDetail getRunnerDetail(Integer runnerId) throws GitLabApiException {
if (runnerId == null) {
throw new RuntimeException("runnerId cannot be null");
}
Response response = get(Response.Status.OK, null, "runners", runnerId);
return (response.readEntity(RunnerDetai... | java | public RunnerDetail getRunnerDetail(Integer runnerId) throws GitLabApiException {
if (runnerId == null) {
throw new RuntimeException("runnerId cannot be null");
}
Response response = get(Response.Status.OK, null, "runners", runnerId);
return (response.readEntity(RunnerDetai... | [
"public",
"RunnerDetail",
"getRunnerDetail",
"(",
"Integer",
"runnerId",
")",
"throws",
"GitLabApiException",
"{",
"if",
"(",
"runnerId",
"==",
"null",
")",
"{",
"throw",
"new",
"RuntimeException",
"(",
"\"runnerId cannot be null\"",
")",
";",
"}",
"Response",
"re... | Get details of a runner.
<pre><code>GitLab Endpoint: GET /runners/:id</code></pre>
@param runnerId Runner id to get details for
@return RunnerDetail instance.
@throws GitLabApiException if any exception occurs | [
"Get",
"details",
"of",
"a",
"runner",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/RunnersApi.java#L256-L264 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/RunnersApi.java | RunnersApi.updateRunner | public RunnerDetail updateRunner(Integer runnerId, String description, Boolean active, List<String> tagList,
Boolean runUntagged, Boolean locked, RunnerDetail.RunnerAccessLevel accessLevel) throws GitLabApiException {
if (runnerId == null) {
throw new RuntimeExce... | java | public RunnerDetail updateRunner(Integer runnerId, String description, Boolean active, List<String> tagList,
Boolean runUntagged, Boolean locked, RunnerDetail.RunnerAccessLevel accessLevel) throws GitLabApiException {
if (runnerId == null) {
throw new RuntimeExce... | [
"public",
"RunnerDetail",
"updateRunner",
"(",
"Integer",
"runnerId",
",",
"String",
"description",
",",
"Boolean",
"active",
",",
"List",
"<",
"String",
">",
"tagList",
",",
"Boolean",
"runUntagged",
",",
"Boolean",
"locked",
",",
"RunnerDetail",
".",
"RunnerAc... | Update details of a runner.
<pre><code>GitLab Endpoint: PUT /runners/:id</code></pre>
@param runnerId The ID of a runner
@param description The description of a runner
@param active The state of a runner; can be set to true or false
@param tagList The list of tags for a runner; put array of tags, that sho... | [
"Update",
"details",
"of",
"a",
"runner",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/RunnersApi.java#L281-L296 | train |
gmessner/gitlab4j-api | src/main/java/org/gitlab4j/api/RunnersApi.java | RunnersApi.removeRunner | public void removeRunner(Integer runnerId) throws GitLabApiException {
if (runnerId == null) {
throw new RuntimeException("runnerId cannot be null");
}
delete(Response.Status.NO_CONTENT, null, "runners", runnerId);
} | java | public void removeRunner(Integer runnerId) throws GitLabApiException {
if (runnerId == null) {
throw new RuntimeException("runnerId cannot be null");
}
delete(Response.Status.NO_CONTENT, null, "runners", runnerId);
} | [
"public",
"void",
"removeRunner",
"(",
"Integer",
"runnerId",
")",
"throws",
"GitLabApiException",
"{",
"if",
"(",
"runnerId",
"==",
"null",
")",
"{",
"throw",
"new",
"RuntimeException",
"(",
"\"runnerId cannot be null\"",
")",
";",
"}",
"delete",
"(",
"Response... | Remove a runner.
<pre><code>GitLab Endpoint: DELETE /runners/:id</code></pre>
@param runnerId The ID of a runner
@throws GitLabApiException if any exception occurs | [
"Remove",
"a",
"runner",
"."
] | ab045070abac0a8f4ccbf17b5ed9bfdef5723eed | https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/RunnersApi.java#L306-L313 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.