Clarification on maxResults and nextPageToken using Google Drive API v2

后端 未结 2 1624
一整个雨季
一整个雨季 2021-02-05 15:55

I just wanted clarification with regard to the Files: list feature of the Google Drive API here:

https://developers.google.com/drive/v2/reference/files/list

What

2条回答
  •  星月不相逢
    2021-02-05 16:31

    The maxResults query parameter can be used to limit (or increase) the number of items returned in a list request. There is a default value and a hard limit that is set by our server. Unfortunately, we don't usually document those numbers as they can easily change and recommend developers to look for a nextPageToken and/or nextLink in the resulting collection to know whether or not all items have been returned.

    The nextPageToken attribute is to be used as the pageToken query parameter on a list request. If you are using the nextLink from the resulting collection, you do not need to specify the pageToken query parameter as it should already be included.

提交回复
热议问题