Skip to content

Instantly share code, notes, and snippets.

@LindaLawton
Created May 24, 2016 11:50
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LindaLawton/8681114fd3c247cdf2d46bdad1cc09f1 to your computer and use it in GitHub Desktop.
Save LindaLawton/8681114fd3c247cdf2d46bdad1cc09f1 to your computer and use it in GitHub Desktop.
Example of using PageStreamer on Files.list with Google Drive v3
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);
}
@JohnHib
Copy link

JohnHib commented Mar 26, 2024

as soon as I add the line
req.Fields = "files(id, name, parents, permissions, kind)";

then only 100 entries are returned??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment