Как получить все фотографии с Google Team Drive с помощью PHP?

Есть ли способ получить все фотографии с диска команды Google, используя PHP?

<?php
require_once '/vendor/autoload.php';

$client = new Google_Client();
$client->setApplicationName('Google Drive API PHP Quickstart');
$client->setScopes(Google_Service_Drive::DRIVE);
$client->setAuthConfig(__DIR__ . '/themejson.json');
//$client->setAccessType('offline');
$service = new Google_Service_Drive($client);

$folderId = 'xxxxxxxxxxxxx';
// Print the names and IDs for up to 10 files.
$optParams = array(
"q" => "'$folderId' in parents",
'pageSize' => 20,
'corpora' => "user,allTeamDrives",
'includeTeamDriveItems' => true,
'supportsTeamDrives' => true
);
$results = $service->files->listFiles($optParams);

if (count($results->getFiles()) == 0) {
print "No files found.\n";
} else {
print "Files:\n";
foreach ($results->getFiles() as $file) {
printf("%s (%s)\n", $file->getName(), $file->getId());
}
}
?>

1

Решение

Задача ещё не решена.

Другие решения

Других решений пока нет …

По вопросам рекламы ammmcru@yandex.ru
Adblock
detector