@@ -499,16 +499,45 @@ public CompareResults compare(String projectPath, String from, String to) throws
499
499
Response response = get (Response .Status .OK , formData .asMap (), "projects" , projectPath , "repository" , "compare" );
500
500
return (response .readEntity (CompareResults .class ));
501
501
}
502
-
502
+
503
+ /**
504
+ * Get a list of contributors from a project.
505
+ *
506
+ * GET /projects/:id/repository/contributors
507
+ *
508
+ * @param projectId the project to get the list of contributors for
509
+ * @return a List containing the contributors for the specified project ID
510
+ * @throws GitLabApiException if any exception occurs
511
+ */
512
+ public List <Contributor > getContributors (Integer projectId ) throws GitLabApiException {
513
+ return (getContributors (projectId , 1 , getDefaultPerPage ()));
514
+ }
515
+
516
+ /**
517
+ * Get a list of contributors from a project and in the specified page range.
518
+ *
519
+ * GET /projects/:id/repository/contributors
520
+ *
521
+ * @param projectId the project to get the list of contributors for
522
+ * @param page the page to get
523
+ * @param perPage the number of projects per page
524
+ * @return a List containing the contributors for the specified project ID
525
+ * @throws GitLabApiException if any exception occurs
526
+ */
527
+ public List <Contributor > getContributors (Integer projectId , int page , int perPage ) throws GitLabApiException {
528
+ Response response = get (Response .Status .OK , getPageQueryParams (page , perPage ),
529
+ "projects" , projectId , "repository" , "contributors" );
530
+ return (response .readEntity (new GenericType <List <Contributor >>() { }));
531
+ }
532
+
503
533
/**
504
534
* Get a Pager of contributors from a project.
505
535
*
506
536
* GET /projects/:id/repository/contributors
507
537
*
508
538
* @param projectId the project to get the list of contributors for
509
539
* @param itemsPerPage the number of Project instances that will be fetched per page
510
- * @return the list of contributors for the specified project ID
511
- *
540
+ * @return a Pager containing the contributors for the specified project ID
512
541
* @throws GitLabApiException if any exception occurs
513
542
*/
514
543
public Pager <Contributor > getContributors (Integer projectId , int itemsPerPage ) throws GitLabApiException {
0 commit comments