Created
May 24, 2016 11:50
-
-
Save LindaLawton/8681114fd3c247cdf2d46bdad1cc09f1 to your computer and use it in GitHub Desktop.
Example of using PageStreamer on Files.list with Google Drive v3
This file contains 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
var pageStreamer = new PageStreamer<Google.Apis.Drive.v3.Data.File, FilesResource.ListRequest, Google.Apis.Drive.v3.Data.FileList, string>( | |
(request, token) => request.PageToken = token, | |
response => response.NextPageToken, | |
response => response.Files); | |
var req = service.Files.List(); | |
req.PageSize = 1000; | |
foreach (var result in pageStreamer.Fetch(req)) | |
{ | |
Console.WriteLine(result.Id); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
as soon as I add the line
req.Fields = "files(id, name, parents, permissions, kind)";
then only 100 entries are returned??