Google Apps Script

Class Token

A token object used to enable pagination in methods that return a limited number of items. For example, the token can be passed to sequential DocsList.getAllFilesForPaging(number, token) calls to continue paging through large sets of results.

// This example logs the names of all files in the user's drive in batches of 200
 var pageSize = 200;
 var files = null;
 var token = null;
 do {
   var result = DocsList.getAllFilesForPaging(pageSize, token);
   files = result.getFiles();
   token = result.getToken();
   for (var i = 0; i < files.length; i++) {
 } while (files.length >= pageSize);

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.