Jodi
Jodi

Reputation: 900

Google Drive maxResults ignored when using a query string in a Files#list request

I'm trying to retrieve the files of a certain folder and paginate the results.

The query looks like:

If I have 2 documents in my root folder, I will receive the 2 results instead of 1. There won't be any nextPageToken or nextLink.

Upvotes: 0

Views: 357

Answers (1)

Vic Fryzel
Vic Fryzel

Reputation: 2395

I just tried this and couldn't reproduce the behavior you're reporting. My query is:

https://www.googleapis.com/drive/v2/files?q='root'+in+parents&maxResults=2

And I get exactly 2 file resources back, while also getting a nextPageToken and nextLink.

Upvotes: 1

Related Questions