11<?php namespace Gitlab \Api ;
22
3- use Gitlab \Exception \RuntimeException ;
4-
53class Projects extends AbstractApi
64{
75 const ORDER_BY = 'created_at ' ;
@@ -10,6 +8,8 @@ class Projects extends AbstractApi
108 /**
119 * @param int $page
1210 * @param int $per_page
11+ * @param string $order_by
12+ * @param string $sort
1313 * @return mixed
1414 */
1515 public function all ($ page = 1 , $ per_page = self ::PER_PAGE , $ order_by = self ::ORDER_BY , $ sort = self ::SORT )
@@ -25,6 +25,8 @@ public function all($page = 1, $per_page = self::PER_PAGE, $order_by = self::ORD
2525 /**
2626 * @param int $page
2727 * @param int $per_page
28+ * @param string $order_by
29+ * @param string $sort
2830 * @return mixed
2931 */
3032 public function accessible ($ page = 1 , $ per_page = self ::PER_PAGE , $ order_by = self ::ORDER_BY , $ sort = self ::SORT )
@@ -40,6 +42,8 @@ public function accessible($page = 1, $per_page = self::PER_PAGE, $order_by = se
4042 /**
4143 * @param int $page
4244 * @param int $per_page
45+ * @param string $order_by
46+ * @param string $sort
4347 * @return mixed
4448 */
4549 public function owned ($ page = 1 , $ per_page = self ::PER_PAGE , $ order_by = self ::ORDER_BY , $ sort = self ::SORT )
@@ -56,6 +60,8 @@ public function owned($page = 1, $per_page = self::PER_PAGE, $order_by = self::O
5660 * @param string $query
5761 * @param int $page
5862 * @param int $per_page
63+ * @param string $order_by
64+ * @param string $sort
5965 * @return mixed
6066 */
6167 public function search ($ query , $ page = 1 , $ per_page = self ::PER_PAGE , $ order_by = self ::ORDER_BY , $ sort = self ::SORT )
@@ -287,11 +293,16 @@ public function removeKey($project_id, $key_id)
287293
288294 /**
289295 * @param int $project_id
296+ * @param int $page
297+ * @param int $per_page
290298 * @return mixed
291299 */
292- public function events ($ project_id )
300+ public function events ($ project_id, $ page = 1 , $ per_page = self :: PER_PAGE )
293301 {
294- return $ this ->get ($ this ->getProjectPath ($ project_id , 'events ' ));
302+ return $ this ->get ($ this ->getProjectPath ($ project_id , 'events ' ), array (
303+ 'page ' => $ page ,
304+ 'per_page ' => $ per_page
305+ ));
295306 }
296307
297308 /**
0 commit comments