From ad593198b0f2a95fcd1fd8daf289b7fb0d4f6af2 Mon Sep 17 00:00:00 2001 From: Jonathan Martz Date: Thu, 14 Nov 2024 15:50:04 +0000 Subject: [PATCH] fix getFullList batch bug --- src/Collection.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Collection.php b/src/Collection.php index 6eefc95..d535638 100644 --- a/src/Collection.php +++ b/src/Collection.php @@ -91,12 +91,14 @@ class Collection * @param array $queryParams * @return array */ - public function getFullList(int $batch = 200, array $queryParams = []): array + public function getFullList(array $queryParams, int $batch = 200): array { - $queryParams = [... $queryParams, ['perPage' => $batch]]; + $queryParams = [... $queryParams, 'perPage'=> $batch]; $getParams = !empty($queryParams) ? http_build_query($queryParams) : ""; $response = $this->doRequest($this->url . "/api/collections/" . $this->collection . "/records?" . $getParams, 'GET'); + var_dump($response); + return json_decode($response, JSON_FORCE_OBJECT); }