From 65579d2ab358e7a829060534c67e03048b51a9cc Mon Sep 17 00:00:00 2001 From: Nick Poulos Date: Fri, 7 Jun 2024 01:00:01 -0400 Subject: [PATCH] Add per_page and page parameters to Member->all() This allows developers to actually get all() members. --- lib/Github/Api/Organization/Members.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/Github/Api/Organization/Members.php b/lib/Github/Api/Organization/Members.php index 023e3f8d545..4a47eb6f597 100644 --- a/lib/Github/Api/Organization/Members.php +++ b/lib/Github/Api/Organization/Members.php @@ -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).'/'; @@ -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'; }