diff --git a/src/GitLabApiClient/GroupsClient.cs b/src/GitLabApiClient/GroupsClient.cs index 11708bbf..656d945c 100644 --- a/src/GitLabApiClient/GroupsClient.cs +++ b/src/GitLabApiClient/GroupsClient.cs @@ -59,6 +59,14 @@ public async Task GetAsync(GroupId groupId) => public async Task> GetSubgroupsAsync(GroupId groupId) => await _httpFacade.GetPagedList($"groups/{groupId}/subgroups"); + /// + /// Get a list of visible descendant groups of this group. + /// This endpoint can be accessed without authentication if the group is publicly accessible. + /// + /// The ID, path or of the group. + public async Task> GetDescendantGroupsAsync(GroupId groupId) => + await _httpFacade.GetPagedList($"groups/{groupId}/descendant_groups"); + /// /// Get all groups that match your string in their name or path. /// diff --git a/src/GitLabApiClient/IGroupsClient.cs b/src/GitLabApiClient/IGroupsClient.cs index f25490fa..2c2a25f7 100644 --- a/src/GitLabApiClient/IGroupsClient.cs +++ b/src/GitLabApiClient/IGroupsClient.cs @@ -28,6 +28,13 @@ public interface IGroupsClient /// The ID, path or of the group. Task> GetSubgroupsAsync(GroupId groupId); + /// + /// Get a list of visible descendant groups of this group. + /// This endpoint can be accessed without authentication if the group is publicly accessible. + /// + /// The ID, path or of the group. + Task> GetDescendantGroupsAsync(GroupId groupId); + /// /// Get all groups that match your string in their name or path. ///