Skip to content

Commit

Permalink
Add per_page and page parameters to Member->all()
Browse files Browse the repository at this point in the history
This allows developers to actually get all() members.
  • Loading branch information
nickpoulos committed Jun 7, 2024
1 parent 71fec50 commit 65579d2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/Github/Api/Organization/Members.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/
class Members extends AbstractApi
{
public function all($organization, $type = null, $filter = 'all', $role = null)
public function all($organization, $type = null, $filter = 'all', $role = null, $per_page = 30, $page = 1)
{
$parameters = [];
$path = '/orgs/'.rawurlencode($organization).'/';
Expand All @@ -23,6 +23,12 @@ public function all($organization, $type = null, $filter = 'all', $role = null)
if (null !== $role) {
$parameters['role'] = $role;
}
if (null !== $per_page) {
$parameters['per_page'] = $per_page;
}
if (null !== $page) {
$parameters['page'] = $page;
}
} else {
$path .= 'public_members';
}
Expand Down

0 comments on commit 65579d2

Please sign in to comment.