Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/Github/Api/Notification.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
18 changes: 15 additions & 3 deletions lib/Github/Api/Organization.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down