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/EpicsApi.java
EpicsApi.getEpicIssues
public List<Epic> getEpicIssues(Object groupIdOrPath, Integer epicIid, int page, int perPage) throws GitLabApiException { Response response = get(Response.Status.OK, getPageQueryParams(page, perPage), "groups", getGroupIdOrPath(groupIdOrPath), "epics", epicIid, "issues"); return (response.readEntity(new GenericType<List<Epic>>() { })); }
java
public List<Epic> getEpicIssues(Object groupIdOrPath, Integer epicIid, int page, int perPage) throws GitLabApiException { Response response = get(Response.Status.OK, getPageQueryParams(page, perPage), "groups", getGroupIdOrPath(groupIdOrPath), "epics", epicIid, "issues"); return (response.readEntity(new GenericType<List<Epic>>() { })); }
[ "public", "List", "<", "Epic", ">", "getEpicIssues", "(", "Object", "groupIdOrPath", ",", "Integer", "epicIid", ",", "int", "page", ",", "int", "perPage", ")", "throws", "GitLabApiException", "{", "Response", "response", "=", "get", "(", "Response", ".", "St...
Gets all issues that are assigned to an epic and the authenticated user has access to using the specified page and per page setting. <pre><code>GitLab Endpoint: GET /groups/:id/epics/:epic_iid/issues</code></pre> @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path @param epicIid the IID of the epic to get issues for @param page the page to get @param perPage the number of issues per page @return a list of all epic issues belonging to the specified epic in the specified range @throws GitLabApiException if any exception occurs
[ "Gets", "all", "issues", "that", "are", "assigned", "to", "an", "epic", "and", "the", "authenticated", "user", "has", "access", "to", "using", "the", "specified", "page", "and", "per", "page", "setting", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/EpicsApi.java#L370-L373
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/EpicsApi.java
EpicsApi.getEpicIssues
public Pager<Epic> getEpicIssues(Object groupIdOrPath, Integer epicIid, int itemsPerPage) throws GitLabApiException { return (new Pager<Epic>(this, Epic.class, itemsPerPage, null, "groups", getGroupIdOrPath(groupIdOrPath), "epics", epicIid, "issues")); }
java
public Pager<Epic> getEpicIssues(Object groupIdOrPath, Integer epicIid, int itemsPerPage) throws GitLabApiException { return (new Pager<Epic>(this, Epic.class, itemsPerPage, null, "groups", getGroupIdOrPath(groupIdOrPath), "epics", epicIid, "issues")); }
[ "public", "Pager", "<", "Epic", ">", "getEpicIssues", "(", "Object", "groupIdOrPath", ",", "Integer", "epicIid", ",", "int", "itemsPerPage", ")", "throws", "GitLabApiException", "{", "return", "(", "new", "Pager", "<", "Epic", ">", "(", "this", ",", "Epic", ...
Get a Pager of all issues that are assigned to an epic and the authenticated user has access to. <pre><code>GitLab Endpoint: GET /groups/:id/epics/:epic_iid/issues</code></pre> @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path @param epicIid the IID of the epic to get issues for @param itemsPerPage the number of issues per page @return the Pager of all epic issues belonging to the specified epic @throws GitLabApiException if any exception occurs
[ "Get", "a", "Pager", "of", "all", "issues", "that", "are", "assigned", "to", "an", "epic", "and", "the", "authenticated", "user", "has", "access", "to", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/EpicsApi.java#L386-L388
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/EpicsApi.java
EpicsApi.getEpicIssuesStream
public Stream<Epic> getEpicIssuesStream(Object groupIdOrPath, Integer epicIid) throws GitLabApiException { return (getEpicIssues(groupIdOrPath, epicIid, getDefaultPerPage()).stream()); }
java
public Stream<Epic> getEpicIssuesStream(Object groupIdOrPath, Integer epicIid) throws GitLabApiException { return (getEpicIssues(groupIdOrPath, epicIid, getDefaultPerPage()).stream()); }
[ "public", "Stream", "<", "Epic", ">", "getEpicIssuesStream", "(", "Object", "groupIdOrPath", ",", "Integer", "epicIid", ")", "throws", "GitLabApiException", "{", "return", "(", "getEpicIssues", "(", "groupIdOrPath", ",", "epicIid", ",", "getDefaultPerPage", "(", "...
Gets all issues that are assigned to an epic and the authenticated user has access to as a Stream. <pre><code>GitLab Endpoint: GET /groups/:id/epics/:epic_iid/issues</code></pre> @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path @param epicIid the IID of the epic to get issues for @return a Stream of all epic issues belonging to the specified epic @throws GitLabApiException if any exception occurs
[ "Gets", "all", "issues", "that", "are", "assigned", "to", "an", "epic", "and", "the", "authenticated", "user", "has", "access", "to", "as", "a", "Stream", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/EpicsApi.java#L400-L402
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/EpicsApi.java
EpicsApi.assignIssue
public EpicIssue assignIssue(Object groupIdOrPath, Integer epicIid, Integer issueIid) throws GitLabApiException { Response response = post(Response.Status.CREATED, (Form)null, "groups", getGroupIdOrPath(groupIdOrPath), "epics", epicIid, "issues", issueIid); return (response.readEntity(EpicIssue.class)); }
java
public EpicIssue assignIssue(Object groupIdOrPath, Integer epicIid, Integer issueIid) throws GitLabApiException { Response response = post(Response.Status.CREATED, (Form)null, "groups", getGroupIdOrPath(groupIdOrPath), "epics", epicIid, "issues", issueIid); return (response.readEntity(EpicIssue.class)); }
[ "public", "EpicIssue", "assignIssue", "(", "Object", "groupIdOrPath", ",", "Integer", "epicIid", ",", "Integer", "issueIid", ")", "throws", "GitLabApiException", "{", "Response", "response", "=", "post", "(", "Response", ".", "Status", ".", "CREATED", ",", "(", ...
Creates an epic - issue association. If the issue in question belongs to another epic it is unassigned from that epic. <pre><code>GitLab Endpoint: POST /groups/:id/epics/:epic_iid/issues/:issue_id</code></pre> @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path @param epicIid the Epic IID to assign the issue to @param issueIid the issue IID of the issue to assign to the epic @return an EpicIssue instance containing info on the newly assigned epic issue @throws GitLabApiException if any exception occurs
[ "Creates", "an", "epic", "-", "issue", "association", ".", "If", "the", "issue", "in", "question", "belongs", "to", "another", "epic", "it", "is", "unassigned", "from", "that", "epic", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/EpicsApi.java#L416-L420
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/EpicsApi.java
EpicsApi.removeIssue
public EpicIssue removeIssue(Object groupIdOrPath, Integer epicIid, Integer issueIid) throws GitLabApiException { Response response = delete(Response.Status.OK, null, "groups", getGroupIdOrPath(groupIdOrPath), "epics", epicIid, "issues", issueIid); return (response.readEntity(EpicIssue.class)); }
java
public EpicIssue removeIssue(Object groupIdOrPath, Integer epicIid, Integer issueIid) throws GitLabApiException { Response response = delete(Response.Status.OK, null, "groups", getGroupIdOrPath(groupIdOrPath), "epics", epicIid, "issues", issueIid); return (response.readEntity(EpicIssue.class)); }
[ "public", "EpicIssue", "removeIssue", "(", "Object", "groupIdOrPath", ",", "Integer", "epicIid", ",", "Integer", "issueIid", ")", "throws", "GitLabApiException", "{", "Response", "response", "=", "delete", "(", "Response", ".", "Status", ".", "OK", ",", "null", ...
Remove an epic - issue association. <pre><code>GitLab Endpoint: DELETE /groups/:id/epics/:epic_iid/issues/:issue_id</code></pre> @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path @param epicIid the Epic IID to remove the issue from @param issueIid the issue IID of the issue to remove from the epic @return an EpicIssue instance containing info on the removed issue @throws GitLabApiException if any exception occurs
[ "Remove", "an", "epic", "-", "issue", "association", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/EpicsApi.java#L433-L437
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/EpicsApi.java
EpicsApi.updateIssue
public EpicIssue updateIssue(Object groupIdOrPath, Integer epicIid, Integer issueIid, Integer moveBeforeId, Integer moveAfterId) throws GitLabApiException { GitLabApiForm form = new GitLabApiForm() .withParam("move_before_id", moveBeforeId) .withParam("move_after_id", moveAfterId); Response response = post(Response.Status.OK, form, "groups", getGroupIdOrPath(groupIdOrPath), "epics", epicIid, "issues", issueIid); return (response.readEntity(EpicIssue.class)); }
java
public EpicIssue updateIssue(Object groupIdOrPath, Integer epicIid, Integer issueIid, Integer moveBeforeId, Integer moveAfterId) throws GitLabApiException { GitLabApiForm form = new GitLabApiForm() .withParam("move_before_id", moveBeforeId) .withParam("move_after_id", moveAfterId); Response response = post(Response.Status.OK, form, "groups", getGroupIdOrPath(groupIdOrPath), "epics", epicIid, "issues", issueIid); return (response.readEntity(EpicIssue.class)); }
[ "public", "EpicIssue", "updateIssue", "(", "Object", "groupIdOrPath", ",", "Integer", "epicIid", ",", "Integer", "issueIid", ",", "Integer", "moveBeforeId", ",", "Integer", "moveAfterId", ")", "throws", "GitLabApiException", "{", "GitLabApiForm", "form", "=", "new",...
Updates an epic - issue association. <pre><code>GitLab Endpoint: PUT /groups/:id/epics/:epic_iid/issues/:issue_id</code></pre> @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path @param epicIid the Epic IID that the issue is assigned to @param issueIid the issue IID to update @param moveBeforeId the ID of the issue - epic association that should be placed before the link in the question (optional) @param moveAfterId the ID of the issue - epic association that should be placed after the link in the question (optional) @return an EpicIssue instance containing info on the newly assigned epic issue @throws GitLabApiException if any exception occurs
[ "Updates", "an", "epic", "-", "issue", "association", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/EpicsApi.java#L452-L459
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/Pager.java
Pager.getHeaderValue
private String getHeaderValue(Response response, String key) throws GitLabApiException { String value = response.getHeaderString(key); value = (value != null ? value.trim() : null); if (value == null || value.length() == 0) { return (null); } return (value); }
java
private String getHeaderValue(Response response, String key) throws GitLabApiException { String value = response.getHeaderString(key); value = (value != null ? value.trim() : null); if (value == null || value.length() == 0) { return (null); } return (value); }
[ "private", "String", "getHeaderValue", "(", "Response", "response", ",", "String", "key", ")", "throws", "GitLabApiException", "{", "String", "value", "=", "response", ".", "getHeaderString", "(", "key", ")", ";", "value", "=", "(", "value", "!=", "null", "?...
Get the specified header value from the Response instance. @param response the Response instance to get the value from @param key the HTTP header key to get the value for @return the specified header value from the Response instance, or null if the header is not present @throws GitLabApiException if any error occurs
[ "Get", "the", "specified", "header", "value", "from", "the", "Response", "instance", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/Pager.java#L139-L148
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/Pager.java
Pager.getIntHeaderValue
private int getIntHeaderValue(Response response, String key) throws GitLabApiException { String value = getHeaderValue(response, key); if (value == null) { return -1; } try { return (Integer.parseInt(value)); } catch (NumberFormatException nfe) { throw new GitLabApiException("Invalid '" + key + "' header value (" + value + ") from server"); } }
java
private int getIntHeaderValue(Response response, String key) throws GitLabApiException { String value = getHeaderValue(response, key); if (value == null) { return -1; } try { return (Integer.parseInt(value)); } catch (NumberFormatException nfe) { throw new GitLabApiException("Invalid '" + key + "' header value (" + value + ") from server"); } }
[ "private", "int", "getIntHeaderValue", "(", "Response", "response", ",", "String", "key", ")", "throws", "GitLabApiException", "{", "String", "value", "=", "getHeaderValue", "(", "response", ",", "key", ")", ";", "if", "(", "value", "==", "null", ")", "{", ...
Get the specified integer header value from the Response instance. @param response the Response instance to get the value from @param key the HTTP header key to get the value for @return the specified integer header value from the Response instance, or -1 if the header is not present @throws GitLabApiException if any error occurs
[ "Get", "the", "specified", "integer", "header", "value", "from", "the", "Response", "instance", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/Pager.java#L158-L170
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/Pager.java
Pager.setPageParam
private void setPageParam(int page) { pageParam.set(0, Integer.toString(page)); queryParams.put(PAGE_PARAM, pageParam); }
java
private void setPageParam(int page) { pageParam.set(0, Integer.toString(page)); queryParams.put(PAGE_PARAM, pageParam); }
[ "private", "void", "setPageParam", "(", "int", "page", ")", "{", "pageParam", ".", "set", "(", "0", ",", "Integer", ".", "toString", "(", "page", ")", ")", ";", "queryParams", ".", "put", "(", "PAGE_PARAM", ",", "pageParam", ")", ";", "}" ]
Sets the "page" query parameter. @param page the value for the "page" query parameter
[ "Sets", "the", "page", "query", "parameter", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/Pager.java#L177-L180
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/Pager.java
Pager.page
public List<T> page(int pageNumber) { if (pageNumber > totalPages && pageNumber > kaminariNextPage) { throw new NoSuchElementException(); } else if (pageNumber < 1) { throw new NoSuchElementException(); } if (currentPage == 0 && pageNumber == 1) { currentPage = 1; return (currentItems); } if (currentPage == pageNumber) { return (currentItems); } try { setPageParam(pageNumber); Response response = api.get(Response.Status.OK, queryParams, pathArgs); currentItems = mapper.readValue((InputStream) response.getEntity(), javaType); currentPage = pageNumber; if (kaminariNextPage > 0) { kaminariNextPage = getIntHeaderValue(response, NEXT_PAGE_HEADER); } return (currentItems); } catch (GitLabApiException | IOException e) { throw new RuntimeException(e); } }
java
public List<T> page(int pageNumber) { if (pageNumber > totalPages && pageNumber > kaminariNextPage) { throw new NoSuchElementException(); } else if (pageNumber < 1) { throw new NoSuchElementException(); } if (currentPage == 0 && pageNumber == 1) { currentPage = 1; return (currentItems); } if (currentPage == pageNumber) { return (currentItems); } try { setPageParam(pageNumber); Response response = api.get(Response.Status.OK, queryParams, pathArgs); currentItems = mapper.readValue((InputStream) response.getEntity(), javaType); currentPage = pageNumber; if (kaminariNextPage > 0) { kaminariNextPage = getIntHeaderValue(response, NEXT_PAGE_HEADER); } return (currentItems); } catch (GitLabApiException | IOException e) { throw new RuntimeException(e); } }
[ "public", "List", "<", "T", ">", "page", "(", "int", "pageNumber", ")", "{", "if", "(", "pageNumber", ">", "totalPages", "&&", "pageNumber", ">", "kaminariNextPage", ")", "{", "throw", "new", "NoSuchElementException", "(", ")", ";", "}", "else", "if", "(...
Returns the specified page of List. @param pageNumber the page to get @return the specified page of List @throws NoSuchElementException if the iteration has no more elements @throws RuntimeException if a GitLab API error occurs, will contain a wrapped GitLabApiException with the details of the error
[ "Returns", "the", "specified", "page", "of", "List", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/Pager.java#L303-L336
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/Pager.java
Pager.all
public List<T> all() throws GitLabApiException { // Make sure that current page is 0, this will ensure the whole list is fetched // regardless of what page the instance is currently on. currentPage = 0; List<T> allItems = new ArrayList<>(totalItems); // Iterate through the pages and append each page of items to the list while (hasNext()) { allItems.addAll(next()); } return (allItems); }
java
public List<T> all() throws GitLabApiException { // Make sure that current page is 0, this will ensure the whole list is fetched // regardless of what page the instance is currently on. currentPage = 0; List<T> allItems = new ArrayList<>(totalItems); // Iterate through the pages and append each page of items to the list while (hasNext()) { allItems.addAll(next()); } return (allItems); }
[ "public", "List", "<", "T", ">", "all", "(", ")", "throws", "GitLabApiException", "{", "// Make sure that current page is 0, this will ensure the whole list is fetched\r", "// regardless of what page the instance is currently on.\r", "currentPage", "=", "0", ";", "List", "<", "...
Gets all the items from each page as a single List instance. @return all the items from each page as a single List instance @throws GitLabApiException if any error occurs
[ "Gets", "all", "the", "items", "from", "each", "page", "as", "a", "single", "List", "instance", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/Pager.java#L344-L357
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/Pager.java
Pager.stream
public Stream<T> stream() throws GitLabApiException, IllegalStateException { if (pagerStream == null) { synchronized (this) { if (pagerStream == null) { // Make sure that current page is 0, this will ensure the whole list is streamed // regardless of what page the instance is currently on. currentPage = 0; // Create a Stream.Builder to contain all the items. This is more efficient than // getting a List with all() and streaming that List Stream.Builder<T> streamBuilder = Stream.builder(); // Iterate through the pages and append each page of items to the stream builder while (hasNext()) { next().forEach(streamBuilder); } pagerStream = streamBuilder.build(); return (pagerStream); } } } throw new IllegalStateException("Stream already issued"); }
java
public Stream<T> stream() throws GitLabApiException, IllegalStateException { if (pagerStream == null) { synchronized (this) { if (pagerStream == null) { // Make sure that current page is 0, this will ensure the whole list is streamed // regardless of what page the instance is currently on. currentPage = 0; // Create a Stream.Builder to contain all the items. This is more efficient than // getting a List with all() and streaming that List Stream.Builder<T> streamBuilder = Stream.builder(); // Iterate through the pages and append each page of items to the stream builder while (hasNext()) { next().forEach(streamBuilder); } pagerStream = streamBuilder.build(); return (pagerStream); } } } throw new IllegalStateException("Stream already issued"); }
[ "public", "Stream", "<", "T", ">", "stream", "(", ")", "throws", "GitLabApiException", ",", "IllegalStateException", "{", "if", "(", "pagerStream", "==", "null", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "pagerStream", "==", "null", ")", ...
Builds and returns a Stream instance which is pre-populated with all items from all pages. @return a Stream instance which is pre-populated with all items from all pages @throws IllegalStateException if Stream has already been issued @throws GitLabApiException if any other error occurs
[ "Builds", "and", "returns", "a", "Stream", "instance", "which", "is", "pre", "-", "populated", "with", "all", "items", "from", "all", "pages", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/Pager.java#L366-L392
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/Pager.java
Pager.lazyStream
public Stream<T> lazyStream() throws IllegalStateException { if (pagerStream == null) { synchronized (this) { if (pagerStream == null) { // Make sure that current page is 0, this will ensure the whole list is streamed // regardless of what page the instance is currently on. currentPage = 0; pagerStream = StreamSupport.stream(new PagerSpliterator<T>(this), false); return (pagerStream); } } } throw new IllegalStateException("Stream already issued"); }
java
public Stream<T> lazyStream() throws IllegalStateException { if (pagerStream == null) { synchronized (this) { if (pagerStream == null) { // Make sure that current page is 0, this will ensure the whole list is streamed // regardless of what page the instance is currently on. currentPage = 0; pagerStream = StreamSupport.stream(new PagerSpliterator<T>(this), false); return (pagerStream); } } } throw new IllegalStateException("Stream already issued"); }
[ "public", "Stream", "<", "T", ">", "lazyStream", "(", ")", "throws", "IllegalStateException", "{", "if", "(", "pagerStream", "==", "null", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "pagerStream", "==", "null", ")", "{", "// Make sure that...
Creates a Stream instance for lazily streaming items from the GitLab server. @return a Stream instance for lazily streaming items from the GitLab server @throws IllegalStateException if Stream has already been issued
[ "Creates", "a", "Stream", "instance", "for", "lazily", "streaming", "items", "from", "the", "GitLab", "server", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/Pager.java#L400-L417
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/utils/MaskingLoggingFilter.java
MaskingLoggingFilter.setMaskedHeaderNames
public void setMaskedHeaderNames(final List<String> maskedHeaderNames) { this.maskedHeaderNames.clear(); if (maskedHeaderNames != null) { maskedHeaderNames.forEach(h -> { addMaskedHeaderName(h); }); } }
java
public void setMaskedHeaderNames(final List<String> maskedHeaderNames) { this.maskedHeaderNames.clear(); if (maskedHeaderNames != null) { maskedHeaderNames.forEach(h -> { addMaskedHeaderName(h); }); } }
[ "public", "void", "setMaskedHeaderNames", "(", "final", "List", "<", "String", ">", "maskedHeaderNames", ")", "{", "this", ".", "maskedHeaderNames", ".", "clear", "(", ")", ";", "if", "(", "maskedHeaderNames", "!=", "null", ")", "{", "maskedHeaderNames", ".", ...
Set the list of header names to mask values for. If null, will clear the header names to mask. @param maskedHeaderNames a list of header names that should have the values masked, if null, will clear the header names to mask
[ "Set", "the", "list", "of", "header", "names", "to", "mask", "values", "for", ".", "If", "null", "will", "clear", "the", "header", "names", "to", "mask", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/utils/MaskingLoggingFilter.java#L143-L150
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/utils/MaskingLoggingFilter.java
MaskingLoggingFilter.addMaskedHeaderName
public void addMaskedHeaderName(String maskedHeaderName) { if (maskedHeaderName != null) { maskedHeaderName = maskedHeaderName.trim(); if (maskedHeaderName.length() > 0) { maskedHeaderNames.add(maskedHeaderName.toLowerCase()); } } }
java
public void addMaskedHeaderName(String maskedHeaderName) { if (maskedHeaderName != null) { maskedHeaderName = maskedHeaderName.trim(); if (maskedHeaderName.length() > 0) { maskedHeaderNames.add(maskedHeaderName.toLowerCase()); } } }
[ "public", "void", "addMaskedHeaderName", "(", "String", "maskedHeaderName", ")", "{", "if", "(", "maskedHeaderName", "!=", "null", ")", "{", "maskedHeaderName", "=", "maskedHeaderName", ".", "trim", "(", ")", ";", "if", "(", "maskedHeaderName", ".", "length", ...
Add a header name to the list of masked header names. @param maskedHeaderName the masked header name to add
[ "Add", "a", "header", "name", "to", "the", "list", "of", "masked", "header", "names", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/utils/MaskingLoggingFilter.java#L157-L164
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/utils/MaskingLoggingFilter.java
MaskingLoggingFilter.printHeaders
protected void printHeaders(final StringBuilder sb, final long id, final String prefix, final MultivaluedMap<String, String> headers) { getSortedHeaders(headers.entrySet()).forEach(h -> { final List<?> values = h.getValue(); final String header = h.getKey(); final boolean isMaskedHeader = maskedHeaderNames.contains(header.toLowerCase()); if (values.size() == 1) { String value = (isMaskedHeader ? "********" : values.get(0).toString()); appendId(sb, id).append(prefix).append(header).append(": ").append(value).append('\n'); } else { final StringBuilder headerBuf = new StringBuilder(); for (final Object value : values) { if (headerBuf.length() == 0) { headerBuf.append(", "); } headerBuf.append(isMaskedHeader ? "********" : value.toString()); } appendId(sb, id).append(prefix).append(header).append(": ").append(headerBuf.toString()).append('\n'); } }); }
java
protected void printHeaders(final StringBuilder sb, final long id, final String prefix, final MultivaluedMap<String, String> headers) { getSortedHeaders(headers.entrySet()).forEach(h -> { final List<?> values = h.getValue(); final String header = h.getKey(); final boolean isMaskedHeader = maskedHeaderNames.contains(header.toLowerCase()); if (values.size() == 1) { String value = (isMaskedHeader ? "********" : values.get(0).toString()); appendId(sb, id).append(prefix).append(header).append(": ").append(value).append('\n'); } else { final StringBuilder headerBuf = new StringBuilder(); for (final Object value : values) { if (headerBuf.length() == 0) { headerBuf.append(", "); } headerBuf.append(isMaskedHeader ? "********" : value.toString()); } appendId(sb, id).append(prefix).append(header).append(": ").append(headerBuf.toString()).append('\n'); } }); }
[ "protected", "void", "printHeaders", "(", "final", "StringBuilder", "sb", ",", "final", "long", "id", ",", "final", "String", "prefix", ",", "final", "MultivaluedMap", "<", "String", ",", "String", ">", "headers", ")", "{", "getSortedHeaders", "(", "headers", ...
Logs each of the HTTP headers, masking the value of the header if the header key is in the list of masked header names. @param sb the StringBuilder to build up the logging info in @param id the ID for the logging line @param prefix the logging line prefix character @param headers a MultiValue map holding the header keys and values
[ "Logs", "each", "of", "the", "HTTP", "headers", "masking", "the", "value", "of", "the", "header", "if", "the", "header", "key", "is", "in", "the", "list", "of", "masked", "header", "names", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/utils/MaskingLoggingFilter.java#L211-L239
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/PackagesApi.java
PackagesApi.getPackages
public List<Package> getPackages(Object projectIdOrPath) throws GitLabApiException { return (getPackages(projectIdOrPath, getDefaultPerPage()).all()); }
java
public List<Package> getPackages(Object projectIdOrPath) throws GitLabApiException { return (getPackages(projectIdOrPath, getDefaultPerPage()).all()); }
[ "public", "List", "<", "Package", ">", "getPackages", "(", "Object", "projectIdOrPath", ")", "throws", "GitLabApiException", "{", "return", "(", "getPackages", "(", "projectIdOrPath", ",", "getDefaultPerPage", "(", ")", ")", ".", "all", "(", ")", ")", ";", "...
Get a list of project packages. Both Maven and NPM packages are included in results. When accessed without authentication, only packages of public projects are returned. <pre><code>GitLab Endpoint: GET /projects/:id/packages</code></pre> @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @return a list of pages in the project's packages @throws GitLabApiException if any exception occurs
[ "Get", "a", "list", "of", "project", "packages", ".", "Both", "Maven", "and", "NPM", "packages", "are", "included", "in", "results", ".", "When", "accessed", "without", "authentication", "only", "packages", "of", "public", "projects", "are", "returned", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/PackagesApi.java#L57-L59
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/PackagesApi.java
PackagesApi.getPackages
public List<Package> getPackages(Object projectIdOrPath, int page, int perPage) throws GitLabApiException { Response response = get(Response.Status.OK, getPageQueryParams(page, perPage), "projects", getProjectIdOrPath(projectIdOrPath), "packages"); return response.readEntity(new GenericType<List<Package>>() {}); }
java
public List<Package> getPackages(Object projectIdOrPath, int page, int perPage) throws GitLabApiException { Response response = get(Response.Status.OK, getPageQueryParams(page, perPage), "projects", getProjectIdOrPath(projectIdOrPath), "packages"); return response.readEntity(new GenericType<List<Package>>() {}); }
[ "public", "List", "<", "Package", ">", "getPackages", "(", "Object", "projectIdOrPath", ",", "int", "page", ",", "int", "perPage", ")", "throws", "GitLabApiException", "{", "Response", "response", "=", "get", "(", "Response", ".", "Status", ".", "OK", ",", ...
Get a list of project packages for the specified page. Both Maven and NPM packages are included in results. When accessed without authentication, only packages of public projects are returned. <pre><code>GitLab Endpoint: GET /projects/:id/packages</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 Package instances per page @return a list of project packages for the specified range @throws GitLabApiException if any exception occurs
[ "Get", "a", "list", "of", "project", "packages", "for", "the", "specified", "page", ".", "Both", "Maven", "and", "NPM", "packages", "are", "included", "in", "results", ".", "When", "accessed", "without", "authentication", "only", "packages", "of", "public", ...
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/PackagesApi.java#L73-L77
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/PackagesApi.java
PackagesApi.getPackages
public Pager<Package> getPackages(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException { return (new Pager<Package>(this, Package.class, itemsPerPage, null, "projects", getProjectIdOrPath(projectIdOrPath), "packages")); }
java
public Pager<Package> getPackages(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException { return (new Pager<Package>(this, Package.class, itemsPerPage, null, "projects", getProjectIdOrPath(projectIdOrPath), "packages")); }
[ "public", "Pager", "<", "Package", ">", "getPackages", "(", "Object", "projectIdOrPath", ",", "int", "itemsPerPage", ")", "throws", "GitLabApiException", "{", "return", "(", "new", "Pager", "<", "Package", ">", "(", "this", ",", "Package", ".", "class", ",",...
Get a Pager of project packages. Both Maven and NPM packages are included in results. When accessed without authentication, only packages of public projects are returned. <pre><code>GitLab Endpoint: GET /projects/:id/packages</code></pre> @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @param itemsPerPage the number of Package instances per page @return a Pager of project packages for the specified range @throws GitLabApiException if any exception occurs
[ "Get", "a", "Pager", "of", "project", "packages", ".", "Both", "Maven", "and", "NPM", "packages", "are", "included", "in", "results", ".", "When", "accessed", "without", "authentication", "only", "packages", "of", "public", "projects", "are", "returned", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/PackagesApi.java#L90-L93
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/PackagesApi.java
PackagesApi.getPackagesStream
public Stream<Package> getPackagesStream(Object projectIdOrPath) throws GitLabApiException { return (getPackages(projectIdOrPath, getDefaultPerPage()).stream()); }
java
public Stream<Package> getPackagesStream(Object projectIdOrPath) throws GitLabApiException { return (getPackages(projectIdOrPath, getDefaultPerPage()).stream()); }
[ "public", "Stream", "<", "Package", ">", "getPackagesStream", "(", "Object", "projectIdOrPath", ")", "throws", "GitLabApiException", "{", "return", "(", "getPackages", "(", "projectIdOrPath", ",", "getDefaultPerPage", "(", ")", ")", ".", "stream", "(", ")", ")",...
Get a Stream of project packages. Both Maven and NPM packages are included in results. When accessed without authentication, only packages of public projects are returned. <pre><code>GitLab Endpoint: GET /projects/:id/packages</code></pre> @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @return a Stream of pages in the project's packages @throws GitLabApiException if any exception occurs
[ "Get", "a", "Stream", "of", "project", "packages", ".", "Both", "Maven", "and", "NPM", "packages", "are", "included", "in", "results", ".", "When", "accessed", "without", "authentication", "only", "packages", "of", "public", "projects", "are", "returned", "." ...
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/PackagesApi.java#L105-L107
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/PackagesApi.java
PackagesApi.getPackage
public Package getPackage(Object projectIdOrPath, Integer packageId) throws GitLabApiException { Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "packages", packageId); return (response.readEntity(Package.class)); }
java
public Package getPackage(Object projectIdOrPath, Integer packageId) throws GitLabApiException { Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "packages", packageId); return (response.readEntity(Package.class)); }
[ "public", "Package", "getPackage", "(", "Object", "projectIdOrPath", ",", "Integer", "packageId", ")", "throws", "GitLabApiException", "{", "Response", "response", "=", "get", "(", "Response", ".", "Status", ".", "OK", ",", "null", ",", "\"projects\"", ",", "g...
Get a single project package. <pre><code>GitLab Endpoint: GET /projects/:id/packages/:package_id</code></pre> @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @param packageId the ID of the package to get @return a Package instance for the specified package ID @throws GitLabApiException if any exception occurs
[ "Get", "a", "single", "project", "package", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/PackagesApi.java#L119-L123
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/PackagesApi.java
PackagesApi.getPackageFiles
public List<PackageFile> getPackageFiles(Object projectIdOrPath, Integer packageId) throws GitLabApiException { return (getPackageFiles(projectIdOrPath, packageId, getDefaultPerPage()).all()); }
java
public List<PackageFile> getPackageFiles(Object projectIdOrPath, Integer packageId) throws GitLabApiException { return (getPackageFiles(projectIdOrPath, packageId, getDefaultPerPage()).all()); }
[ "public", "List", "<", "PackageFile", ">", "getPackageFiles", "(", "Object", "projectIdOrPath", ",", "Integer", "packageId", ")", "throws", "GitLabApiException", "{", "return", "(", "getPackageFiles", "(", "projectIdOrPath", ",", "packageId", ",", "getDefaultPerPage",...
Get a list of package files of a single package. <pre><code>GitLab Endpoint: GET /projects/:id/packages/:package_id/package_files</code></pre> @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @param packageId the ID of the package to get the package files for @return a list of PackageFile instances for the specified package ID @throws GitLabApiException if any exception occurs
[ "Get", "a", "list", "of", "package", "files", "of", "a", "single", "package", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/PackagesApi.java#L135-L137
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/PackagesApi.java
PackagesApi.getPackageFiles
public List<PackageFile> getPackageFiles(Object projectIdOrPath, Integer packageId, int page, int perPage) throws GitLabApiException { Response response = get(Response.Status.OK, getPageQueryParams(page, perPage), "projects", getProjectIdOrPath(projectIdOrPath), "packages", packageId, "package_files"); return response.readEntity(new GenericType<List<PackageFile>>() {}); }
java
public List<PackageFile> getPackageFiles(Object projectIdOrPath, Integer packageId, int page, int perPage) throws GitLabApiException { Response response = get(Response.Status.OK, getPageQueryParams(page, perPage), "projects", getProjectIdOrPath(projectIdOrPath), "packages", packageId, "package_files"); return response.readEntity(new GenericType<List<PackageFile>>() {}); }
[ "public", "List", "<", "PackageFile", ">", "getPackageFiles", "(", "Object", "projectIdOrPath", ",", "Integer", "packageId", ",", "int", "page", ",", "int", "perPage", ")", "throws", "GitLabApiException", "{", "Response", "response", "=", "get", "(", "Response",...
Get a list of package files of a single package for the specified page. <pre><code>GitLab Endpoint: GET /projects/:id/packages/:package_id/package_files</code></pre> @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @param packageId the ID of the package to get the package files for @param page the page to get @param perPage the number of PackageFile instances per page @return a list of PackageFile instances for the specified package ID @throws GitLabApiException if any exception occurs
[ "Get", "a", "list", "of", "package", "files", "of", "a", "single", "package", "for", "the", "specified", "page", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/PackagesApi.java#L151-L155
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/PackagesApi.java
PackagesApi.getPackageFiles
public Pager<PackageFile> getPackageFiles(Object projectIdOrPath, Integer packageId, int itemsPerPage) throws GitLabApiException { return (new Pager<PackageFile>(this, PackageFile.class, itemsPerPage, null, "projects", getProjectIdOrPath(projectIdOrPath), "packages", packageId, "package_files")); }
java
public Pager<PackageFile> getPackageFiles(Object projectIdOrPath, Integer packageId, int itemsPerPage) throws GitLabApiException { return (new Pager<PackageFile>(this, PackageFile.class, itemsPerPage, null, "projects", getProjectIdOrPath(projectIdOrPath), "packages", packageId, "package_files")); }
[ "public", "Pager", "<", "PackageFile", ">", "getPackageFiles", "(", "Object", "projectIdOrPath", ",", "Integer", "packageId", ",", "int", "itemsPerPage", ")", "throws", "GitLabApiException", "{", "return", "(", "new", "Pager", "<", "PackageFile", ">", "(", "this...
Get a Pager of project package files. <pre><code>GitLab Endpoint: GET /projects/:id/packages/:package_id/package_files</code></pre> @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @param packageId the ID of the package to get the package files for @param itemsPerPage the number of PackageFile instances per page @return a Pager of PackageFile instances for the specified package ID @throws GitLabApiException if any exception occurs
[ "Get", "a", "Pager", "of", "project", "package", "files", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/PackagesApi.java#L168-L171
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/PackagesApi.java
PackagesApi.getPackagesStream
public Stream<PackageFile> getPackagesStream(Object projectIdOrPath, Integer packageId) throws GitLabApiException { return (getPackageFiles(projectIdOrPath, packageId, getDefaultPerPage()).stream()); }
java
public Stream<PackageFile> getPackagesStream(Object projectIdOrPath, Integer packageId) throws GitLabApiException { return (getPackageFiles(projectIdOrPath, packageId, getDefaultPerPage()).stream()); }
[ "public", "Stream", "<", "PackageFile", ">", "getPackagesStream", "(", "Object", "projectIdOrPath", ",", "Integer", "packageId", ")", "throws", "GitLabApiException", "{", "return", "(", "getPackageFiles", "(", "projectIdOrPath", ",", "packageId", ",", "getDefaultPerPa...
Get a Stream of project package files. <pre><code>GitLab Endpoint: GET /projects/:id/packages/:package_id/package_files</code></pre> @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @param packageId the ID of the package to get the package files for @return a Stream of PackageFile instances for the specified package ID @throws GitLabApiException if any exception occurs
[ "Get", "a", "Stream", "of", "project", "package", "files", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/PackagesApi.java#L183-L185
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/PackagesApi.java
PackagesApi.deletePackage
public void deletePackage(Object projectIdOrPath, Integer packageId) throws GitLabApiException { if (packageId == null) { throw new RuntimeException("packageId cannot be null"); } delete(Response.Status.NO_CONTENT, null,"projects", getProjectIdOrPath(projectIdOrPath), "packages", packageId); }
java
public void deletePackage(Object projectIdOrPath, Integer packageId) throws GitLabApiException { if (packageId == null) { throw new RuntimeException("packageId cannot be null"); } delete(Response.Status.NO_CONTENT, null,"projects", getProjectIdOrPath(projectIdOrPath), "packages", packageId); }
[ "public", "void", "deletePackage", "(", "Object", "projectIdOrPath", ",", "Integer", "packageId", ")", "throws", "GitLabApiException", "{", "if", "(", "packageId", "==", "null", ")", "{", "throw", "new", "RuntimeException", "(", "\"packageId cannot be null\"", ")", ...
Deletes a project package. <pre><code>GitLab Endpoint: DELETE /projects/:id/packages/:package_id</code></pre> @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @param packageId the ID of the package to delete @throws GitLabApiException if any exception occurs
[ "Deletes", "a", "project", "package", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/PackagesApi.java#L196-L203
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/NamespaceApi.java
NamespaceApi.getNamespaces
public List<Namespace> getNamespaces(int page, int perPage) throws GitLabApiException { Response response = get(Response.Status.OK, getPageQueryParams(page, perPage), "namespaces"); return (response.readEntity(new GenericType<List<Namespace>>() {})); }
java
public List<Namespace> getNamespaces(int page, int perPage) throws GitLabApiException { Response response = get(Response.Status.OK, getPageQueryParams(page, perPage), "namespaces"); return (response.readEntity(new GenericType<List<Namespace>>() {})); }
[ "public", "List", "<", "Namespace", ">", "getNamespaces", "(", "int", "page", ",", "int", "perPage", ")", "throws", "GitLabApiException", "{", "Response", "response", "=", "get", "(", "Response", ".", "Status", ".", "OK", ",", "getPageQueryParams", "(", "pag...
Get a list of the namespaces of the authenticated user. If the user is an administrator, a list of all namespaces in the GitLab instance is returned. <pre><code>GitLab Endpoint: GET /namespaces</code></pre> @param page the page to get @param perPage the number of Namespace instances per page @return a List of Namespace instances in the specified page range @throws GitLabApiException if any exception occurs
[ "Get", "a", "list", "of", "the", "namespaces", "of", "the", "authenticated", "user", ".", "If", "the", "user", "is", "an", "administrator", "a", "list", "of", "all", "namespaces", "in", "the", "GitLab", "instance", "is", "returned", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/NamespaceApi.java#L44-L47
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/NamespaceApi.java
NamespaceApi.getNamespaces
public Pager<Namespace> getNamespaces(int itemsPerPage) throws GitLabApiException { return (new Pager<Namespace>(this, Namespace.class, itemsPerPage, null, "namespaces")); }
java
public Pager<Namespace> getNamespaces(int itemsPerPage) throws GitLabApiException { return (new Pager<Namespace>(this, Namespace.class, itemsPerPage, null, "namespaces")); }
[ "public", "Pager", "<", "Namespace", ">", "getNamespaces", "(", "int", "itemsPerPage", ")", "throws", "GitLabApiException", "{", "return", "(", "new", "Pager", "<", "Namespace", ">", "(", "this", ",", "Namespace", ".", "class", ",", "itemsPerPage", ",", "nul...
Get a Pager of the namespaces of the authenticated user. If the user is an administrator, a Pager of all namespaces in the GitLab instance is returned. <pre><code>GitLab Endpoint: GET /namespaces</code></pre> @param itemsPerPage the number of Project instances that will be fetched per page @return a Pager of Namespace instances @throws GitLabApiException if any exception occurs
[ "Get", "a", "Pager", "of", "the", "namespaces", "of", "the", "authenticated", "user", ".", "If", "the", "user", "is", "an", "administrator", "a", "Pager", "of", "all", "namespaces", "in", "the", "GitLab", "instance", "is", "returned", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/NamespaceApi.java#L59-L61
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/NamespaceApi.java
NamespaceApi.findNamespaces
public List<Namespace> findNamespaces(String query) throws GitLabApiException { return (findNamespaces(query, getDefaultPerPage()).all()); }
java
public List<Namespace> findNamespaces(String query) throws GitLabApiException { return (findNamespaces(query, getDefaultPerPage()).all()); }
[ "public", "List", "<", "Namespace", ">", "findNamespaces", "(", "String", "query", ")", "throws", "GitLabApiException", "{", "return", "(", "findNamespaces", "(", "query", ",", "getDefaultPerPage", "(", ")", ")", ".", "all", "(", ")", ")", ";", "}" ]
Get all namespaces that match a string in their name or path. <pre><code>GitLab Endpoint: GET /namespaces?search=:query</code></pre> @param query the search string @return the Namespace List with the matching namespaces @throws GitLabApiException if any exception occurs
[ "Get", "all", "namespaces", "that", "match", "a", "string", "in", "their", "name", "or", "path", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/NamespaceApi.java#L85-L87
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/NamespaceApi.java
NamespaceApi.findNamespaces
public List<Namespace> findNamespaces(String query, int page, int perPage) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm().withParam("search", query, true).withParam(PAGE_PARAM, page).withParam(PER_PAGE_PARAM, perPage); Response response = get(Response.Status.OK, formData.asMap(), "namespaces"); return (response.readEntity(new GenericType<List<Namespace>>() {})); }
java
public List<Namespace> findNamespaces(String query, int page, int perPage) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm().withParam("search", query, true).withParam(PAGE_PARAM, page).withParam(PER_PAGE_PARAM, perPage); Response response = get(Response.Status.OK, formData.asMap(), "namespaces"); return (response.readEntity(new GenericType<List<Namespace>>() {})); }
[ "public", "List", "<", "Namespace", ">", "findNamespaces", "(", "String", "query", ",", "int", "page", ",", "int", "perPage", ")", "throws", "GitLabApiException", "{", "GitLabApiForm", "formData", "=", "new", "GitLabApiForm", "(", ")", ".", "withParam", "(", ...
Get all namespaces that match a string in their name or path in the specified page range. <pre><code>GitLab Endpoint: GET /namespaces?search=:query</code></pre> @param query the search string @param page the page to get @param perPage the number of Namespace instances per page @return the Namespace List with the matching namespaces @throws GitLabApiException if any exception occurs
[ "Get", "all", "namespaces", "that", "match", "a", "string", "in", "their", "name", "or", "path", "in", "the", "specified", "page", "range", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/NamespaceApi.java#L100-L104
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/NamespaceApi.java
NamespaceApi.findNamespaces
public Pager<Namespace> findNamespaces(String query, int itemsPerPage) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm().withParam("search", query, true); return (new Pager<Namespace>(this, Namespace.class, itemsPerPage, formData.asMap(), "namespaces")); }
java
public Pager<Namespace> findNamespaces(String query, int itemsPerPage) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm().withParam("search", query, true); return (new Pager<Namespace>(this, Namespace.class, itemsPerPage, formData.asMap(), "namespaces")); }
[ "public", "Pager", "<", "Namespace", ">", "findNamespaces", "(", "String", "query", ",", "int", "itemsPerPage", ")", "throws", "GitLabApiException", "{", "GitLabApiForm", "formData", "=", "new", "GitLabApiForm", "(", ")", ".", "withParam", "(", "\"search\"", ","...
Get a Pager of all namespaces that match a string in their name or path. <pre><code>GitLab Endpoint: GET /namespaces?search=:query</code></pre> @param query the search string @param itemsPerPage the number of Project instances that will be fetched per page @return a Pager of Namespace instances with the matching namespaces @throws GitLabApiException if any exception occurs
[ "Get", "a", "Pager", "of", "all", "namespaces", "that", "match", "a", "string", "in", "their", "name", "or", "path", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/NamespaceApi.java#L116-L119
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/NamespaceApi.java
NamespaceApi.findNamespacesStream
public Stream<Namespace> findNamespacesStream(String query) throws GitLabApiException { return (findNamespaces(query, getDefaultPerPage()).stream()); }
java
public Stream<Namespace> findNamespacesStream(String query) throws GitLabApiException { return (findNamespaces(query, getDefaultPerPage()).stream()); }
[ "public", "Stream", "<", "Namespace", ">", "findNamespacesStream", "(", "String", "query", ")", "throws", "GitLabApiException", "{", "return", "(", "findNamespaces", "(", "query", ",", "getDefaultPerPage", "(", ")", ")", ".", "stream", "(", ")", ")", ";", "}...
Get all namespaces that match a string in their name or path as a Stream. <pre><code>GitLab Endpoint: GET /namespaces?search=:query</code></pre> @param query the search string @return a Stream with the matching namespaces @throws GitLabApiException if any exception occurs
[ "Get", "all", "namespaces", "that", "match", "a", "string", "in", "their", "name", "or", "path", "as", "a", "Stream", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/NamespaceApi.java#L130-L132
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/webhook/WebHookManager.java
WebHookManager.handleEvent
public void handleEvent(HttpServletRequest request) throws GitLabApiException { String eventName = request.getHeader("X-Gitlab-Event"); if (eventName == null || eventName.trim().isEmpty()) { LOGGER.warning("X-Gitlab-Event header is missing!"); return; } if (!isValidSecretToken(request)) { String message = "X-Gitlab-Token mismatch!"; LOGGER.warning(message); throw new GitLabApiException(message); } LOGGER.info("handleEvent: X-Gitlab-Event=" + eventName); switch (eventName) { case BuildEvent.BUILD_HOOK_X_GITLAB_EVENT: case BuildEvent.JOB_HOOK_X_GITLAB_EVENT: case IssueEvent.X_GITLAB_EVENT: case MergeRequestEvent.X_GITLAB_EVENT: case NoteEvent.X_GITLAB_EVENT: case PipelineEvent.X_GITLAB_EVENT: case PushEvent.X_GITLAB_EVENT: case TagPushEvent.X_GITLAB_EVENT: case WikiPageEvent.X_GITLAB_EVENT: break; default: String message = "Unsupported X-Gitlab-Event, event Name=" + eventName; LOGGER.warning(message); throw new GitLabApiException(message); } try { Event event; if (LOGGER.isLoggable(Level.FINE)) { LOGGER.fine(HttpRequestUtils.getShortRequestDump(eventName + " webhook", true, request)); String postData = HttpRequestUtils.getPostDataAsString(request); LOGGER.fine("Raw POST data:\n" + postData); event = jacksonJson.unmarshal(Event.class, postData); LOGGER.fine(event.getObjectKind() + " event:\n" + jacksonJson.marshal(event) + "\n"); } else { InputStreamReader reader = new InputStreamReader(request.getInputStream()); event = jacksonJson.unmarshal(Event.class, reader); } event.setRequestUrl(request.getRequestURL().toString()); event.setRequestQueryString(request.getQueryString()); fireEvent(event); } catch (Exception e) { LOGGER.warning("Error parsing JSON data, exception=" + e.getClass().getSimpleName() + ", error=" + e.getMessage()); throw new GitLabApiException(e); } }
java
public void handleEvent(HttpServletRequest request) throws GitLabApiException { String eventName = request.getHeader("X-Gitlab-Event"); if (eventName == null || eventName.trim().isEmpty()) { LOGGER.warning("X-Gitlab-Event header is missing!"); return; } if (!isValidSecretToken(request)) { String message = "X-Gitlab-Token mismatch!"; LOGGER.warning(message); throw new GitLabApiException(message); } LOGGER.info("handleEvent: X-Gitlab-Event=" + eventName); switch (eventName) { case BuildEvent.BUILD_HOOK_X_GITLAB_EVENT: case BuildEvent.JOB_HOOK_X_GITLAB_EVENT: case IssueEvent.X_GITLAB_EVENT: case MergeRequestEvent.X_GITLAB_EVENT: case NoteEvent.X_GITLAB_EVENT: case PipelineEvent.X_GITLAB_EVENT: case PushEvent.X_GITLAB_EVENT: case TagPushEvent.X_GITLAB_EVENT: case WikiPageEvent.X_GITLAB_EVENT: break; default: String message = "Unsupported X-Gitlab-Event, event Name=" + eventName; LOGGER.warning(message); throw new GitLabApiException(message); } try { Event event; if (LOGGER.isLoggable(Level.FINE)) { LOGGER.fine(HttpRequestUtils.getShortRequestDump(eventName + " webhook", true, request)); String postData = HttpRequestUtils.getPostDataAsString(request); LOGGER.fine("Raw POST data:\n" + postData); event = jacksonJson.unmarshal(Event.class, postData); LOGGER.fine(event.getObjectKind() + " event:\n" + jacksonJson.marshal(event) + "\n"); } else { InputStreamReader reader = new InputStreamReader(request.getInputStream()); event = jacksonJson.unmarshal(Event.class, reader); } event.setRequestUrl(request.getRequestURL().toString()); event.setRequestQueryString(request.getQueryString()); fireEvent(event); } catch (Exception e) { LOGGER.warning("Error parsing JSON data, exception=" + e.getClass().getSimpleName() + ", error=" + e.getMessage()); throw new GitLabApiException(e); } }
[ "public", "void", "handleEvent", "(", "HttpServletRequest", "request", ")", "throws", "GitLabApiException", "{", "String", "eventName", "=", "request", ".", "getHeader", "(", "\"X-Gitlab-Event\"", ")", ";", "if", "(", "eventName", "==", "null", "||", "eventName", ...
Parses and verifies an Event 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", "Event", "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/webhook/WebHookManager.java#L53-L109
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/EventsApi.java
EventsApi.getAuthenticatedUserEvents
public List<Event> getAuthenticatedUserEvents(ActionType action, TargetType targetType, Date before, Date after, SortOrder sortOrder) throws GitLabApiException { return (getAuthenticatedUserEvents(action, targetType, before, after, sortOrder, getDefaultPerPage()).all()); }
java
public List<Event> getAuthenticatedUserEvents(ActionType action, TargetType targetType, Date before, Date after, SortOrder sortOrder) throws GitLabApiException { return (getAuthenticatedUserEvents(action, targetType, before, after, sortOrder, getDefaultPerPage()).all()); }
[ "public", "List", "<", "Event", ">", "getAuthenticatedUserEvents", "(", "ActionType", "action", ",", "TargetType", "targetType", ",", "Date", "before", ",", "Date", "after", ",", "SortOrder", "sortOrder", ")", "throws", "GitLabApiException", "{", "return", "(", ...
Get a list of events for the authenticated user. <pre><code>GitLab Endpoint: GET /events</code></pre> @param action include only events of a particular action type, optional @param targetType include only events of a particular target type, optional @param before include only events created before a particular date, optional @param after include only events created after a particular date, optional @param sortOrder sort events in ASC or DESC order by created_at. Default is DESC, optional @return a list of events for the authenticated user and matching the supplied parameters @throws GitLabApiException if any exception occurs
[ "Get", "a", "list", "of", "events", "for", "the", "authenticated", "user", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/EventsApi.java#L34-L37
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/EventsApi.java
EventsApi.getAuthenticatedUserEventsStream
public Stream<Event> getAuthenticatedUserEventsStream(ActionType action, TargetType targetType, Date before, Date after, SortOrder sortOrder) throws GitLabApiException { return (getAuthenticatedUserEvents(action, targetType, before, after, sortOrder, getDefaultPerPage()).stream()); }
java
public Stream<Event> getAuthenticatedUserEventsStream(ActionType action, TargetType targetType, Date before, Date after, SortOrder sortOrder) throws GitLabApiException { return (getAuthenticatedUserEvents(action, targetType, before, after, sortOrder, getDefaultPerPage()).stream()); }
[ "public", "Stream", "<", "Event", ">", "getAuthenticatedUserEventsStream", "(", "ActionType", "action", ",", "TargetType", "targetType", ",", "Date", "before", ",", "Date", "after", ",", "SortOrder", "sortOrder", ")", "throws", "GitLabApiException", "{", "return", ...
Get a Stream of events for the authenticated user. <pre><code>GitLab Endpoint: GET /events</code></pre> @param action include only events of a particular action type, optional @param targetType include only events of a particular target type, optional @param before include only events created before a particular date, optional @param after include only events created after a particular date, optional @param sortOrder sort events in ASC or DESC order by created_at. Default is DESC, optional @return a Stream of events for the authenticated user and matching the supplied parameters @throws GitLabApiException if any exception occurs
[ "Get", "a", "Stream", "of", "events", "for", "the", "authenticated", "user", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/EventsApi.java#L110-L113
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/EventsApi.java
EventsApi.getUserEvents
public List<Event> getUserEvents(Object userIdOrUsername, ActionType action, TargetType targetType, Date before, Date after, SortOrder sortOrder) throws GitLabApiException { return (getUserEvents(userIdOrUsername, action, targetType, before, after, sortOrder, getDefaultPerPage()).all()); }
java
public List<Event> getUserEvents(Object userIdOrUsername, ActionType action, TargetType targetType, Date before, Date after, SortOrder sortOrder) throws GitLabApiException { return (getUserEvents(userIdOrUsername, action, targetType, before, after, sortOrder, getDefaultPerPage()).all()); }
[ "public", "List", "<", "Event", ">", "getUserEvents", "(", "Object", "userIdOrUsername", ",", "ActionType", "action", ",", "TargetType", "targetType", ",", "Date", "before", ",", "Date", "after", ",", "SortOrder", "sortOrder", ")", "throws", "GitLabApiException", ...
Get a list of events for the specified user. <pre><code>GitLab Endpoint: GET /users/:userId/events</code></pre> @param userIdOrUsername the user ID, username of the user, or a User instance holding the user ID or username @param action include only events of a particular action type, optional @param targetType include only events of a particular target type, optional @param before include only events created before a particular date, optional @param after include only events created after a particular date, optional @param sortOrder sort events in ASC or DESC order by created_at. Default is DESC, optional @return a list of events for the specified user and matching the supplied parameters @throws GitLabApiException if any exception occurs
[ "Get", "a", "list", "of", "events", "for", "the", "specified", "user", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/EventsApi.java#L129-L132
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/EventsApi.java
EventsApi.getUserEvents
public Pager<Event> getUserEvents(Object userIdOrUsername, ActionType action, TargetType targetType, Date before, Date after, SortOrder sortOrder, int itemsPerPage) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("action", action) .withParam("target_type", targetType != null ? targetType.toValue().toLowerCase() : null) .withParam("before", before) .withParam("after", after) .withParam("sort", sortOrder); return (new Pager<Event>(this, Event.class, itemsPerPage, formData.asMap(), "users", getUserIdOrUsername(userIdOrUsername), "events")); }
java
public Pager<Event> getUserEvents(Object userIdOrUsername, ActionType action, TargetType targetType, Date before, Date after, SortOrder sortOrder, int itemsPerPage) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("action", action) .withParam("target_type", targetType != null ? targetType.toValue().toLowerCase() : null) .withParam("before", before) .withParam("after", after) .withParam("sort", sortOrder); return (new Pager<Event>(this, Event.class, itemsPerPage, formData.asMap(), "users", getUserIdOrUsername(userIdOrUsername), "events")); }
[ "public", "Pager", "<", "Event", ">", "getUserEvents", "(", "Object", "userIdOrUsername", ",", "ActionType", "action", ",", "TargetType", "targetType", ",", "Date", "before", ",", "Date", "after", ",", "SortOrder", "sortOrder", ",", "int", "itemsPerPage", ")", ...
Get a list of events for the specified user and in the specified page range. <pre><code>GitLab Endpoint: GET /users/:userId/events</code></pre> @param userIdOrUsername the user ID, username of the user, or a User instance holding the user ID or username @param action include only events of a particular action type, optional @param targetType include only events of a particular target type, optional @param before include only events created before a particular date, optional @param after include only events created after a particular date, optional @param sortOrder sort events in ASC or DESC order by created_at. Default is DESC, optional @param itemsPerPage the number of Event instances that will be fetched per page @return a Pager of events for the specified user and matching the supplied parameters @throws GitLabApiException if any exception occurs
[ "Get", "a", "list", "of", "events", "for", "the", "specified", "user", "and", "in", "the", "specified", "page", "range", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/EventsApi.java#L182-L194
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/EventsApi.java
EventsApi.getUserEventsStream
public Stream<Event> getUserEventsStream(Object userIdOrUsername, ActionType action, TargetType targetType, Date before, Date after, SortOrder sortOrder) throws GitLabApiException { return (getUserEvents(userIdOrUsername, action, targetType, before, after, sortOrder, getDefaultPerPage()).stream()); }
java
public Stream<Event> getUserEventsStream(Object userIdOrUsername, ActionType action, TargetType targetType, Date before, Date after, SortOrder sortOrder) throws GitLabApiException { return (getUserEvents(userIdOrUsername, action, targetType, before, after, sortOrder, getDefaultPerPage()).stream()); }
[ "public", "Stream", "<", "Event", ">", "getUserEventsStream", "(", "Object", "userIdOrUsername", ",", "ActionType", "action", ",", "TargetType", "targetType", ",", "Date", "before", ",", "Date", "after", ",", "SortOrder", "sortOrder", ")", "throws", "GitLabApiExce...
Get a Stream of events for the specified user. <pre><code>GitLab Endpoint: GET /users/:userId/events</code></pre> @param userIdOrUsername the user ID, username of the user, or a User instance holding the user ID or username @param action include only events of a particular action type, optional @param targetType include only events of a particular target type, optional @param before include only events created before a particular date, optional @param after include only events created after a particular date, optional @param sortOrder sort events in ASC or DESC order by created_at. Default is DESC, optional @return a Stream of events for the specified user and matching the supplied parameters @throws GitLabApiException if any exception occurs
[ "Get", "a", "Stream", "of", "events", "for", "the", "specified", "user", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/EventsApi.java#L210-L213
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/EventsApi.java
EventsApi.getProjectEvents
public List<Event> getProjectEvents(Object projectIdOrPath, ActionType action, TargetType targetType, Date before, Date after, SortOrder sortOrder) throws GitLabApiException { return (getProjectEvents(projectIdOrPath, action, targetType, before, after, sortOrder, getDefaultPerPage()).all()); }
java
public List<Event> getProjectEvents(Object projectIdOrPath, ActionType action, TargetType targetType, Date before, Date after, SortOrder sortOrder) throws GitLabApiException { return (getProjectEvents(projectIdOrPath, action, targetType, before, after, sortOrder, getDefaultPerPage()).all()); }
[ "public", "List", "<", "Event", ">", "getProjectEvents", "(", "Object", "projectIdOrPath", ",", "ActionType", "action", ",", "TargetType", "targetType", ",", "Date", "before", ",", "Date", "after", ",", "SortOrder", "sortOrder", ")", "throws", "GitLabApiException"...
Get a list of events for the specified project. <pre><code>GitLab Endpoint: GET /:projectId/events</code></pre> @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @param action include only events of a particular action type, optional @param targetType include only events of a particular target type, optional @param before include only events created before a particular date, optional @param after include only events created after a particular date, optional @param sortOrder sort events in ASC or DESC order by created_at. Default is DESC, optional @return a list of events for the specified project and matching the supplied parameters @throws GitLabApiException if any exception occurs
[ "Get", "a", "list", "of", "events", "for", "the", "specified", "project", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/EventsApi.java#L229-L232
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/EventsApi.java
EventsApi.getProjectEvents
public List<Event> getProjectEvents(Integer projectIdOrPath, ActionType action, TargetType targetType, Date before, Date after, SortOrder sortOrder, int page, int perPage) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("action", action) .withParam("target_type", targetType != null ? targetType.toValue().toLowerCase() : null) .withParam("before", before) .withParam("after", after) .withParam("sort", sortOrder) .withParam(PAGE_PARAM, page) .withParam(PER_PAGE_PARAM, perPage); Response response = get(Response.Status.OK, formData.asMap(), "projects", getProjectIdOrPath(projectIdOrPath), "events"); return (response.readEntity(new GenericType<List<Event>>() {})); }
java
public List<Event> getProjectEvents(Integer projectIdOrPath, ActionType action, TargetType targetType, Date before, Date after, SortOrder sortOrder, int page, int perPage) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("action", action) .withParam("target_type", targetType != null ? targetType.toValue().toLowerCase() : null) .withParam("before", before) .withParam("after", after) .withParam("sort", sortOrder) .withParam(PAGE_PARAM, page) .withParam(PER_PAGE_PARAM, perPage); Response response = get(Response.Status.OK, formData.asMap(), "projects", getProjectIdOrPath(projectIdOrPath), "events"); return (response.readEntity(new GenericType<List<Event>>() {})); }
[ "public", "List", "<", "Event", ">", "getProjectEvents", "(", "Integer", "projectIdOrPath", ",", "ActionType", "action", ",", "TargetType", "targetType", ",", "Date", "before", ",", "Date", "after", ",", "SortOrder", "sortOrder", ",", "int", "page", ",", "int"...
Get a list of events for the specified project and in the specified page range. <pre><code>GitLab Endpoint: GET /projects/:projectId/events</code></pre> @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @param action include only events of a particular action type, optional @param targetType include only events of a particular target type, optional @param before include only events created before a particular date, optional @param after include only events created after a particular date, optional @param sortOrder sort events in ASC or DESC order by created_at. Default is DESC, optional @param page the page to get @param perPage the number of projects per page @return a list of events for the specified project and matching the supplied parameters @throws GitLabApiException if any exception occurs
[ "Get", "a", "list", "of", "events", "for", "the", "specified", "project", "and", "in", "the", "specified", "page", "range", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/EventsApi.java#L250-L265
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/EventsApi.java
EventsApi.getProjectEventsStream
public Stream<Event> getProjectEventsStream(Object projectIdOrPath, ActionType action, TargetType targetType, Date before, Date after, SortOrder sortOrder) throws GitLabApiException { return (getProjectEvents(projectIdOrPath, action, targetType, before, after, sortOrder, getDefaultPerPage()).stream()); }
java
public Stream<Event> getProjectEventsStream(Object projectIdOrPath, ActionType action, TargetType targetType, Date before, Date after, SortOrder sortOrder) throws GitLabApiException { return (getProjectEvents(projectIdOrPath, action, targetType, before, after, sortOrder, getDefaultPerPage()).stream()); }
[ "public", "Stream", "<", "Event", ">", "getProjectEventsStream", "(", "Object", "projectIdOrPath", ",", "ActionType", "action", ",", "TargetType", "targetType", ",", "Date", "before", ",", "Date", "after", ",", "SortOrder", "sortOrder", ")", "throws", "GitLabApiEx...
Get a Stream of events for the specified project. <pre><code>GitLab Endpoint: GET /:projectId/events</code></pre> @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @param action include only events of a particular action type, optional @param targetType include only events of a particular target type, optional @param before include only events created before a particular date, optional @param after include only events created after a particular date, optional @param sortOrder sort events in ASC or DESC order by created_at. Default is DESC, optional @return a Stream of events for the specified project and matching the supplied parameters @throws GitLabApiException if any exception occurs
[ "Get", "a", "Stream", "of", "events", "for", "the", "specified", "project", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/EventsApi.java#L310-L313
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.getProjects
public Pager<Project> getProjects(int itemsPerPage) throws GitLabApiException { return (new Pager<Project>(this, Project.class, itemsPerPage, null, "projects")); }
java
public Pager<Project> getProjects(int itemsPerPage) throws GitLabApiException { return (new Pager<Project>(this, Project.class, itemsPerPage, null, "projects")); }
[ "public", "Pager", "<", "Project", ">", "getProjects", "(", "int", "itemsPerPage", ")", "throws", "GitLabApiException", "{", "return", "(", "new", "Pager", "<", "Project", ">", "(", "this", ",", "Project", ".", "class", ",", "itemsPerPage", ",", "null", ",...
Get a Pager instance of projects accessible by the authenticated user. <pre><code>GET /projects</code></pre> @param itemsPerPage the number of Project instances that will be fetched per page @return a Pager instance of projects accessible by the authenticated user @throws GitLabApiException if any exception occurs
[ "Get", "a", "Pager", "instance", "of", "projects", "accessible", "by", "the", "authenticated", "user", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L100-L102
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.getProjects
public Pager<Project> getProjects(Boolean archived, Visibility visibility, ProjectOrderBy orderBy, SortOrder sort, String search, Boolean simple, Boolean owned, Boolean membership, Boolean starred, Boolean statistics, int itemsPerPage) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("archived", archived) .withParam("visibility", visibility) .withParam("order_by", orderBy) .withParam("sort", sort) .withParam("search", search) .withParam("simple", simple) .withParam("owned", owned) .withParam("membership", membership) .withParam("starred", starred) .withParam("statistics", statistics); return (new Pager<Project>(this, Project.class, itemsPerPage, formData.asMap(), "projects")); }
java
public Pager<Project> getProjects(Boolean archived, Visibility visibility, ProjectOrderBy orderBy, SortOrder sort, String search, Boolean simple, Boolean owned, Boolean membership, Boolean starred, Boolean statistics, int itemsPerPage) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("archived", archived) .withParam("visibility", visibility) .withParam("order_by", orderBy) .withParam("sort", sort) .withParam("search", search) .withParam("simple", simple) .withParam("owned", owned) .withParam("membership", membership) .withParam("starred", starred) .withParam("statistics", statistics); return (new Pager<Project>(this, Project.class, itemsPerPage, formData.asMap(), "projects")); }
[ "public", "Pager", "<", "Project", ">", "getProjects", "(", "Boolean", "archived", ",", "Visibility", "visibility", ",", "ProjectOrderBy", "orderBy", ",", "SortOrder", "sort", ",", "String", "search", ",", "Boolean", "simple", ",", "Boolean", "owned", ",", "Bo...
Get a Pager of projects accessible by the authenticated user and matching the supplied filter parameters. All filter parameters are optional. <pre><code>GET /projects</code></pre> @param archived limit by archived status @param visibility limit by visibility public, internal, or private @param orderBy return projects ordered by ID, NAME, PATH, CREATED_AT, UPDATED_AT, or LAST_ACTIVITY_AT fields, default is CREATED_AT @param sort return projects sorted in asc or desc order. Default is desc @param search return list of projects matching the search criteria @param simple return only the ID, URL, name, and path of each project @param owned limit by projects owned by the current user @param membership limit by projects that the current user is a member of @param starred limit by projects starred by the current user @param statistics include project statistics @param itemsPerPage the number of Project instances that will be fetched per page @return a Pager of projects accessible by the authenticated user and matching the supplied parameters @throws GitLabApiException if any exception occurs
[ "Get", "a", "Pager", "of", "projects", "accessible", "by", "the", "authenticated", "user", "and", "matching", "the", "supplied", "filter", "parameters", ".", "All", "filter", "parameters", "are", "optional", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L241-L258
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.getProjects
public List<Project> getProjects(String search) throws GitLabApiException { return (getProjects(search, getDefaultPerPage()).all()); }
java
public List<Project> getProjects(String search) throws GitLabApiException { return (getProjects(search, getDefaultPerPage()).all()); }
[ "public", "List", "<", "Project", ">", "getProjects", "(", "String", "search", ")", "throws", "GitLabApiException", "{", "return", "(", "getProjects", "(", "search", ",", "getDefaultPerPage", "(", ")", ")", ".", "all", "(", ")", ")", ";", "}" ]
Get a list of projects accessible by the authenticated user that match the provided search string. <pre><code>GET /projects?search=search</code></pre> @param search the project name search criteria @return a list of projects accessible by the authenticated user that match the provided search string @throws GitLabApiException if any exception occurs
[ "Get", "a", "list", "of", "projects", "accessible", "by", "the", "authenticated", "user", "that", "match", "the", "provided", "search", "string", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L269-L271
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.getProjects
public Pager<Project> getProjects(String search, int itemsPerPage) throws GitLabApiException { Form formData = new GitLabApiForm().withParam("search", search); return (new Pager<Project>(this, Project.class, itemsPerPage, formData.asMap(), "projects")); }
java
public Pager<Project> getProjects(String search, int itemsPerPage) throws GitLabApiException { Form formData = new GitLabApiForm().withParam("search", search); return (new Pager<Project>(this, Project.class, itemsPerPage, formData.asMap(), "projects")); }
[ "public", "Pager", "<", "Project", ">", "getProjects", "(", "String", "search", ",", "int", "itemsPerPage", ")", "throws", "GitLabApiException", "{", "Form", "formData", "=", "new", "GitLabApiForm", "(", ")", ".", "withParam", "(", "\"search\"", ",", "search",...
Get a Pager of projects accessible by the authenticated user that match the provided search string. <pre><code>GET /projects?search=search</code></pre> @param search the project name search criteria @param itemsPerPage the number of Project instances that will be fetched per page @return a Pager of projects accessible by the authenticated user that match the provided search string @throws GitLabApiException if any exception occurs
[ "Get", "a", "Pager", "of", "projects", "accessible", "by", "the", "authenticated", "user", "that", "match", "the", "provided", "search", "string", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L300-L303
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.getProjectsStream
public Stream<Project> getProjectsStream(String search) throws GitLabApiException { return (getProjects(search, getDefaultPerPage()).stream()); }
java
public Stream<Project> getProjectsStream(String search) throws GitLabApiException { return (getProjects(search, getDefaultPerPage()).stream()); }
[ "public", "Stream", "<", "Project", ">", "getProjectsStream", "(", "String", "search", ")", "throws", "GitLabApiException", "{", "return", "(", "getProjects", "(", "search", ",", "getDefaultPerPage", "(", ")", ")", ".", "stream", "(", ")", ")", ";", "}" ]
Get a Stream of projects accessible by the authenticated user that match the provided search string. <pre><code>GET /projects?search=search</code></pre> @param search the project name search criteria @return a Stream of projects accessible by the authenticated user that match the provided search string @throws GitLabApiException if any exception occurs
[ "Get", "a", "Stream", "of", "projects", "accessible", "by", "the", "authenticated", "user", "that", "match", "the", "provided", "search", "string", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L314-L316
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.getMemberProjects
public Pager<Project> getMemberProjects(int itemsPerPage) throws GitLabApiException { Form formData = new GitLabApiForm().withParam("membership", true); return (new Pager<Project>(this, Project.class, itemsPerPage, formData.asMap(), "projects")); }
java
public Pager<Project> getMemberProjects(int itemsPerPage) throws GitLabApiException { Form formData = new GitLabApiForm().withParam("membership", true); return (new Pager<Project>(this, Project.class, itemsPerPage, formData.asMap(), "projects")); }
[ "public", "Pager", "<", "Project", ">", "getMemberProjects", "(", "int", "itemsPerPage", ")", "throws", "GitLabApiException", "{", "Form", "formData", "=", "new", "GitLabApiForm", "(", ")", ".", "withParam", "(", "\"membership\"", ",", "true", ")", ";", "retur...
Get a Pager of projects that the authenticated user is a member of. <pre><code>GET /projects?membership=true</code></pre> @param itemsPerPage the number of Project instances that will be fetched per page @return a Pager o Project instances that the authenticated user is a member of @throws GitLabApiException if any exception occurs
[ "Get", "a", "Pager", "of", "projects", "that", "the", "authenticated", "user", "is", "a", "member", "of", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L355-L358
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.getStarredProjects
public List<Project> getStarredProjects(int page, int perPage) throws GitLabApiException { Form formData = new GitLabApiForm().withParam("starred", true).withParam(PAGE_PARAM, page).withParam(PER_PAGE_PARAM, perPage); Response response = get(Response.Status.OK, formData.asMap(), "projects"); return (response.readEntity(new GenericType<List<Project>>() {})); }
java
public List<Project> getStarredProjects(int page, int perPage) throws GitLabApiException { Form formData = new GitLabApiForm().withParam("starred", true).withParam(PAGE_PARAM, page).withParam(PER_PAGE_PARAM, perPage); Response response = get(Response.Status.OK, formData.asMap(), "projects"); return (response.readEntity(new GenericType<List<Project>>() {})); }
[ "public", "List", "<", "Project", ">", "getStarredProjects", "(", "int", "page", ",", "int", "perPage", ")", "throws", "GitLabApiException", "{", "Form", "formData", "=", "new", "GitLabApiForm", "(", ")", ".", "withParam", "(", "\"starred\"", ",", "true", ")...
Get a list of projects starred by the authenticated user in the specified page range. <pre><code>GET /projects?starred=true</code></pre> @param page the page to get @param perPage the number of projects per page @return a list of projects starred by the authenticated user @throws GitLabApiException if any exception occurs
[ "Get", "a", "list", "of", "projects", "starred", "by", "the", "authenticated", "user", "in", "the", "specified", "page", "range", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L448-L452
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.getStarredProjects
public Pager<Project> getStarredProjects(int itemsPerPage) throws GitLabApiException { Form formData = new GitLabApiForm().withParam("starred", true).withParam(PER_PAGE_PARAM, getDefaultPerPage()); return (new Pager<Project>(this, Project.class, itemsPerPage, formData.asMap(), "projects")); }
java
public Pager<Project> getStarredProjects(int itemsPerPage) throws GitLabApiException { Form formData = new GitLabApiForm().withParam("starred", true).withParam(PER_PAGE_PARAM, getDefaultPerPage()); return (new Pager<Project>(this, Project.class, itemsPerPage, formData.asMap(), "projects")); }
[ "public", "Pager", "<", "Project", ">", "getStarredProjects", "(", "int", "itemsPerPage", ")", "throws", "GitLabApiException", "{", "Form", "formData", "=", "new", "GitLabApiForm", "(", ")", ".", "withParam", "(", "\"starred\"", ",", "true", ")", ".", "withPar...
Get a Pager of projects starred by the authenticated user. <pre><code>GET /projects?starred=true</code></pre> @param itemsPerPage the number of Project instances that will be fetched per page @return a Pager of projects starred by the authenticated user @throws GitLabApiException if any exception occurs
[ "Get", "a", "Pager", "of", "projects", "starred", "by", "the", "authenticated", "user", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L463-L466
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.getUserProjects
public List<Project> getUserProjects(Object userIdOrUsername, ProjectFilter filter) throws GitLabApiException { return (getUserProjects(userIdOrUsername, filter, getDefaultPerPage()).all()); }
java
public List<Project> getUserProjects(Object userIdOrUsername, ProjectFilter filter) throws GitLabApiException { return (getUserProjects(userIdOrUsername, filter, getDefaultPerPage()).all()); }
[ "public", "List", "<", "Project", ">", "getUserProjects", "(", "Object", "userIdOrUsername", ",", "ProjectFilter", "filter", ")", "throws", "GitLabApiException", "{", "return", "(", "getUserProjects", "(", "userIdOrUsername", ",", "filter", ",", "getDefaultPerPage", ...
Get a list of visible projects owned by the given user. <pre><code>GET /users/:user_id/projects</code></pre> @param userIdOrUsername the user ID, username of the user, or a User instance holding the user ID or username @param filter the ProjectFilter instance holding the filter values for the query @return a list of visible projects owned by the given use @throws GitLabApiException if any exception occurs
[ "Get", "a", "list", "of", "visible", "projects", "owned", "by", "the", "given", "user", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L490-L492
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.getUserProjects
public List<Project> getUserProjects(Object userIdOrUsername, ProjectFilter filter, int page, int perPage) throws GitLabApiException { GitLabApiForm formData = filter.getQueryParams(page, perPage); Response response = get(Response.Status.OK, formData.asMap(), "users", getUserIdOrUsername(userIdOrUsername), "projects"); return (response.readEntity(new GenericType<List<Project>>() {})); }
java
public List<Project> getUserProjects(Object userIdOrUsername, ProjectFilter filter, int page, int perPage) throws GitLabApiException { GitLabApiForm formData = filter.getQueryParams(page, perPage); Response response = get(Response.Status.OK, formData.asMap(), "users", getUserIdOrUsername(userIdOrUsername), "projects"); return (response.readEntity(new GenericType<List<Project>>() {})); }
[ "public", "List", "<", "Project", ">", "getUserProjects", "(", "Object", "userIdOrUsername", ",", "ProjectFilter", "filter", ",", "int", "page", ",", "int", "perPage", ")", "throws", "GitLabApiException", "{", "GitLabApiForm", "formData", "=", "filter", ".", "ge...
Get a list of visible projects owned by the given user in the specified page range. <pre><code>GET /users/:user_id/projects</code></pre> @param userIdOrUsername the user ID, username of the user, or a User instance holding the user ID or username @param filter the ProjectFilter instance holding the filter values for the query @param page the page to get @param perPage the number of projects per page @return a list of visible projects owned by the given use @throws GitLabApiException if any exception occurs
[ "Get", "a", "list", "of", "visible", "projects", "owned", "by", "the", "given", "user", "in", "the", "specified", "page", "range", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L506-L511
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.getUserProjects
public Pager<Project> getUserProjects(Object userIdOrUsername, ProjectFilter filter, int itemsPerPage) throws GitLabApiException { GitLabApiForm formData = filter.getQueryParams(); return (new Pager<Project>(this, Project.class, itemsPerPage, formData.asMap(), "users", getUserIdOrUsername(userIdOrUsername), "projects")); }
java
public Pager<Project> getUserProjects(Object userIdOrUsername, ProjectFilter filter, int itemsPerPage) throws GitLabApiException { GitLabApiForm formData = filter.getQueryParams(); return (new Pager<Project>(this, Project.class, itemsPerPage, formData.asMap(), "users", getUserIdOrUsername(userIdOrUsername), "projects")); }
[ "public", "Pager", "<", "Project", ">", "getUserProjects", "(", "Object", "userIdOrUsername", ",", "ProjectFilter", "filter", ",", "int", "itemsPerPage", ")", "throws", "GitLabApiException", "{", "GitLabApiForm", "formData", "=", "filter", ".", "getQueryParams", "("...
Get a Pager of visible projects owned by the given user. <pre><code>GET /users/:user_id/projects</code></pre> @param userIdOrUsername the user ID, username of the user, or a User instance holding the user ID or username @param filter the ProjectFilter instance holding the filter values for the query @param itemsPerPage the number of Project instances that will be fetched per page @return a Pager of visible projects owned by the given use @throws GitLabApiException if any exception occurs
[ "Get", "a", "Pager", "of", "visible", "projects", "owned", "by", "the", "given", "user", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L524-L528
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.getUserProjectsStream
public Stream<Project> getUserProjectsStream(Object userIdOrUsername, ProjectFilter filter) throws GitLabApiException { return (getUserProjects(userIdOrUsername, filter, getDefaultPerPage()).stream()); }
java
public Stream<Project> getUserProjectsStream(Object userIdOrUsername, ProjectFilter filter) throws GitLabApiException { return (getUserProjects(userIdOrUsername, filter, getDefaultPerPage()).stream()); }
[ "public", "Stream", "<", "Project", ">", "getUserProjectsStream", "(", "Object", "userIdOrUsername", ",", "ProjectFilter", "filter", ")", "throws", "GitLabApiException", "{", "return", "(", "getUserProjects", "(", "userIdOrUsername", ",", "filter", ",", "getDefaultPer...
Get a Stream of visible projects owned by the given user. <pre><code>GET /users/:user_id/projects</code></pre> @param userIdOrUsername the user ID, username of the user, or a User instance holding the user ID or username @param filter the ProjectFilter instance holding the filter values for the query @return a Stream of visible projects owned by the given use @throws GitLabApiException if any exception occurs
[ "Get", "a", "Stream", "of", "visible", "projects", "owned", "by", "the", "given", "user", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L540-L542
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.createProject
public Project createProject(Integer groupId, String projectName) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm().withParam("namespace_id", groupId).withParam("name", projectName, true); Response response = post(Response.Status.CREATED, formData, "projects"); return (response.readEntity(Project.class)); }
java
public Project createProject(Integer groupId, String projectName) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm().withParam("namespace_id", groupId).withParam("name", projectName, true); Response response = post(Response.Status.CREATED, formData, "projects"); return (response.readEntity(Project.class)); }
[ "public", "Project", "createProject", "(", "Integer", "groupId", ",", "String", "projectName", ")", "throws", "GitLabApiException", "{", "GitLabApiForm", "formData", "=", "new", "GitLabApiForm", "(", ")", ".", "withParam", "(", "\"namespace_id\"", ",", "groupId", ...
Create a new project in the specified group. @param groupId the group ID to create the project under @param projectName the name of the project top create @return the created project @throws GitLabApiException if any exception occurs
[ "Create", "a", "new", "project", "in", "the", "specified", "group", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L714-L718
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.forkProject
public Project forkProject(Object projectIdOrPath, String namespace) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm().withParam("namespace", namespace, true); Response.Status expectedStatus = (isApiVersion(ApiVersion.V3) ? Response.Status.OK : Response.Status.CREATED); Response response = post(expectedStatus, formData, "projects", getProjectIdOrPath(projectIdOrPath), "fork"); return (response.readEntity(Project.class)); }
java
public Project forkProject(Object projectIdOrPath, String namespace) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm().withParam("namespace", namespace, true); Response.Status expectedStatus = (isApiVersion(ApiVersion.V3) ? Response.Status.OK : Response.Status.CREATED); Response response = post(expectedStatus, formData, "projects", getProjectIdOrPath(projectIdOrPath), "fork"); return (response.readEntity(Project.class)); }
[ "public", "Project", "forkProject", "(", "Object", "projectIdOrPath", ",", "String", "namespace", ")", "throws", "GitLabApiException", "{", "GitLabApiForm", "formData", "=", "new", "GitLabApiForm", "(", ")", ".", "withParam", "(", "\"namespace\"", ",", "namespace", ...
Forks a project into the user namespace of the authenticated user or the one provided. The forking operation for a project is asynchronous and is completed in a background job. The request will return immediately. <pre><code>POST /projects/:id/fork</code></pre> @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @param namespace path of the namespace that the project will be forked to @return the newly forked Project instance @throws GitLabApiException if any exception occurs
[ "Forks", "a", "project", "into", "the", "user", "namespace", "of", "the", "authenticated", "user", "or", "the", "one", "provided", ".", "The", "forking", "operation", "for", "a", "project", "is", "asynchronous", "and", "is", "completed", "in", "a", "backgrou...
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L1104-L1109
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.getMembers
public List<Member> getMembers(Object projectIdOrPath) throws GitLabApiException { return (getMembers(projectIdOrPath, getDefaultPerPage()).all()); }
java
public List<Member> getMembers(Object projectIdOrPath) throws GitLabApiException { return (getMembers(projectIdOrPath, getDefaultPerPage()).all()); }
[ "public", "List", "<", "Member", ">", "getMembers", "(", "Object", "projectIdOrPath", ")", "throws", "GitLabApiException", "{", "return", "(", "getMembers", "(", "projectIdOrPath", ",", "getDefaultPerPage", "(", ")", ")", ".", "all", "(", ")", ")", ";", "}" ...
Get a list of project team members. <pre><code>GET /projects/:id/members</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @return the members belonging to the specified project @throws GitLabApiException if any exception occurs
[ "Get", "a", "list", "of", "project", "team", "members", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L1169-L1171
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.getMembers
public List<Member> getMembers(Object projectIdOrPath, int page, int perPage) throws GitLabApiException { Response response = get(Response.Status.OK, getPageQueryParams(page, perPage), "projects", getProjectIdOrPath(projectIdOrPath), "members"); return (response.readEntity(new GenericType<List<Member>>() {})); }
java
public List<Member> getMembers(Object projectIdOrPath, int page, int perPage) throws GitLabApiException { Response response = get(Response.Status.OK, getPageQueryParams(page, perPage), "projects", getProjectIdOrPath(projectIdOrPath), "members"); return (response.readEntity(new GenericType<List<Member>>() {})); }
[ "public", "List", "<", "Member", ">", "getMembers", "(", "Object", "projectIdOrPath", ",", "int", "page", ",", "int", "perPage", ")", "throws", "GitLabApiException", "{", "Response", "response", "=", "get", "(", "Response", ".", "Status", ".", "OK", ",", "...
Get a list of project team members in the specified page range. <pre><code>GET /projects/:id/members</code></pre> @param projectIdOrPath 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 Member instances per page @return the members belonging to the specified project @throws GitLabApiException if any exception occurs
[ "Get", "a", "list", "of", "project", "team", "members", "in", "the", "specified", "page", "range", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L1184-L1187
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.getMembers
public Pager<Member> getMembers(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException { return (new Pager<Member>(this, Member.class, itemsPerPage, null, "projects", getProjectIdOrPath(projectIdOrPath), "members")); }
java
public Pager<Member> getMembers(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException { return (new Pager<Member>(this, Member.class, itemsPerPage, null, "projects", getProjectIdOrPath(projectIdOrPath), "members")); }
[ "public", "Pager", "<", "Member", ">", "getMembers", "(", "Object", "projectIdOrPath", ",", "int", "itemsPerPage", ")", "throws", "GitLabApiException", "{", "return", "(", "new", "Pager", "<", "Member", ">", "(", "this", ",", "Member", ".", "class", ",", "...
Get a Pager of project team members. <pre><code>GET /projects/:id/members</code></pre> @param projectIdOrPath 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 the members belonging to the specified project @throws GitLabApiException if any exception occurs
[ "Get", "a", "Pager", "of", "project", "team", "members", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L1199-L1201
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.getMembersStream
public Stream<Member> getMembersStream(Object projectIdOrPath) throws GitLabApiException { return (getMembers(projectIdOrPath, getDefaultPerPage()).stream()); }
java
public Stream<Member> getMembersStream(Object projectIdOrPath) throws GitLabApiException { return (getMembers(projectIdOrPath, getDefaultPerPage()).stream()); }
[ "public", "Stream", "<", "Member", ">", "getMembersStream", "(", "Object", "projectIdOrPath", ")", "throws", "GitLabApiException", "{", "return", "(", "getMembers", "(", "projectIdOrPath", ",", "getDefaultPerPage", "(", ")", ")", ".", "stream", "(", ")", ")", ...
Get a Stream of project team members. <pre><code>GET /projects/:id/members</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @return a Stream of the members belonging to the specified project @throws GitLabApiException if any exception occurs
[ "Get", "a", "Stream", "of", "project", "team", "members", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L1212-L1214
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.addMember
public Member addMember(Object projectIdOrPath, Integer userId, Integer accessLevel) throws GitLabApiException { return (addMember(projectIdOrPath, userId, accessLevel, null)); }
java
public Member addMember(Object projectIdOrPath, Integer userId, Integer accessLevel) throws GitLabApiException { return (addMember(projectIdOrPath, userId, accessLevel, null)); }
[ "public", "Member", "addMember", "(", "Object", "projectIdOrPath", ",", "Integer", "userId", ",", "Integer", "accessLevel", ")", "throws", "GitLabApiException", "{", "return", "(", "addMember", "(", "projectIdOrPath", ",", "userId", ",", "accessLevel", ",", "null"...
Adds a user to a project team. This is an idempotent method and can be called multiple times with the same parameters. Adding team membership to a user that is already a member does not affect the existing membership. <pre><code>POST /projects/:id/members</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @param userId the user ID of the member to add, required @param accessLevel the access level for the new member, required @return the added member @throws GitLabApiException if any exception occurs
[ "Adds", "a", "user", "to", "a", "project", "team", ".", "This", "is", "an", "idempotent", "method", "and", "can", "be", "called", "multiple", "times", "with", "the", "same", "parameters", ".", "Adding", "team", "membership", "to", "a", "user", "that", "i...
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L1261-L1263
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.updateMember
public Member updateMember(Object projectIdOrPath, Integer userId, Integer accessLevel, Date expiresAt) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("access_level", accessLevel, true) .withParam("expires_at", expiresAt, false); Response response = put(Response.Status.OK, formData.asMap(), "projects", getProjectIdOrPath(projectIdOrPath), "members", userId); return (response.readEntity(Member.class)); }
java
public Member updateMember(Object projectIdOrPath, Integer userId, Integer accessLevel, Date expiresAt) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("access_level", accessLevel, true) .withParam("expires_at", expiresAt, false); Response response = put(Response.Status.OK, formData.asMap(), "projects", getProjectIdOrPath(projectIdOrPath), "members", userId); return (response.readEntity(Member.class)); }
[ "public", "Member", "updateMember", "(", "Object", "projectIdOrPath", ",", "Integer", "userId", ",", "Integer", "accessLevel", ",", "Date", "expiresAt", ")", "throws", "GitLabApiException", "{", "GitLabApiForm", "formData", "=", "new", "GitLabApiForm", "(", ")", "...
Updates a member of a project. <pre><code>PUT /projects/:projectId/members/:userId</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @param userId the user ID of the member to update, required @param accessLevel the new access level for the member, required @param expiresAt the date the membership in the group will expire, optional @return the updated member @throws GitLabApiException if any exception occurs
[ "Updates", "a", "member", "of", "a", "project", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L1381-L1387
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.removeMember
public void removeMember(Object projectIdOrPath, Integer userId) throws GitLabApiException { Response.Status expectedStatus = (isApiVersion(ApiVersion.V3) ? Response.Status.OK : Response.Status.NO_CONTENT); delete(expectedStatus, null, "projects", getProjectIdOrPath(projectIdOrPath), "members", userId); }
java
public void removeMember(Object projectIdOrPath, Integer userId) throws GitLabApiException { Response.Status expectedStatus = (isApiVersion(ApiVersion.V3) ? Response.Status.OK : Response.Status.NO_CONTENT); delete(expectedStatus, null, "projects", getProjectIdOrPath(projectIdOrPath), "members", userId); }
[ "public", "void", "removeMember", "(", "Object", "projectIdOrPath", ",", "Integer", "userId", ")", "throws", "GitLabApiException", "{", "Response", ".", "Status", "expectedStatus", "=", "(", "isApiVersion", "(", "ApiVersion", ".", "V3", ")", "?", "Response", "."...
Removes user from project team. <pre><code>DELETE /projects/:id/members/:user_id</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @param userId the user ID of the member to remove @throws GitLabApiException if any exception occurs
[ "Removes", "user", "from", "project", "team", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L1398-L1401
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.getProjectUsers
public List<ProjectUser> getProjectUsers(Object projectIdOrPath) throws GitLabApiException { return (getProjectUsers(projectIdOrPath, null, getDefaultPerPage()).all()); }
java
public List<ProjectUser> getProjectUsers(Object projectIdOrPath) throws GitLabApiException { return (getProjectUsers(projectIdOrPath, null, getDefaultPerPage()).all()); }
[ "public", "List", "<", "ProjectUser", ">", "getProjectUsers", "(", "Object", "projectIdOrPath", ")", "throws", "GitLabApiException", "{", "return", "(", "getProjectUsers", "(", "projectIdOrPath", ",", "null", ",", "getDefaultPerPage", "(", ")", ")", ".", "all", ...
Get a list of project users. This list includes all project members and all users assigned to project parent groups. <pre><code>GET /projects/:id/users</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @return the users belonging to the specified project and its parent groups @throws GitLabApiException if any exception occurs
[ "Get", "a", "list", "of", "project", "users", ".", "This", "list", "includes", "all", "project", "members", "and", "all", "users", "assigned", "to", "project", "parent", "groups", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L1412-L1414
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.getProjectUsers
public Pager<ProjectUser> getProjectUsers(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException { return (getProjectUsers(projectIdOrPath, null, itemsPerPage)); }
java
public Pager<ProjectUser> getProjectUsers(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException { return (getProjectUsers(projectIdOrPath, null, itemsPerPage)); }
[ "public", "Pager", "<", "ProjectUser", ">", "getProjectUsers", "(", "Object", "projectIdOrPath", ",", "int", "itemsPerPage", ")", "throws", "GitLabApiException", "{", "return", "(", "getProjectUsers", "(", "projectIdOrPath", ",", "null", ",", "itemsPerPage", ")", ...
Get a Pager of project users. This Pager includes all project members and all users assigned to project parent groups. <pre><code>GET /projects/:id/users</code></pre> @param projectIdOrPath 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 Pager of the users matching the search string and belonging to the specified project and its parent groups @throws GitLabApiException if any exception occurs
[ "Get", "a", "Pager", "of", "project", "users", ".", "This", "Pager", "includes", "all", "project", "members", "and", "all", "users", "assigned", "to", "project", "parent", "groups", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L1426-L1428
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.getProjectUsersStream
public Stream<ProjectUser> getProjectUsersStream(Object projectIdOrPath) throws GitLabApiException { return (getProjectUsers(projectIdOrPath, null, getDefaultPerPage()).stream()); }
java
public Stream<ProjectUser> getProjectUsersStream(Object projectIdOrPath) throws GitLabApiException { return (getProjectUsers(projectIdOrPath, null, getDefaultPerPage()).stream()); }
[ "public", "Stream", "<", "ProjectUser", ">", "getProjectUsersStream", "(", "Object", "projectIdOrPath", ")", "throws", "GitLabApiException", "{", "return", "(", "getProjectUsers", "(", "projectIdOrPath", ",", "null", ",", "getDefaultPerPage", "(", ")", ")", ".", "...
Get a Stream of project users. This Stream includes all project members and all users assigned to project parent groups. <pre><code>GET /projects/:id/users</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @return a Stream of the users belonging to the specified project and its parent groups @throws GitLabApiException if any exception occurs
[ "Get", "a", "Stream", "of", "project", "users", ".", "This", "Stream", "includes", "all", "project", "members", "and", "all", "users", "assigned", "to", "project", "parent", "groups", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L1439-L1441
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.getProjectUsers
public List<ProjectUser> getProjectUsers(Object projectIdOrPath, String search) throws GitLabApiException { return (getProjectUsers(projectIdOrPath, search, getDefaultPerPage()).all()); }
java
public List<ProjectUser> getProjectUsers(Object projectIdOrPath, String search) throws GitLabApiException { return (getProjectUsers(projectIdOrPath, search, getDefaultPerPage()).all()); }
[ "public", "List", "<", "ProjectUser", ">", "getProjectUsers", "(", "Object", "projectIdOrPath", ",", "String", "search", ")", "throws", "GitLabApiException", "{", "return", "(", "getProjectUsers", "(", "projectIdOrPath", ",", "search", ",", "getDefaultPerPage", "(",...
Get a list of project users matching the specified search string. This list includes all project members and all users assigned to project parent groups. <pre><code>GET /projects/:id/users</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @param search the string to match specific users @return the users matching the search string and belonging to the specified project and its parent groups @throws GitLabApiException if any exception occurs
[ "Get", "a", "list", "of", "project", "users", "matching", "the", "specified", "search", "string", ".", "This", "list", "includes", "all", "project", "members", "and", "all", "users", "assigned", "to", "project", "parent", "groups", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L1454-L1456
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.getProjectUsers
public Pager<ProjectUser> getProjectUsers(Object projectIdOrPath, String search, int itemsPerPage) throws GitLabApiException { MultivaluedMap<String, String> params = (search != null ? new GitLabApiForm().withParam("search", search).asMap() : null); return (new Pager<ProjectUser>(this, ProjectUser.class, itemsPerPage, params, "projects", getProjectIdOrPath(projectIdOrPath), "users")); }
java
public Pager<ProjectUser> getProjectUsers(Object projectIdOrPath, String search, int itemsPerPage) throws GitLabApiException { MultivaluedMap<String, String> params = (search != null ? new GitLabApiForm().withParam("search", search).asMap() : null); return (new Pager<ProjectUser>(this, ProjectUser.class, itemsPerPage, params, "projects", getProjectIdOrPath(projectIdOrPath), "users")); }
[ "public", "Pager", "<", "ProjectUser", ">", "getProjectUsers", "(", "Object", "projectIdOrPath", ",", "String", "search", ",", "int", "itemsPerPage", ")", "throws", "GitLabApiException", "{", "MultivaluedMap", "<", "String", ",", "String", ">", "params", "=", "(...
Get a Pager of project users matching the specified search string. This Pager includes all project members and all users assigned to project parent groups. <pre><code>GET /projects/:id/users</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance @param search the string to match specific users @param itemsPerPage the number of Project instances that will be fetched per page @return a Pager of the users matching the search string and belonging to the specified project and its parent groups @throws GitLabApiException if any exception occurs
[ "Get", "a", "Pager", "of", "project", "users", "matching", "the", "specified", "search", "string", ".", "This", "Pager", "includes", "all", "project", "members", "and", "all", "users", "assigned", "to", "project", "parent", "groups", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L1470-L1474
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.getProjectUsersStream
public Stream<ProjectUser> getProjectUsersStream(Object projectIdOrPath, String search) throws GitLabApiException { return (getProjectUsers(projectIdOrPath, search, getDefaultPerPage()).stream()); }
java
public Stream<ProjectUser> getProjectUsersStream(Object projectIdOrPath, String search) throws GitLabApiException { return (getProjectUsers(projectIdOrPath, search, getDefaultPerPage()).stream()); }
[ "public", "Stream", "<", "ProjectUser", ">", "getProjectUsersStream", "(", "Object", "projectIdOrPath", ",", "String", "search", ")", "throws", "GitLabApiException", "{", "return", "(", "getProjectUsers", "(", "projectIdOrPath", ",", "search", ",", "getDefaultPerPage"...
Get a Stream of project users matching the specified search string. This Stream includes all project members and all users assigned to project parent groups. <pre><code>GET /projects/:id/users</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @param search the string to match specific users @return a Stream of the users matching the search string and belonging to the specified project and its parent groups @throws GitLabApiException if any exception occurs
[ "Get", "a", "Stream", "of", "project", "users", "matching", "the", "specified", "search", "string", ".", "This", "Stream", "includes", "all", "project", "members", "and", "all", "users", "assigned", "to", "project", "parent", "groups", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L1487-L1489
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.getProjectEvents
public List<Event> getProjectEvents(Object projectIdOrPath) throws GitLabApiException { return (getProjectEvents(projectIdOrPath, getDefaultPerPage()).all()); }
java
public List<Event> getProjectEvents(Object projectIdOrPath) throws GitLabApiException { return (getProjectEvents(projectIdOrPath, getDefaultPerPage()).all()); }
[ "public", "List", "<", "Event", ">", "getProjectEvents", "(", "Object", "projectIdOrPath", ")", "throws", "GitLabApiException", "{", "return", "(", "getProjectEvents", "(", "projectIdOrPath", ",", "getDefaultPerPage", "(", ")", ")", ".", "all", "(", ")", ")", ...
Get the project events for specific project. Sorted from newest to latest. <pre><code>GET /projects/:id/events</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @return the project events for the specified project @throws GitLabApiException if any exception occurs
[ "Get", "the", "project", "events", "for", "specific", "project", ".", "Sorted", "from", "newest", "to", "latest", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L1500-L1502
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.getProjectEvents
public List<Event> getProjectEvents(Object projectIdOrPath, int page, int perPage) throws GitLabApiException { Response response = get(Response.Status.OK, getPageQueryParams(page, perPage), "projects", getProjectIdOrPath(projectIdOrPath), "events"); return (response.readEntity(new GenericType<List<Event>>() {})); }
java
public List<Event> getProjectEvents(Object projectIdOrPath, int page, int perPage) throws GitLabApiException { Response response = get(Response.Status.OK, getPageQueryParams(page, perPage), "projects", getProjectIdOrPath(projectIdOrPath), "events"); return (response.readEntity(new GenericType<List<Event>>() {})); }
[ "public", "List", "<", "Event", ">", "getProjectEvents", "(", "Object", "projectIdOrPath", ",", "int", "page", ",", "int", "perPage", ")", "throws", "GitLabApiException", "{", "Response", "response", "=", "get", "(", "Response", ".", "Status", ".", "OK", ","...
Get the project events for specific project. Sorted from newest to latest in the specified page range. <pre><code>GET /projects/:id/events</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @param page the page to get @param perPage the number of Event instances per page @return the project events for the specified project @throws GitLabApiException if any exception occurs
[ "Get", "the", "project", "events", "for", "specific", "project", ".", "Sorted", "from", "newest", "to", "latest", "in", "the", "specified", "page", "range", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L1515-L1518
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.getProjectEvents
public Pager<Event> getProjectEvents(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException { return (new Pager<Event>(this, Event.class, itemsPerPage, null, "projects", getProjectIdOrPath(projectIdOrPath), "events")); }
java
public Pager<Event> getProjectEvents(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException { return (new Pager<Event>(this, Event.class, itemsPerPage, null, "projects", getProjectIdOrPath(projectIdOrPath), "events")); }
[ "public", "Pager", "<", "Event", ">", "getProjectEvents", "(", "Object", "projectIdOrPath", ",", "int", "itemsPerPage", ")", "throws", "GitLabApiException", "{", "return", "(", "new", "Pager", "<", "Event", ">", "(", "this", ",", "Event", ".", "class", ",", ...
Get a Pager of project events for specific project. Sorted from newest to latest. <pre><code>GET /projects/:id/events</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @param itemsPerPage the number of Project instances that will be fetched per page @return a Pager of project events for the specified project @throws GitLabApiException if any exception occurs
[ "Get", "a", "Pager", "of", "project", "events", "for", "specific", "project", ".", "Sorted", "from", "newest", "to", "latest", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L1530-L1532
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.getProjectEventsStream
public Stream<Event> getProjectEventsStream(Object projectIdOrPath) throws GitLabApiException { return (getProjectEvents(projectIdOrPath, getDefaultPerPage()).stream()); }
java
public Stream<Event> getProjectEventsStream(Object projectIdOrPath) throws GitLabApiException { return (getProjectEvents(projectIdOrPath, getDefaultPerPage()).stream()); }
[ "public", "Stream", "<", "Event", ">", "getProjectEventsStream", "(", "Object", "projectIdOrPath", ")", "throws", "GitLabApiException", "{", "return", "(", "getProjectEvents", "(", "projectIdOrPath", ",", "getDefaultPerPage", "(", ")", ")", ".", "stream", "(", ")"...
Get a Stream of the project events for specific project. Sorted from newest to latest. <pre><code>GET /projects/:id/events</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @return a Stream of the project events for the specified project @throws GitLabApiException if any exception occurs
[ "Get", "a", "Stream", "of", "the", "project", "events", "for", "specific", "project", ".", "Sorted", "from", "newest", "to", "latest", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L1543-L1545
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.getHooks
public List<ProjectHook> getHooks(Object projectIdOrPath) throws GitLabApiException { return (getHooks(projectIdOrPath, getDefaultPerPage()).all()); }
java
public List<ProjectHook> getHooks(Object projectIdOrPath) throws GitLabApiException { return (getHooks(projectIdOrPath, getDefaultPerPage()).all()); }
[ "public", "List", "<", "ProjectHook", ">", "getHooks", "(", "Object", "projectIdOrPath", ")", "throws", "GitLabApiException", "{", "return", "(", "getHooks", "(", "projectIdOrPath", ",", "getDefaultPerPage", "(", ")", ")", ".", "all", "(", ")", ")", ";", "}"...
Get a list of the project hooks for the specified project. <pre><code>GET /projects/:id/hooks</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @return a list of project hooks for the specified project @throws GitLabApiException if any exception occurs
[ "Get", "a", "list", "of", "the", "project", "hooks", "for", "the", "specified", "project", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L1556-L1558
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.getHooks
public List<ProjectHook> getHooks(Object projectIdOrPath, int page, int perPage) throws GitLabApiException { Response response = get(Response.Status.OK, getPageQueryParams(page, perPage), "projects", getProjectIdOrPath(projectIdOrPath), "hooks"); return (response.readEntity(new GenericType<List<ProjectHook>>() {})); }
java
public List<ProjectHook> getHooks(Object projectIdOrPath, int page, int perPage) throws GitLabApiException { Response response = get(Response.Status.OK, getPageQueryParams(page, perPage), "projects", getProjectIdOrPath(projectIdOrPath), "hooks"); return (response.readEntity(new GenericType<List<ProjectHook>>() {})); }
[ "public", "List", "<", "ProjectHook", ">", "getHooks", "(", "Object", "projectIdOrPath", ",", "int", "page", ",", "int", "perPage", ")", "throws", "GitLabApiException", "{", "Response", "response", "=", "get", "(", "Response", ".", "Status", ".", "OK", ",", ...
Get list of project hooks in the specified page range. <pre><code>GET /projects/:id/hooks</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @param page the page to get @param perPage the number of ProjectHook instances per page @return a list of project hooks for the specified project in the specified page range @throws GitLabApiException if any exception occurs
[ "Get", "list", "of", "project", "hooks", "in", "the", "specified", "page", "range", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L1571-L1574
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.getHooks
public Pager<ProjectHook> getHooks(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException { return (new Pager<ProjectHook>(this, ProjectHook.class, itemsPerPage, null, "projects", getProjectIdOrPath(projectIdOrPath), "hooks")); }
java
public Pager<ProjectHook> getHooks(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException { return (new Pager<ProjectHook>(this, ProjectHook.class, itemsPerPage, null, "projects", getProjectIdOrPath(projectIdOrPath), "hooks")); }
[ "public", "Pager", "<", "ProjectHook", ">", "getHooks", "(", "Object", "projectIdOrPath", ",", "int", "itemsPerPage", ")", "throws", "GitLabApiException", "{", "return", "(", "new", "Pager", "<", "ProjectHook", ">", "(", "this", ",", "ProjectHook", ".", "class...
Get Pager of project hooks. <pre><code>GET /projects/:id/hooks</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @param itemsPerPage the number of Project instances that will be fetched per page @return a Pager of project hooks for the specified project @throws GitLabApiException if any exception occurs
[ "Get", "Pager", "of", "project", "hooks", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L1586-L1588
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.getHooksStream
public Stream<ProjectHook> getHooksStream(Object projectIdOrPath) throws GitLabApiException { return (getHooks(projectIdOrPath, getDefaultPerPage()).stream()); }
java
public Stream<ProjectHook> getHooksStream(Object projectIdOrPath) throws GitLabApiException { return (getHooks(projectIdOrPath, getDefaultPerPage()).stream()); }
[ "public", "Stream", "<", "ProjectHook", ">", "getHooksStream", "(", "Object", "projectIdOrPath", ")", "throws", "GitLabApiException", "{", "return", "(", "getHooks", "(", "projectIdOrPath", ",", "getDefaultPerPage", "(", ")", ")", ".", "stream", "(", ")", ")", ...
Get a Stream of the project hooks for the specified project. <pre><code>GET /projects/:id/hooks</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @return a Stream of project hooks for the specified project @throws GitLabApiException if any exception occurs
[ "Get", "a", "Stream", "of", "the", "project", "hooks", "for", "the", "specified", "project", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L1599-L1601
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.getHook
public ProjectHook getHook(Object projectIdOrPath, Integer hookId) throws GitLabApiException { Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "hooks", hookId); return (response.readEntity(ProjectHook.class)); }
java
public ProjectHook getHook(Object projectIdOrPath, Integer hookId) throws GitLabApiException { Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "hooks", hookId); return (response.readEntity(ProjectHook.class)); }
[ "public", "ProjectHook", "getHook", "(", "Object", "projectIdOrPath", ",", "Integer", "hookId", ")", "throws", "GitLabApiException", "{", "Response", "response", "=", "get", "(", "Response", ".", "Status", ".", "OK", ",", "null", ",", "\"projects\"", ",", "get...
Get a specific hook for project. <pre><code>GET /projects/:id/hooks/:hook_id</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @param hookId the ID of the hook to get @return the project hook for the specified project ID/hook ID pair @throws GitLabApiException if any exception occurs
[ "Get", "a", "specific", "hook", "for", "project", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L1613-L1616
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.getOptionalHook
public Optional<ProjectHook> getOptionalHook(Object projectIdOrPath, Integer hookId) { try { return (Optional.ofNullable(getHook(projectIdOrPath, hookId))); } catch (GitLabApiException glae) { return (GitLabApi.createOptionalFromException(glae)); } }
java
public Optional<ProjectHook> getOptionalHook(Object projectIdOrPath, Integer hookId) { try { return (Optional.ofNullable(getHook(projectIdOrPath, hookId))); } catch (GitLabApiException glae) { return (GitLabApi.createOptionalFromException(glae)); } }
[ "public", "Optional", "<", "ProjectHook", ">", "getOptionalHook", "(", "Object", "projectIdOrPath", ",", "Integer", "hookId", ")", "{", "try", "{", "return", "(", "Optional", ".", "ofNullable", "(", "getHook", "(", "projectIdOrPath", ",", "hookId", ")", ")", ...
Get a specific hook for project as an Optional instance. <pre><code>GET /projects/:id/hooks/:hook_id</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @param hookId the ID of the hook to get @return the project hook for the specified project ID/hook ID pair as an Optional instance
[ "Get", "a", "specific", "hook", "for", "project", "as", "an", "Optional", "instance", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L1627-L1633
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.deleteHook
public void deleteHook(Object projectIdOrPath, Integer hookId) throws GitLabApiException { Response.Status expectedStatus = (isApiVersion(ApiVersion.V3) ? Response.Status.OK : Response.Status.NO_CONTENT); delete(expectedStatus, null, "projects", getProjectIdOrPath(projectIdOrPath), "hooks", hookId); }
java
public void deleteHook(Object projectIdOrPath, Integer hookId) throws GitLabApiException { Response.Status expectedStatus = (isApiVersion(ApiVersion.V3) ? Response.Status.OK : Response.Status.NO_CONTENT); delete(expectedStatus, null, "projects", getProjectIdOrPath(projectIdOrPath), "hooks", hookId); }
[ "public", "void", "deleteHook", "(", "Object", "projectIdOrPath", ",", "Integer", "hookId", ")", "throws", "GitLabApiException", "{", "Response", ".", "Status", "expectedStatus", "=", "(", "isApiVersion", "(", "ApiVersion", ".", "V3", ")", "?", "Response", ".", ...
Deletes a hook from the project. <pre><code>DELETE /projects/:id/hooks/:hook_id</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @param hookId the project hook ID to delete @throws GitLabApiException if any exception occurs
[ "Deletes", "a", "hook", "from", "the", "project", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L1738-L1741
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.modifyHook
public ProjectHook modifyHook(ProjectHook hook) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("url", hook.getUrl(), true) .withParam("push_events", hook.getPushEvents(), false) .withParam("issues_events", hook.getIssuesEvents(), false) .withParam("merge_requests_events", hook.getMergeRequestsEvents(), false) .withParam("tag_push_events", hook.getTagPushEvents(), false) .withParam("note_events", hook.getNoteEvents(), false) .withParam("job_events", hook.getJobEvents(), false) .withParam("pipeline_events", hook.getPipelineEvents(), false) .withParam("wiki_events", hook.getWikiPageEvents(), false) .withParam("enable_ssl_verification", hook.getEnableSslVerification(), false) .withParam("token", hook.getToken(), false); Response response = put(Response.Status.OK, formData.asMap(), "projects", hook.getProjectId(), "hooks", hook.getId()); return (response.readEntity(ProjectHook.class)); }
java
public ProjectHook modifyHook(ProjectHook hook) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("url", hook.getUrl(), true) .withParam("push_events", hook.getPushEvents(), false) .withParam("issues_events", hook.getIssuesEvents(), false) .withParam("merge_requests_events", hook.getMergeRequestsEvents(), false) .withParam("tag_push_events", hook.getTagPushEvents(), false) .withParam("note_events", hook.getNoteEvents(), false) .withParam("job_events", hook.getJobEvents(), false) .withParam("pipeline_events", hook.getPipelineEvents(), false) .withParam("wiki_events", hook.getWikiPageEvents(), false) .withParam("enable_ssl_verification", hook.getEnableSslVerification(), false) .withParam("token", hook.getToken(), false); Response response = put(Response.Status.OK, formData.asMap(), "projects", hook.getProjectId(), "hooks", hook.getId()); return (response.readEntity(ProjectHook.class)); }
[ "public", "ProjectHook", "modifyHook", "(", "ProjectHook", "hook", ")", "throws", "GitLabApiException", "{", "GitLabApiForm", "formData", "=", "new", "GitLabApiForm", "(", ")", ".", "withParam", "(", "\"url\"", ",", "hook", ".", "getUrl", "(", ")", ",", "true"...
Modifies a hook for project. <pre><code>PUT /projects/:id/hooks/:hook_id</code></pre> @param hook the ProjectHook instance that contains the project hook info to modify @return the modified project hook @throws GitLabApiException if any exception occurs
[ "Modifies", "a", "hook", "for", "project", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L1764-L1781
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.getIssues
@Deprecated public List<Issue> getIssues(Object projectIdOrPath) throws GitLabApiException { return (getIssues(projectIdOrPath, getDefaultPerPage()).all()); }
java
@Deprecated public List<Issue> getIssues(Object projectIdOrPath) throws GitLabApiException { return (getIssues(projectIdOrPath, getDefaultPerPage()).all()); }
[ "@", "Deprecated", "public", "List", "<", "Issue", ">", "getIssues", "(", "Object", "projectIdOrPath", ")", "throws", "GitLabApiException", "{", "return", "(", "getIssues", "(", "projectIdOrPath", ",", "getDefaultPerPage", "(", ")", ")", ".", "all", "(", ")", ...
Get a list of the project's issues. <pre><code>GET /projects/:id/issues</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @return a list of project's issues @throws GitLabApiException if any exception occurs @deprecated Will be removed in version 5.0, replaced by {@link IssuesApi#getIssues(Object)}
[ "Get", "a", "list", "of", "the", "project", "s", "issues", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L1793-L1796
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.getIssuesStream
@Deprecated public Stream<Issue> getIssuesStream(Object projectIdOrPath) throws GitLabApiException { return (getIssues(projectIdOrPath, getDefaultPerPage()).stream()); }
java
@Deprecated public Stream<Issue> getIssuesStream(Object projectIdOrPath) throws GitLabApiException { return (getIssues(projectIdOrPath, getDefaultPerPage()).stream()); }
[ "@", "Deprecated", "public", "Stream", "<", "Issue", ">", "getIssuesStream", "(", "Object", "projectIdOrPath", ")", "throws", "GitLabApiException", "{", "return", "(", "getIssues", "(", "projectIdOrPath", ",", "getDefaultPerPage", "(", ")", ")", ".", "stream", "...
Get a Stream of the project's issues. <pre><code>GET /projects/:id/issues</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @return a Stream of the project's issues @throws GitLabApiException if any exception occurs @deprecated Will be removed in version 5.0, replaced by {@link IssuesApi#getIssues(Object)}
[ "Get", "a", "Stream", "of", "the", "project", "s", "issues", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L1842-L1845
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.deleteIssue
@Deprecated public void deleteIssue(Object projectIdOrPath, Integer issueId) throws GitLabApiException { Response.Status expectedStatus = (isApiVersion(ApiVersion.V3) ? Response.Status.OK : Response.Status.NO_CONTENT); delete(expectedStatus, getDefaultPerPageParam(), "projects", getProjectIdOrPath(projectIdOrPath), "issues", issueId); }
java
@Deprecated public void deleteIssue(Object projectIdOrPath, Integer issueId) throws GitLabApiException { Response.Status expectedStatus = (isApiVersion(ApiVersion.V3) ? Response.Status.OK : Response.Status.NO_CONTENT); delete(expectedStatus, getDefaultPerPageParam(), "projects", getProjectIdOrPath(projectIdOrPath), "issues", issueId); }
[ "@", "Deprecated", "public", "void", "deleteIssue", "(", "Object", "projectIdOrPath", ",", "Integer", "issueId", ")", "throws", "GitLabApiException", "{", "Response", ".", "Status", "expectedStatus", "=", "(", "isApiVersion", "(", "ApiVersion", ".", "V3", ")", "...
Delete a project issue. <pre><code>DELETE /projects/:id/issues/:issue_iid</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @param issueId the internal ID of a project's issue @throws GitLabApiException if any exception occurs @deprecated Will be removed in version 5.0, replaced by {@link IssuesApi#deleteIssue(Object, Integer)}
[ "Delete", "a", "project", "issue", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L1874-L1878
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.getSnippets
public List<Snippet> getSnippets(Object projectIdOrPath) throws GitLabApiException { return (getSnippets(projectIdOrPath, getDefaultPerPage()).all()); }
java
public List<Snippet> getSnippets(Object projectIdOrPath) throws GitLabApiException { return (getSnippets(projectIdOrPath, getDefaultPerPage()).all()); }
[ "public", "List", "<", "Snippet", ">", "getSnippets", "(", "Object", "projectIdOrPath", ")", "throws", "GitLabApiException", "{", "return", "(", "getSnippets", "(", "projectIdOrPath", ",", "getDefaultPerPage", "(", ")", ")", ".", "all", "(", ")", ")", ";", "...
Get a list of the project snippets. <pre><code>GET /projects/:id/snippets</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @return a list of the project's snippets @throws GitLabApiException if any exception occurs
[ "Get", "a", "list", "of", "the", "project", "snippets", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L1889-L1891
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.getSnippets
public List<Snippet> getSnippets(Object projectIdOrPath, int page, int perPage) throws GitLabApiException { Response response = get(Response.Status.OK, getPageQueryParams(page, perPage), "projects", getProjectIdOrPath(projectIdOrPath), "snippets"); return (response.readEntity(new GenericType<List<Snippet>>() {})); }
java
public List<Snippet> getSnippets(Object projectIdOrPath, int page, int perPage) throws GitLabApiException { Response response = get(Response.Status.OK, getPageQueryParams(page, perPage), "projects", getProjectIdOrPath(projectIdOrPath), "snippets"); return (response.readEntity(new GenericType<List<Snippet>>() {})); }
[ "public", "List", "<", "Snippet", ">", "getSnippets", "(", "Object", "projectIdOrPath", ",", "int", "page", ",", "int", "perPage", ")", "throws", "GitLabApiException", "{", "Response", "response", "=", "get", "(", "Response", ".", "Status", ".", "OK", ",", ...
Get a list of project snippets. <pre><code>GET /projects/:id/snippets</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @param page the page to get @param perPage the number of snippets per page @return a list of project's snippets for the specified range @throws GitLabApiException if any exception occurs
[ "Get", "a", "list", "of", "project", "snippets", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L1904-L1907
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.getSnippets
public Pager<Snippet> getSnippets(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException { return (new Pager<Snippet>(this, Snippet.class, itemsPerPage, null, "projects", getProjectIdOrPath(projectIdOrPath), "snippets")); }
java
public Pager<Snippet> getSnippets(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException { return (new Pager<Snippet>(this, Snippet.class, itemsPerPage, null, "projects", getProjectIdOrPath(projectIdOrPath), "snippets")); }
[ "public", "Pager", "<", "Snippet", ">", "getSnippets", "(", "Object", "projectIdOrPath", ",", "int", "itemsPerPage", ")", "throws", "GitLabApiException", "{", "return", "(", "new", "Pager", "<", "Snippet", ">", "(", "this", ",", "Snippet", ".", "class", ",",...
Get a Pager of project's snippets. <pre><code>GET /projects/:id/snippets</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @param itemsPerPage the number of snippets per page @return the Pager of snippets @throws GitLabApiException if any exception occurs
[ "Get", "a", "Pager", "of", "project", "s", "snippets", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L1919-L1921
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.getSnippetsStream
public Stream<Snippet> getSnippetsStream(Object projectIdOrPath) throws GitLabApiException { return (getSnippets(projectIdOrPath, getDefaultPerPage()).stream()); }
java
public Stream<Snippet> getSnippetsStream(Object projectIdOrPath) throws GitLabApiException { return (getSnippets(projectIdOrPath, getDefaultPerPage()).stream()); }
[ "public", "Stream", "<", "Snippet", ">", "getSnippetsStream", "(", "Object", "projectIdOrPath", ")", "throws", "GitLabApiException", "{", "return", "(", "getSnippets", "(", "projectIdOrPath", ",", "getDefaultPerPage", "(", ")", ")", ".", "stream", "(", ")", ")",...
Get a Stream of the project snippets. <pre><code>GET /projects/:id/snippets</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @return a Stream of the project's snippets @throws GitLabApiException if any exception occurs
[ "Get", "a", "Stream", "of", "the", "project", "snippets", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L1932-L1934
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.getSnippet
public Snippet getSnippet(Object projectIdOrPath, Integer snippetId) throws GitLabApiException { Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "snippets", snippetId); return (response.readEntity(Snippet.class)); }
java
public Snippet getSnippet(Object projectIdOrPath, Integer snippetId) throws GitLabApiException { Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "snippets", snippetId); return (response.readEntity(Snippet.class)); }
[ "public", "Snippet", "getSnippet", "(", "Object", "projectIdOrPath", ",", "Integer", "snippetId", ")", "throws", "GitLabApiException", "{", "Response", "response", "=", "get", "(", "Response", ".", "Status", ".", "OK", ",", "null", ",", "\"projects\"", ",", "g...
Get a single of project snippet. <pre><code>GET /projects/:id/snippets/:snippet_id</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @param snippetId the ID of the project's snippet @return the specified project Snippet @throws GitLabApiException if any exception occurs
[ "Get", "a", "single", "of", "project", "snippet", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L1946-L1949
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.getOptionalSnippet
public Optional<Snippet> getOptionalSnippet(Object projectIdOrPath, Integer snippetId) { try { return (Optional.ofNullable(getSnippet(projectIdOrPath, snippetId))); } catch (GitLabApiException glae) { return (GitLabApi.createOptionalFromException(glae)); } }
java
public Optional<Snippet> getOptionalSnippet(Object projectIdOrPath, Integer snippetId) { try { return (Optional.ofNullable(getSnippet(projectIdOrPath, snippetId))); } catch (GitLabApiException glae) { return (GitLabApi.createOptionalFromException(glae)); } }
[ "public", "Optional", "<", "Snippet", ">", "getOptionalSnippet", "(", "Object", "projectIdOrPath", ",", "Integer", "snippetId", ")", "{", "try", "{", "return", "(", "Optional", ".", "ofNullable", "(", "getSnippet", "(", "projectIdOrPath", ",", "snippetId", ")", ...
Get a single of project snippet as an Optional instance. <pre><code>GET /projects/:id/snippets/:snippet_id</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @param snippetId the ID of the project's snippet @return the specified project Snippet as an Optional instance
[ "Get", "a", "single", "of", "project", "snippet", "as", "an", "Optional", "instance", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L1960-L1966
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.createSnippet
public Snippet createSnippet(Object projectIdOrPath, String title, String filename, String description, String code, Visibility visibility) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("title", title, true) .withParam("file_name", filename, true) .withParam("description", description) .withParam("code", code, true) .withParam("visibility", visibility, true); Response response = post(Response.Status.CREATED, formData, "projects", getProjectIdOrPath(projectIdOrPath), "snippets"); return (response.readEntity(Snippet.class)); }
java
public Snippet createSnippet(Object projectIdOrPath, String title, String filename, String description, String code, Visibility visibility) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("title", title, true) .withParam("file_name", filename, true) .withParam("description", description) .withParam("code", code, true) .withParam("visibility", visibility, true); Response response = post(Response.Status.CREATED, formData, "projects", getProjectIdOrPath(projectIdOrPath), "snippets"); return (response.readEntity(Snippet.class)); }
[ "public", "Snippet", "createSnippet", "(", "Object", "projectIdOrPath", ",", "String", "title", ",", "String", "filename", ",", "String", "description", ",", "String", "code", ",", "Visibility", "visibility", ")", "throws", "GitLabApiException", "{", "GitLabApiForm"...
Creates a new project snippet. The user must have permission to create new snippets. <pre><code>POST /projects/:id/snippets</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @param title the title of a snippet, required @param filename the name of a snippet file, required @param description the description of a snippet, optional @param code the content of a snippet, required @param visibility the snippet's visibility, required @return a Snippet instance with info on the created snippet @throws GitLabApiException if any exception occurs
[ "Creates", "a", "new", "project", "snippet", ".", "The", "user", "must", "have", "permission", "to", "create", "new", "snippets", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L1982-L1994
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.updateSnippet
public Snippet updateSnippet(Object projectIdOrPath, Integer snippetId, String title, String filename, String description, String code, Visibility visibility) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("title", title) .withParam("file_name", filename) .withParam("description", description) .withParam("code", code) .withParam("visibility", visibility); Response response = put(Response.Status.OK, formData.asMap(), "projects", getProjectIdOrPath(projectIdOrPath), "snippets", snippetId); return (response.readEntity(Snippet.class)); }
java
public Snippet updateSnippet(Object projectIdOrPath, Integer snippetId, String title, String filename, String description, String code, Visibility visibility) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("title", title) .withParam("file_name", filename) .withParam("description", description) .withParam("code", code) .withParam("visibility", visibility); Response response = put(Response.Status.OK, formData.asMap(), "projects", getProjectIdOrPath(projectIdOrPath), "snippets", snippetId); return (response.readEntity(Snippet.class)); }
[ "public", "Snippet", "updateSnippet", "(", "Object", "projectIdOrPath", ",", "Integer", "snippetId", ",", "String", "title", ",", "String", "filename", ",", "String", "description", ",", "String", "code", ",", "Visibility", "visibility", ")", "throws", "GitLabApiE...
Updates an existing project snippet. The user must have permission to change an existing snippet. <pre><code>PUT /projects/:id/snippets/:snippet_id</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @param snippetId the ID of a project's snippet, required @param title the title of a snippet, optional @param filename the name of a snippet file, optional @param description the description of a snippet, optioptionalonal @param code the content of a snippet, optional @param visibility the snippet's visibility, reqoptionaluired @return a Snippet instance with info on the updated snippet @throws GitLabApiException if any exception occurs
[ "Updates", "an", "existing", "project", "snippet", ".", "The", "user", "must", "have", "permission", "to", "change", "an", "existing", "snippet", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L2011-L2023
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.getRawSnippetContent
public String getRawSnippetContent(Object projectIdOrPath, Integer snippetId) throws GitLabApiException { Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "snippets", snippetId, "raw"); return (response.readEntity(String.class)); }
java
public String getRawSnippetContent(Object projectIdOrPath, Integer snippetId) throws GitLabApiException { Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "snippets", snippetId, "raw"); return (response.readEntity(String.class)); }
[ "public", "String", "getRawSnippetContent", "(", "Object", "projectIdOrPath", ",", "Integer", "snippetId", ")", "throws", "GitLabApiException", "{", "Response", "response", "=", "get", "(", "Response", ".", "Status", ".", "OK", ",", "null", ",", "\"projects\"", ...
Get the raw project snippet as plain text. <pre><code>GET /projects/:id/snippets/:snippet_id/raw</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @param snippetId the ID of the project's snippet @return the raw project snippet plain text as an Optional instance @throws GitLabApiException if any exception occurs
[ "Get", "the", "raw", "project", "snippet", "as", "plain", "text", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L2049-L2052
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.getOptionalRawSnippetContent
public Optional<String> getOptionalRawSnippetContent(Object projectIdOrPath, Integer snippetId) { try { return (Optional.ofNullable(getRawSnippetContent(projectIdOrPath, snippetId))); } catch (GitLabApiException glae) { return (GitLabApi.createOptionalFromException(glae)); } }
java
public Optional<String> getOptionalRawSnippetContent(Object projectIdOrPath, Integer snippetId) { try { return (Optional.ofNullable(getRawSnippetContent(projectIdOrPath, snippetId))); } catch (GitLabApiException glae) { return (GitLabApi.createOptionalFromException(glae)); } }
[ "public", "Optional", "<", "String", ">", "getOptionalRawSnippetContent", "(", "Object", "projectIdOrPath", ",", "Integer", "snippetId", ")", "{", "try", "{", "return", "(", "Optional", ".", "ofNullable", "(", "getRawSnippetContent", "(", "projectIdOrPath", ",", "...
Get the raw project snippet plain text as an Optional instance. <pre><code>GET /projects/:id/snippets/:snippet_id/raw</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @param snippetId the ID of the project's snippet @return the raw project snippet plain text as an Optional instance
[ "Get", "the", "raw", "project", "snippet", "plain", "text", "as", "an", "Optional", "instance", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L2063-L2069
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.shareProject
public void shareProject(Object projectIdOrPath, Integer groupId, AccessLevel accessLevel, Date expiresAt) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("group_id", groupId, true) .withParam("group_access", accessLevel, true) .withParam("expires_at", expiresAt); post(Response.Status.CREATED, formData, "projects", getProjectIdOrPath(projectIdOrPath), "share"); }
java
public void shareProject(Object projectIdOrPath, Integer groupId, AccessLevel accessLevel, Date expiresAt) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("group_id", groupId, true) .withParam("group_access", accessLevel, true) .withParam("expires_at", expiresAt); post(Response.Status.CREATED, formData, "projects", getProjectIdOrPath(projectIdOrPath), "share"); }
[ "public", "void", "shareProject", "(", "Object", "projectIdOrPath", ",", "Integer", "groupId", ",", "AccessLevel", "accessLevel", ",", "Date", "expiresAt", ")", "throws", "GitLabApiException", "{", "GitLabApiForm", "formData", "=", "new", "GitLabApiForm", "(", ")", ...
Share a project with the specified group. <pre><code>POST /projects/:id/share</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @param groupId the ID of the group to share with, required @param accessLevel the permissions level to grant the group, required @param expiresAt the share expiration date, optional @throws GitLabApiException if any exception occurs
[ "Share", "a", "project", "with", "the", "specified", "group", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L2082-L2089
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.unshareProject
public void unshareProject(Object projectIdOrPath, Integer groupId) throws GitLabApiException { Response.Status expectedStatus = (isApiVersion(ApiVersion.V3) ? Response.Status.OK : Response.Status.NO_CONTENT); delete(expectedStatus, null, "projects", getProjectIdOrPath(projectIdOrPath), "share", groupId); }
java
public void unshareProject(Object projectIdOrPath, Integer groupId) throws GitLabApiException { Response.Status expectedStatus = (isApiVersion(ApiVersion.V3) ? Response.Status.OK : Response.Status.NO_CONTENT); delete(expectedStatus, null, "projects", getProjectIdOrPath(projectIdOrPath), "share", groupId); }
[ "public", "void", "unshareProject", "(", "Object", "projectIdOrPath", ",", "Integer", "groupId", ")", "throws", "GitLabApiException", "{", "Response", ".", "Status", "expectedStatus", "=", "(", "isApiVersion", "(", "ApiVersion", ".", "V3", ")", "?", "Response", ...
Unshare the project from the group. <pre><code>DELETE /projects/:id/share/:group_id</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @param groupId the ID of the group to unshare, required @throws GitLabApiException if any exception occurs
[ "Unshare", "the", "project", "from", "the", "group", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L2100-L2103
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.archiveProject
public Project archiveProject(Object projectIdOrPath) throws GitLabApiException { Response response = post(Response.Status.CREATED, (new GitLabApiForm()), "projects", getProjectIdOrPath(projectIdOrPath), "archive"); return (response.readEntity(Project.class)); }
java
public Project archiveProject(Object projectIdOrPath) throws GitLabApiException { Response response = post(Response.Status.CREATED, (new GitLabApiForm()), "projects", getProjectIdOrPath(projectIdOrPath), "archive"); return (response.readEntity(Project.class)); }
[ "public", "Project", "archiveProject", "(", "Object", "projectIdOrPath", ")", "throws", "GitLabApiException", "{", "Response", "response", "=", "post", "(", "Response", ".", "Status", ".", "CREATED", ",", "(", "new", "GitLabApiForm", "(", ")", ")", ",", "\"pro...
Archive a project <pre><code>POST /projects/:id/archive</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @return the archived GitLab Project @throws GitLabApiException if any exception occurs
[ "Archive", "a", "project" ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L2114-L2118
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.getPushRules
public PushRules getPushRules(Object projectIdOrPath) throws GitLabApiException { Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "push_rule"); return (response.readEntity(PushRules.class)); }
java
public PushRules getPushRules(Object projectIdOrPath) throws GitLabApiException { Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "push_rule"); return (response.readEntity(PushRules.class)); }
[ "public", "PushRules", "getPushRules", "(", "Object", "projectIdOrPath", ")", "throws", "GitLabApiException", "{", "Response", "response", "=", "get", "(", "Response", ".", "Status", ".", "OK", ",", "null", ",", "\"projects\"", ",", "getProjectIdOrPath", "(", "p...
Get the project's push rules. <pre><code>GET /projects/:id/push_rule</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @return the push rules for the specified project @throws GitLabApiException if any exception occurs
[ "Get", "the", "project", "s", "push", "rules", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L2174-L2177
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.createPushRules
public PushRules createPushRules(Object projectIdOrPath, PushRules pushRule) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("deny_delete_tag", pushRule.getDenyDeleteTag()) .withParam("member_check", pushRule.getMemberCheck()) .withParam("prevent_secrets", pushRule.getPreventSecrets()) .withParam("commit_message_regex", pushRule.getCommitMessageRegex()) .withParam("branch_name_regex", pushRule.getBranchNameRegex()) .withParam("author_email_regex", pushRule.getAuthorEmailRegex()) .withParam("file_name_regex", pushRule.getFileNameRegex()) .withParam("max_file_size", pushRule.getMaxFileSize()); Response response = post(Response.Status.CREATED, formData, "projects", getProjectIdOrPath(projectIdOrPath), "push_rule"); return (response.readEntity(PushRules.class)); }
java
public PushRules createPushRules(Object projectIdOrPath, PushRules pushRule) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("deny_delete_tag", pushRule.getDenyDeleteTag()) .withParam("member_check", pushRule.getMemberCheck()) .withParam("prevent_secrets", pushRule.getPreventSecrets()) .withParam("commit_message_regex", pushRule.getCommitMessageRegex()) .withParam("branch_name_regex", pushRule.getBranchNameRegex()) .withParam("author_email_regex", pushRule.getAuthorEmailRegex()) .withParam("file_name_regex", pushRule.getFileNameRegex()) .withParam("max_file_size", pushRule.getMaxFileSize()); Response response = post(Response.Status.CREATED, formData, "projects", getProjectIdOrPath(projectIdOrPath), "push_rule"); return (response.readEntity(PushRules.class)); }
[ "public", "PushRules", "createPushRules", "(", "Object", "projectIdOrPath", ",", "PushRules", "pushRule", ")", "throws", "GitLabApiException", "{", "GitLabApiForm", "formData", "=", "new", "GitLabApiForm", "(", ")", ".", "withParam", "(", "\"deny_delete_tag\"", ",", ...
Adds a push rule to a specified project. <pre><code>POST /projects/:id/push_rule</code></pre> The following properties on the PushRules instance are utilized in the creation of the push rule: <code> denyDeleteTag (optional) - Deny deleting a tag memberCheck (optional) - Restrict commits by author (email) to existing GitLab users preventSecrets (optional) - GitLab will reject any files that are likely to contain secrets commitMessageRegex (optional) - All commit messages must match this, e.g. Fixed \d+\..* branchNameRegex (optional) - All branch names must match this, e.g. `(feature authorEmailRegex (optional) - All commit author emails must match this, e.g. @my-company.com$ fileNameRegex (optional) - All committed filenames must not match this, e.g. `(jar maxFileSize (optional) - Maximum file size (MB </code> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @param pushRule the PushRule instance containing the push rule configuration to add @return a PushRules instance with the newly created push rule info @throws GitLabApiException if any exception occurs
[ "Adds", "a", "push", "rule", "to", "a", "specified", "project", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L2202-L2215
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.updatePushRules
public PushRules updatePushRules(Object projectIdOrPath, PushRules pushRule) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("deny_delete_tag", pushRule.getDenyDeleteTag()) .withParam("member_check", pushRule.getMemberCheck()) .withParam("prevent_secrets", pushRule.getPreventSecrets()) .withParam("commit_message_regex", pushRule.getCommitMessageRegex()) .withParam("branch_name_regex", pushRule.getBranchNameRegex()) .withParam("author_email_regex", pushRule.getAuthorEmailRegex()) .withParam("file_name_regex", pushRule.getFileNameRegex()) .withParam("max_file_size", pushRule.getMaxFileSize()); final Response response = putWithFormData(Response.Status.OK, formData, "projects", getProjectIdOrPath(projectIdOrPath), "push_rule"); return (response.readEntity(PushRules.class)); }
java
public PushRules updatePushRules(Object projectIdOrPath, PushRules pushRule) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm() .withParam("deny_delete_tag", pushRule.getDenyDeleteTag()) .withParam("member_check", pushRule.getMemberCheck()) .withParam("prevent_secrets", pushRule.getPreventSecrets()) .withParam("commit_message_regex", pushRule.getCommitMessageRegex()) .withParam("branch_name_regex", pushRule.getBranchNameRegex()) .withParam("author_email_regex", pushRule.getAuthorEmailRegex()) .withParam("file_name_regex", pushRule.getFileNameRegex()) .withParam("max_file_size", pushRule.getMaxFileSize()); final Response response = putWithFormData(Response.Status.OK, formData, "projects", getProjectIdOrPath(projectIdOrPath), "push_rule"); return (response.readEntity(PushRules.class)); }
[ "public", "PushRules", "updatePushRules", "(", "Object", "projectIdOrPath", ",", "PushRules", "pushRule", ")", "throws", "GitLabApiException", "{", "GitLabApiForm", "formData", "=", "new", "GitLabApiForm", "(", ")", ".", "withParam", "(", "\"deny_delete_tag\"", ",", ...
Updates a push rule for the specified project. <pre><code>PUT /projects/:id/push_rule/:push_rule_id</code></pre> The following properties on the PushRules instance are utilized when updating the push rule: <code> denyDeleteTag (optional) - Deny deleting a tag memberCheck (optional) - Restrict commits by author (email) to existing GitLab users preventSecrets (optional) - GitLab will reject any files that are likely to contain secrets commitMessageRegex (optional) - All commit messages must match this, e.g. Fixed \d+\..* branchNameRegex (optional) - All branch names must match this, e.g. `(feature authorEmailRegex (optional) - All commit author emails must match this, e.g. @my-company.com$ fileNameRegex (optional) - All committed filenames must not match this, e.g. `(jar maxFileSize (optional) - Maximum file size (MB </code> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @param pushRule the PushRules instance containing the push rule configuration to update @return a PushRules instance with the newly created push rule info @throws GitLabApiException if any exception occurs
[ "Updates", "a", "push", "rule", "for", "the", "specified", "project", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L2240-L2253
train
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.deletePushRules
public void deletePushRules(Object projectIdOrPath) throws GitLabApiException { delete(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "push_rule"); }
java
public void deletePushRules(Object projectIdOrPath) throws GitLabApiException { delete(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "push_rule"); }
[ "public", "void", "deletePushRules", "(", "Object", "projectIdOrPath", ")", "throws", "GitLabApiException", "{", "delete", "(", "Response", ".", "Status", ".", "OK", ",", "null", ",", "\"projects\"", ",", "getProjectIdOrPath", "(", "projectIdOrPath", ")", ",", "...
Removes a push rule from a project. This is an idempotent method and can be called multiple times. Either the push rule is available or not. <pre><code>DELETE /projects/:id/push_rule</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @throws GitLabApiException if any exception occurs
[ "Removes", "a", "push", "rule", "from", "a", "project", ".", "This", "is", "an", "idempotent", "method", "and", "can", "be", "called", "multiple", "times", ".", "Either", "the", "push", "rule", "is", "available", "or", "not", "." ]
ab045070abac0a8f4ccbf17b5ed9bfdef5723eed
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L2264-L2266
train