@@ -2054,13 +2054,42 @@ public void deletePushRules(Integer projectId) throws GitLabApiException {
2054
2054
2055
2055
delete (Response .Status .OK , null , "projects" , projectId , "push_rule" );
2056
2056
}
2057
-
2057
+
2058
2058
/**
2059
- * Get a Pager of projects that were forked from the specified project.
2059
+ * Get a list of projects that were forked from the specified project.
2060
2060
*
2061
2061
* GET /projects/:id/forks
2062
2062
*
2063
2063
* @param projectId the ID of the project
2064
+ * @return a List of forked projects
2065
+ * @throws GitLabApiException if any exception occurs
2066
+ */
2067
+ public List <Project > getForks (Integer projectId ) throws GitLabApiException {
2068
+ return (getForks (projectId , 1 , getDefaultPerPage ()));
2069
+ }
2070
+
2071
+ /**
2072
+ * Get a list of projects that were forked from the specified project and in the specified page range.
2073
+ *
2074
+ * GET /projects/:id/forks
2075
+ *
2076
+ * @param projectId the ID of the project
2077
+ * @param page the page to get
2078
+ * @param perPage the number of projects per page
2079
+ * @return a List of forked projects
2080
+ * @throws GitLabApiException if any exception occurs
2081
+ */
2082
+ public List <Project > getForks (Integer projectId , int page , int perPage ) throws GitLabApiException {
2083
+ Response response = get (Response .Status .OK , getPageQueryParams (page , perPage ),"projects" , projectId , "forks" );
2084
+ return (response .readEntity (new GenericType <List <Project >>() { }));
2085
+ }
2086
+
2087
+ /**
2088
+ * Get a Pager of projects that were forked from the specified project.
2089
+ *
2090
+ * GET /projects/:id/forks
2091
+ *
2092
+ * @param projectId the ID of the project
2064
2093
* @param itemsPerPage the number of Project instances that will be fetched per page
2065
2094
* @return a Pager of projects
2066
2095
* @throws GitLabApiException if any exception occurs
0 commit comments