@@ -350,6 +350,50 @@ public Stream<Group> getSubGroupsStream(Object groupIdOrPath, List<Integer> skip
350
350
return (getSubGroups (groupIdOrPath , skipGroups , allAvailable , search , orderBy , sortOrder , statistics , owned , getDefaultPerPage ()).stream ());
351
351
}
352
352
353
+ /**
354
+ * Get a list of visible descendant groups of a given group for the authenticated user using the provided filter.
355
+ *
356
+ * <pre><code>GitLab Endpoint: GET /groups/:id/descendant_groups</code></pre>
357
+ *
358
+ * @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path, required
359
+ * @param filter the GroupFilter to match against
360
+ * @return a List<Group> of the matching groups
361
+ * @throws GitLabApiException if any exception occurs
362
+ */
363
+ public List <Group > getDescendantGroups (Object groupIdOrPath , GroupFilter filter ) throws GitLabApiException {
364
+ return (getDescendantGroups (groupIdOrPath , filter , getDefaultPerPage ()).all ());
365
+ }
366
+
367
+ /**
368
+ * Get a Pager of visible descendant groups of a given group for the authenticated user using the provided filter.
369
+ *
370
+ * <pre><code>GitLab Endpoint: GET /groups/:id/descendant_groups</code></pre>
371
+ *
372
+ * @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path, required
373
+ * @param filter the GroupFilter to match against
374
+ * @param itemsPerPage the number of Group instances that will be fetched per page
375
+ * @return a Pager containing matching Group instances
376
+ * @throws GitLabApiException if any exception occurs
377
+ */
378
+ public Pager <Group > getDescendantGroups (Object groupIdOrPath , GroupFilter filter , int itemsPerPage ) throws GitLabApiException {
379
+ GitLabApiForm formData = filter .getQueryParams ();
380
+ return (new Pager <Group >(this , Group .class , itemsPerPage , formData .asMap (), "groups" , getGroupIdOrPath (groupIdOrPath ), "descendant_groups" ));
381
+ }
382
+
383
+ /**
384
+ * Get a Stream of visible descendant groups of a given group for the authenticated user using the provided filter.
385
+ *
386
+ * <pre><code>GitLab Endpoint: GET /groups/:id/descendant_groups</code></pre>
387
+ *
388
+ * @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path, required
389
+ * @param filter the GroupFilter to match against
390
+ * @return a Stream<Group> of the matching groups
391
+ * @throws GitLabApiException if any exception occurs
392
+ */
393
+ public Stream <Group > getDescendantGroupsStream (Object groupIdOrPath , GroupFilter filter ) throws GitLabApiException {
394
+ return (getDescendantGroups (groupIdOrPath , filter , getDefaultPerPage ()).stream ());
395
+ }
396
+
353
397
/**
354
398
* Get a list of projects belonging to the specified group ID and filter.
355
399
*
0 commit comments