Created
September 6, 2015 18:21
-
-
Save hiddenpearls/e8c0e53d93a9db9bd3f5 to your computer and use it in GitHub Desktop.
Google Drive APIs with PHP - List all files and folders
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function listAllFiles($driveService){ | |
$parameters = array( | |
'maxResults' => '100' | |
); | |
$results = $driveService->files->listFiles($parameters); | |
echo '<table>'; | |
foreach($results->getItems() as $file){ | |
echo '<tr><td><img src="'. $file->iconLink .'"/> ' . $file->title . '</td></tr>'; | |
} | |
echo '</table>'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment