diff --git a/lib/Github/Api/Notification.php b/lib/Github/Api/Notification.php index 0d73d6076c7..e8c9b246a11 100644 --- a/lib/Github/Api/Notification.php +++ b/lib/Github/Api/Notification.php @@ -23,6 +23,7 @@ class Notification extends AbstractApi * @param bool $includingRead * @param bool $participating * @param DateTime|null $since + * @param DateTime|null $before * * @return array array of notifications */ diff --git a/lib/Github/Api/Organization.php b/lib/Github/Api/Organization.php index 29b71d1480e..32eba7d2d87 100644 --- a/lib/Github/Api/Organization.php +++ b/lib/Github/Api/Organization.php @@ -53,15 +53,27 @@ public function update($organization, array $params) * @param string $organization the user name * @param string $type the type of repositories * @param int $page the page + * @param string $sort sort by + * @param string $direction direction of sort, asc or desc * * @return array the repositories */ - public function repositories($organization, $type = 'all', $page = 1) + public function repositories($organization, $type = 'all', $page = 1, $sort = null, $direction = null) { - return $this->get('/orgs/'.rawurlencode($organization).'/repos', [ + $parameters = [ 'type' => $type, 'page' => $page, - ]); + ]; + + if ($sort !== null) { + $parameters['sort'] = $sort; + } + + if ($direction !== null) { + $parameters['direction'] = $direction; + } + + return $this->get('/orgs/'.rawurlencode($organization).'/repos', $parameters); } /**