From 453a1ab259c479460409a0e193dba680aca24d13 Mon Sep 17 00:00:00 2001 From: ysemko <73164669+ysemko@users.noreply.github.com> Date: Thu, 2 Oct 2025 09:04:16 +0000 Subject: [PATCH 1/6] feat: added methods for Endpoint "/groups/:id/groups/shared" --- .../main/java/org/gitlab4j/api/GroupApi.java | 84 ++++++++++++ .../api/models/SharedGroupsFilter.java | 121 ++++++++++++++++++ 2 files changed, 205 insertions(+) create mode 100644 gitlab4j-models/src/main/java/org/gitlab4j/api/models/SharedGroupsFilter.java diff --git a/gitlab4j-api/src/main/java/org/gitlab4j/api/GroupApi.java b/gitlab4j-api/src/main/java/org/gitlab4j/api/GroupApi.java index a4635415c..2fd8dd1cd 100644 --- a/gitlab4j-api/src/main/java/org/gitlab4j/api/GroupApi.java +++ b/gitlab4j-api/src/main/java/org/gitlab4j/api/GroupApi.java @@ -34,6 +34,7 @@ import org.gitlab4j.api.models.Member; import org.gitlab4j.api.models.Project; import org.gitlab4j.api.models.SamlGroupLink; +import org.gitlab4j.api.models.SharedGroupsFilter; import org.gitlab4j.api.models.UploadedFile; import org.gitlab4j.api.models.Variable; import org.gitlab4j.api.models.Visibility; @@ -595,6 +596,89 @@ public Stream getProjectsStream(Object groupIdOrPath) throws GitLabApiE return (getProjects(groupIdOrPath, getDefaultPerPage()).stream()); } + /** + * Get a list of groups where the given group has been invited. + * When accessed without authentication, only public shared groups are returned. + * + *
GitLab Endpoint: GET /groups/:id/groups/shared
+ * + * @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path + * @param filter the GroupProjectsFilter instance holding the filter values for the query + * @return a Stream containing the Group instances that belong to the group and match the provided filter + * @throws GitLabApiException if any exception occurs + */ + public Stream getSharedGroupsStream(Object groupIdOrPath, SharedGroupsFilter filter) + throws GitLabApiException { + return (getSharedGroups(groupIdOrPath, filter, getDefaultPerPage()).stream()); + } + + /** + * Get a list of groups where the given group has been invited. + * When accessed without authentication, only public shared groups are returned. + * + *
GitLab Endpoint: GET /groups/:id/groups/shared
+ * + * @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path + * @return a list of groups where the specified group ID has been invited + * @throws GitLabApiException if any exception occurs + */ + public List getSharedGroups(Object groupIdOrPath) throws GitLabApiException { + return (getSharedGroups(groupIdOrPath, getDefaultPerPage()).all()); + } + + /** + * Get a list of groups in the specified page range where the given group has been invited. + * When accessed without authentication, only public shared groups are returned. + * + *
GitLab Endpoint: GET /groups/:id/groups/shared
+ * + * @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path + * @param page the page to get + * @param perPage the number of Group instances per page + * @return a list of groups where the specified group ID has been invited in the specified page range + * @throws GitLabApiException if any exception occurs + */ + public List getSharedGroups(Object groupIdOrPath, int page, int perPage) throws GitLabApiException { + Response response = get( + Response.Status.OK, + getPageQueryParams(page, perPage), + "groups", + getGroupIdOrPath(groupIdOrPath), + "groups", + "shared"); + return (response.readEntity(new GenericType>() {})); + } + + /** + * Get a list of groups where the given group has been invited. + * When accessed without authentication, only public shared groups are returned. + * + *
GitLab Endpoint: GET /groups/:id/groups/shared
+ * + * @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path + * @param itemsPerPage the number of Group instances that will be fetched per page + * @return a Pager of groups where the specified group ID has been invited + * @throws GitLabApiException if any exception occurs + */ + public Pager getSharedGroups(Object groupIdOrPath, int itemsPerPage) throws GitLabApiException { + return (new Pager( + this, Project.class, itemsPerPage, null, "groups", getGroupIdOrPath(groupIdOrPath), "groups", "shared")); + } + + /** + * Get a Stream of groups where the given group has been invited. + * When accessed without authentication, only public shared groups are returned. + * + *
GitLab Endpoint: GET /groups/:id/groups/shared
+ * + * @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path + * @return a Stream of groups where the specified group ID has been invited + * @throws GitLabApiException if any exception occurs + */ + public Stream getSharedGroupsStream(Object groupIdOrPath) throws GitLabApiException { + return (getSharedGroups(groupIdOrPath, getDefaultPerPage()).stream()); + } + /** * Get all details of a group. * diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/SharedGroupsFilter.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/SharedGroupsFilter.java new file mode 100644 index 000000000..8d7513326 --- /dev/null +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/SharedGroupsFilter.java @@ -0,0 +1,121 @@ +package org.gitlab4j.api.models; + +import java.io.Serializable; + +import org.gitlab4j.models.Constants.ProjectOrderBy; +import org.gitlab4j.models.Constants.SortOrder; +import org.gitlab4j.models.GitLabForm; +import org.gitlab4j.models.utils.JacksonJson; + +/** + * This class is used to filter Groups when getting lists of groups for a specified group where it has been invited. + */ +public class SharedGroupsFilter implements Serializable { + private static final long serialVersionUID = 1L; + + private List skipGroups; + private String search; + private GroupOrderBy orderBy; + private SortOrder sort; + private Visibility visibility; + private AccessLevel minAccessLevel; + private Boolean withCustomAttributes; + + /** + * Do not include the provided groups IDs. + * + * @param skipGroups List of group IDs to not include in the search + * @return the reference to this SharedGroupsFilter instance + */ + public GroupFilter withSkipGroups(List skipGroups) { + this.skipGroups = skipGroups; + return (this); + } + + /** + * Return list of groups matching the search criteria. + * + * @param search the search criteria + * @return the reference to this SharedGroupsFilter instance + */ + public SharedGroupsFilter withSearch(String search) { + this.search = search; + return (this); + } + + /** + * Return groups ordered by name, path, id, or similarity. Default is name. + * + * @param orderBy specifies what field to order by + * @return the reference to this SharedGroupsFilter instance + */ + public SharedGroupsFilter withOrderBy(ProjectOrderBy orderBy) { + this.orderBy = orderBy; + return (this); + } + + /** + * Return groups sorted in asc or desc order. Default is desc. + * + * @param sort sort direction, ASC or DESC + * @return the reference to this SharedGroupsFilter instance + */ + public SharedGroupsFilter withSortOder(SortOrder sort) { + this.sort = sort; + return (this); + } + + /** + * Limit by visibility public, internal, or private. + * + * @param visibility the visibility to match + * @return the reference to this SharedGroupsFilter instance + */ + public SharedGroupsFilter withVisibility(Visibility visibility) { + this.visibility = visibility; + return (this); + } + + /** + * Limit to groups where current user has at least the specified role (access_level). + * + * @param minAccessLevel the minimum access level to match + * @return the reference to this SharedGroupsFilter instance + */ + public SharedGroupsFilter withMinAccessLevel(Boolean minAccessLevel) { + this.minAccessLevel = minAccessLevel; + return (this); + } + + /** + * Include custom attributes in response (admins only). + * + * @param withCustomAttributes if true, include custom attributes in the repsonse + * @return the reference to this SharedGroupsFilter instance + */ + public SharedGroupsFilter withCustomAttributes(Boolean withCustomAttributes) { + this.withCustomAttributes = withCustomAttributes; + return (this); + } + + /** + * Get the query params specified by this filter. + * + * @return a GitLabApiForm instance holding the query parameters for this SharedGroupsFilter instance + */ + public GitLabForm getQueryParams() { + return (new GitLabForm() + .withParam("skip_groups", skipGroups) + .withParam("search", search) + .withParam("order_by", orderBy) + .withParam("sort", sort) + .withParam("visibility", visibility) + .withParam("simple", minAccessLevel) + .withParam("with_custom_attributes", withCustomAttributes)); + } + + @Override + public String toString() { + return (JacksonJson.toJsonString(this)); + } +} From c4c57771951e9bda7e80a5b82144883d0dbdf614 Mon Sep 17 00:00:00 2001 From: ysemko <73164669+ysemko@users.noreply.github.com> Date: Thu, 2 Oct 2025 09:15:08 +0000 Subject: [PATCH 2/6] fix: linitmh errors --- .../java/org/gitlab4j/api/models/SharedGroupsFilter.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/SharedGroupsFilter.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/SharedGroupsFilter.java index 8d7513326..b28466c3f 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/SharedGroupsFilter.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/SharedGroupsFilter.java @@ -1,8 +1,9 @@ package org.gitlab4j.api.models; import java.io.Serializable; +import java.util.List; -import org.gitlab4j.models.Constants.ProjectOrderBy; +import org.gitlab4j.models.Constants.GroupOrderBy; import org.gitlab4j.models.Constants.SortOrder; import org.gitlab4j.models.GitLabForm; import org.gitlab4j.models.utils.JacksonJson; @@ -27,7 +28,7 @@ public class SharedGroupsFilter implements Serializable { * @param skipGroups List of group IDs to not include in the search * @return the reference to this SharedGroupsFilter instance */ - public GroupFilter withSkipGroups(List skipGroups) { + public SharedGroupsFilter withSkipGroups(List skipGroups) { this.skipGroups = skipGroups; return (this); } @@ -82,7 +83,7 @@ public SharedGroupsFilter withVisibility(Visibility visibility) { * @param minAccessLevel the minimum access level to match * @return the reference to this SharedGroupsFilter instance */ - public SharedGroupsFilter withMinAccessLevel(Boolean minAccessLevel) { + public SharedGroupsFilter withMinAccessLevel(AccessLevel minAccessLevel) { this.minAccessLevel = minAccessLevel; return (this); } From ed101a7be241f02ea147d233dbfa5fc09972b6da Mon Sep 17 00:00:00 2001 From: fdi Date: Thu, 2 Oct 2025 17:12:55 +0200 Subject: [PATCH 3/6] fix: added missing Methods --- .../main/java/org/gitlab4j/api/GroupApi.java | 53 ++++++++++++++++--- 1 file changed, 46 insertions(+), 7 deletions(-) diff --git a/gitlab4j-api/src/main/java/org/gitlab4j/api/GroupApi.java b/gitlab4j-api/src/main/java/org/gitlab4j/api/GroupApi.java index 2fd8dd1cd..cfef9e8cd 100644 --- a/gitlab4j-api/src/main/java/org/gitlab4j/api/GroupApi.java +++ b/gitlab4j-api/src/main/java/org/gitlab4j/api/GroupApi.java @@ -9,12 +9,6 @@ import java.util.Optional; import java.util.stream.Stream; -import jakarta.ws.rs.core.Form; -import jakarta.ws.rs.core.GenericType; -import jakarta.ws.rs.core.MediaType; -import jakarta.ws.rs.core.MultivaluedMap; -import jakarta.ws.rs.core.Response; - import org.gitlab4j.api.models.AccessLevel; import org.gitlab4j.api.models.AccessRequest; import org.gitlab4j.api.models.AuditEvent; @@ -40,6 +34,12 @@ import org.gitlab4j.api.models.Visibility; import org.gitlab4j.models.utils.ISO8601; +import jakarta.ws.rs.core.Form; +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.MultivaluedMap; +import jakarta.ws.rs.core.Response; + /** * This class implements the client side API for the GitLab groups calls. * @see Groups API at GitLab @@ -596,6 +596,45 @@ public Stream getProjectsStream(Object groupIdOrPath) throws GitLabApiE return (getProjects(groupIdOrPath, getDefaultPerPage()).stream()); } + /** + * Get a list of projects belonging to the specified group ID and filter. + * + *
GitLab Endpoint: GET /groups/:id/projects
+ * + * @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path + * @param filter the GroupProjectsFilter instance holding the filter values for the query + * @return a List containing Project instances that belong to the group and match the provided filter + * @throws GitLabApiException if any exception occurs + */ + public List getSharedGroups(Object groupIdOrPath, SharedGroupsFilter filter) throws GitLabApiException { + return (getSharedGroups(groupIdOrPath, filter, getDefaultPerPage()).all()); + } + + /** + * Get a Pager of projects belonging to the specified group ID and filter. + * + *
GitLab Endpoint: GET /groups/:id/projects
+ * + * @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path + * @param filter the GroupProjectsFilter instance holding the filter values for the query + * @param itemsPerPage the number of Project instances that will be fetched per page + * @return a Pager containing Project instances that belong to the group and match the provided filter + * @throws GitLabApiException if any exception occurs + */ + public Pager getSharedGroups(Object groupIdOrPath, SharedGroupsFilter filter, int itemsPerPage) + throws GitLabApiException { + GitLabApiForm formData = new GitLabApiForm(filter.getQueryParams()); + return (new Pager( + this, + Group.class, + itemsPerPage, + formData.asMap(), + "groups", + getGroupIdOrPath(groupIdOrPath), + "groups", + "shared")); + } + /** * Get a list of groups where the given group has been invited. * When accessed without authentication, only public shared groups are returned. @@ -662,7 +701,7 @@ public List getSharedGroups(Object groupIdOrPath, int page, int perPage) */ public Pager getSharedGroups(Object groupIdOrPath, int itemsPerPage) throws GitLabApiException { return (new Pager( - this, Project.class, itemsPerPage, null, "groups", getGroupIdOrPath(groupIdOrPath), "groups", "shared")); + this, Group.class, itemsPerPage, null, "groups", getGroupIdOrPath(groupIdOrPath), "groups", "shared")); } /** From abc862eb7c5bbb8a76acd0a52243764170c97c93 Mon Sep 17 00:00:00 2001 From: fdi Date: Thu, 2 Oct 2025 17:16:49 +0200 Subject: [PATCH 4/6] fix: wrong object --- .../main/java/org/gitlab4j/api/models/SharedGroupsFilter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/SharedGroupsFilter.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/SharedGroupsFilter.java index b28466c3f..8fc062bb5 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/SharedGroupsFilter.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/SharedGroupsFilter.java @@ -50,7 +50,7 @@ public SharedGroupsFilter withSearch(String search) { * @param orderBy specifies what field to order by * @return the reference to this SharedGroupsFilter instance */ - public SharedGroupsFilter withOrderBy(ProjectOrderBy orderBy) { + public SharedGroupsFilter withOrderBy(GroupOrderBy orderBy) { this.orderBy = orderBy; return (this); } From f8f81bb7bf9a2f739ba62d4457554ae6b7e16871 Mon Sep 17 00:00:00 2001 From: ysemko <73164669+ysemko@users.noreply.github.com> Date: Thu, 2 Oct 2025 15:36:54 +0000 Subject: [PATCH 5/6] fix: linting --- .../main/java/org/gitlab4j/api/GroupApi.java | 84 +++++++++---------- .../api/models/SharedGroupsFilter.java | 2 +- 2 files changed, 43 insertions(+), 43 deletions(-) diff --git a/gitlab4j-api/src/main/java/org/gitlab4j/api/GroupApi.java b/gitlab4j-api/src/main/java/org/gitlab4j/api/GroupApi.java index cfef9e8cd..5c836d4b1 100644 --- a/gitlab4j-api/src/main/java/org/gitlab4j/api/GroupApi.java +++ b/gitlab4j-api/src/main/java/org/gitlab4j/api/GroupApi.java @@ -9,6 +9,12 @@ import java.util.Optional; import java.util.stream.Stream; +import jakarta.ws.rs.core.Form; +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.MultivaluedMap; +import jakarta.ws.rs.core.Response; + import org.gitlab4j.api.models.AccessLevel; import org.gitlab4j.api.models.AccessRequest; import org.gitlab4j.api.models.AuditEvent; @@ -34,12 +40,6 @@ import org.gitlab4j.api.models.Visibility; import org.gitlab4j.models.utils.ISO8601; -import jakarta.ws.rs.core.Form; -import jakarta.ws.rs.core.GenericType; -import jakarta.ws.rs.core.MediaType; -import jakarta.ws.rs.core.MultivaluedMap; -import jakarta.ws.rs.core.Response; - /** * This class implements the client side API for the GitLab groups calls. * @see Groups API at GitLab @@ -609,35 +609,35 @@ public Stream getProjectsStream(Object groupIdOrPath) throws GitLabApiE public List getSharedGroups(Object groupIdOrPath, SharedGroupsFilter filter) throws GitLabApiException { return (getSharedGroups(groupIdOrPath, filter, getDefaultPerPage()).all()); } - + /** * Get a Pager of projects belonging to the specified group ID and filter. - * - *
GitLab Endpoint: GET /groups/:id/projects
- * - * @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path - * @param filter the GroupProjectsFilter instance holding the filter values for the query - * @param itemsPerPage the number of Project instances that will be fetched per page - * @return a Pager containing Project instances that belong to the group and match the provided filter - * @throws GitLabApiException if any exception occurs - */ - public Pager getSharedGroups(Object groupIdOrPath, SharedGroupsFilter filter, int itemsPerPage) - throws GitLabApiException { - GitLabApiForm formData = new GitLabApiForm(filter.getQueryParams()); - return (new Pager( - this, - Group.class, - itemsPerPage, - formData.asMap(), - "groups", - getGroupIdOrPath(groupIdOrPath), - "groups", - "shared")); - } - - /** - * Get a list of groups where the given group has been invited. - * When accessed without authentication, only public shared groups are returned. + * + *
GitLab Endpoint: GET /groups/:id/projects
+ * + * @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path + * @param filter the GroupProjectsFilter instance holding the filter values for the query + * @param itemsPerPage the number of Project instances that will be fetched per page + * @return a Pager containing Project instances that belong to the group and match the provided filter + * @throws GitLabApiException if any exception occurs + */ + public Pager getSharedGroups(Object groupIdOrPath, SharedGroupsFilter filter, int itemsPerPage) + throws GitLabApiException { + GitLabApiForm formData = new GitLabApiForm(filter.getQueryParams()); + return (new Pager( + this, + Group.class, + itemsPerPage, + formData.asMap(), + "groups", + getGroupIdOrPath(groupIdOrPath), + "groups", + "shared")); + } + + /** + * Get a list of groups where the given group has been invited. + * When accessed without authentication, only public shared groups are returned. * *
GitLab Endpoint: GET /groups/:id/groups/shared
* @@ -652,8 +652,8 @@ public Stream getSharedGroupsStream(Object groupIdOrPath, SharedGroupsFil } /** - * Get a list of groups where the given group has been invited. - * When accessed without authentication, only public shared groups are returned. + * Get a list of groups where the given group has been invited. + * When accessed without authentication, only public shared groups are returned. * *
GitLab Endpoint: GET /groups/:id/groups/shared
* @@ -666,8 +666,8 @@ public List getSharedGroups(Object groupIdOrPath) throws GitLabApiExcepti } /** - * Get a list of groups in the specified page range where the given group has been invited. - * When accessed without authentication, only public shared groups are returned. + * Get a list of groups in the specified page range where the given group has been invited. + * When accessed without authentication, only public shared groups are returned. * *
GitLab Endpoint: GET /groups/:id/groups/shared
* @@ -684,13 +684,13 @@ public List getSharedGroups(Object groupIdOrPath, int page, int perPage) "groups", getGroupIdOrPath(groupIdOrPath), "groups", - "shared"); + "shared"); return (response.readEntity(new GenericType>() {})); } /** - * Get a list of groups where the given group has been invited. - * When accessed without authentication, only public shared groups are returned. + * Get a list of groups where the given group has been invited. + * When accessed without authentication, only public shared groups are returned. * *
GitLab Endpoint: GET /groups/:id/groups/shared
* @@ -705,8 +705,8 @@ public Pager getSharedGroups(Object groupIdOrPath, int itemsPerPage) thro } /** - * Get a Stream of groups where the given group has been invited. - * When accessed without authentication, only public shared groups are returned. + * Get a Stream of groups where the given group has been invited. + * When accessed without authentication, only public shared groups are returned. * *
GitLab Endpoint: GET /groups/:id/groups/shared
* diff --git a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/SharedGroupsFilter.java b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/SharedGroupsFilter.java index 8fc062bb5..63cdea44c 100644 --- a/gitlab4j-models/src/main/java/org/gitlab4j/api/models/SharedGroupsFilter.java +++ b/gitlab4j-models/src/main/java/org/gitlab4j/api/models/SharedGroupsFilter.java @@ -14,7 +14,7 @@ public class SharedGroupsFilter implements Serializable { private static final long serialVersionUID = 1L; - private List skipGroups; + private List skipGroups; private String search; private GroupOrderBy orderBy; private SortOrder sort; From e7d0fc10b64a150c9c1e39b6dd11d9f84d7bbc6a Mon Sep 17 00:00:00 2001 From: ysemko <73164669+ysemko@users.noreply.github.com> Date: Wed, 8 Oct 2025 07:40:58 +0000 Subject: [PATCH 6/6] fix: fixed wrong JavaDoc --- .../main/java/org/gitlab4j/api/GroupApi.java | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/gitlab4j-api/src/main/java/org/gitlab4j/api/GroupApi.java b/gitlab4j-api/src/main/java/org/gitlab4j/api/GroupApi.java index 5c836d4b1..755d88a41 100644 --- a/gitlab4j-api/src/main/java/org/gitlab4j/api/GroupApi.java +++ b/gitlab4j-api/src/main/java/org/gitlab4j/api/GroupApi.java @@ -597,13 +597,14 @@ public Stream getProjectsStream(Object groupIdOrPath) throws GitLabApiE } /** - * Get a list of projects belonging to the specified group ID and filter. + * Get a list of groups where the given group has been invited. + * When accessed without authentication, only public shared groups are returned. * - *
GitLab Endpoint: GET /groups/:id/projects
+ *
GitLab Endpoint: GET /groups/:id/groups/shared
* * @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path - * @param filter the GroupProjectsFilter instance holding the filter values for the query - * @return a List containing Project instances that belong to the group and match the provided filter + * @param filter the SharedGroupsFilter instance holding the filter values for the query + * @return a List containing the Group instances the given group has been invited to and match the provided filter * @throws GitLabApiException if any exception occurs */ public List getSharedGroups(Object groupIdOrPath, SharedGroupsFilter filter) throws GitLabApiException { @@ -611,14 +612,15 @@ public List getSharedGroups(Object groupIdOrPath, SharedGroupsFilter filt } /** - * Get a Pager of projects belonging to the specified group ID and filter. + * Get a Pager of groups where the given group has been invited. + * When accessed without authentication, only public shared groups are returned. * - *
GitLab Endpoint: GET /groups/:id/projects
+ *
GitLab Endpoint: GET /groups/:id/groups/shared
* * @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path - * @param filter the GroupProjectsFilter instance holding the filter values for the query - * @param itemsPerPage the number of Project instances that will be fetched per page - * @return a Pager containing Project instances that belong to the group and match the provided filter + * @param filter the SharedGroupsFilter instance holding the filter values for the query + * @param itemsPerPage the number of Group instances that will be fetched per page + * @return a Pager containing the Group instances the given group has been invited to and match the provided filter * @throws GitLabApiException if any exception occurs */ public Pager getSharedGroups(Object groupIdOrPath, SharedGroupsFilter filter, int itemsPerPage) @@ -636,14 +638,14 @@ public Pager getSharedGroups(Object groupIdOrPath, SharedGroupsFilter fil } /** - * Get a list of groups where the given group has been invited. + * Get a Stream of groups where the given group has been invited. * When accessed without authentication, only public shared groups are returned. * *
GitLab Endpoint: GET /groups/:id/groups/shared
* * @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path - * @param filter the GroupProjectsFilter instance holding the filter values for the query - * @return a Stream containing the Group instances that belong to the group and match the provided filter + * @param filter the SharedGroupsFilter instance holding the filter values for the query + * @return a Stream containing the Group instances the given group has been invited to and match the provided filter * @throws GitLabApiException if any exception occurs */ public Stream getSharedGroupsStream(Object groupIdOrPath, SharedGroupsFilter filter)