From 300e9518ddcfc3480632b374469dea4690946961 Mon Sep 17 00:00:00 2001 From: kekefreedog <70959083+kekefreedog@users.noreply.github.com> Date: Thu, 18 Aug 2022 11:26:58 +0200 Subject: [PATCH] Change pageToken by nextPageToken Parameter `pageToken` return `null` : if we want get next response page, we have to get parameter `nextPageToken` --- drive/snippets/drive_v3/src/DriveSearchFiles.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drive/snippets/drive_v3/src/DriveSearchFiles.php b/drive/snippets/drive_v3/src/DriveSearchFiles.php index ebbbd76..51ebe0d 100644 --- a/drive/snippets/drive_v3/src/DriveSearchFiles.php +++ b/drive/snippets/drive_v3/src/DriveSearchFiles.php @@ -38,7 +38,7 @@ function searchFiles() } array_push($files, $response->files); - $pageToken = $response->pageToken; + $pageToken = $response->nextPageToken; } while ($pageToken != null); return $files; } catch(Exception $e) { @@ -47,4 +47,4 @@ function searchFiles() } // [END drive_search_files] require_once 'vendor/autoload.php'; -searchFiles(); \ No newline at end of file +searchFiles();