Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Puoi controllare il numero massimo di risorse restituite dal server nella
risposta a una richiesta di elenco impostando il campo maxResults. Inoltre,
per alcune raccolte (ad esempio Eventi) esiste un limite rigido al numero di
voci recuperate che il server non supererà mai. Se il numero totale di eventi supera questo massimo, il server restituisce una pagina di risultati.
Ricorda che maxResults non garantisce il numero di risultati su una pagina.
I risultati incompleti possono essere rilevati da un campo nextPageToken non vuoto nel risultato. Per recuperare la pagina successiva, esegui esattamente la stessa richiesta
di prima e aggiungi un campo pageToken con il valore di
nextPageToken della pagina precedente. Un nuovo nextPageToken viene fornito
nelle pagine seguenti finché non vengono recuperati tutti i risultati.
Ad esempio, ecco una query seguita dalla query per recuperare la pagina successiva dei risultati in un elenco impaginato:
GET /calendars/primary/events?maxResults=10&singleEvents=true
//Result contains
"nextPageToken":"CiAKGjBpNDd2Nmp2Zml2cXRwYjBpOXA",
La query successiva prende il valore da nextPageToken e
lo invia come valore per pageToken:
GET /calendars/primary/events?maxResults=10&singleEvents=true&pageToken=CiAKGjBpNDd2Nmp2Zml2cXRwYjBpOXA
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Mancano le informazioni di cui ho bisogno","missingTheInformationINeed","thumb-down"],["Troppo complicato/troppi passaggi","tooComplicatedTooManySteps","thumb-down"],["Obsoleti","outOfDate","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Problema relativo a esempi/codice","samplesCodeIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-08-29 UTC."],[],[],null,["# Page through lists of resources\n\nYou can control the maximum number of resources the server returns in the\nresponse to a list request by setting the `maxResults` field. Furthermore,\nfor some collections (such as Events) there is a hard limit on the number of\nretrieved entries that the server will never exceed. If the total number of\nevents exceeds this maximum, the server returns one page of results.\n\nRemember that `maxResults` does not guarantee the number of results on one page.\nIncomplete results can be detected by a non-empty `nextPageToken` field in\nthe result. In order to retrieve the next page, perform the exact same request\nas previously and append a `pageToken` field with the value of\n`nextPageToken` from the previous page. A new `nextPageToken` is provided\non the following pages until all the results are retrieved.\n\nFor example, here is a query followed by the query for retrieving the\nnext page of results in a paginated list: \n\n GET /calendars/primary/events?maxResults=10&singleEvents=true\n\n //Result contains\n\n \"nextPageToken\":\"CiAKGjBpNDd2Nmp2Zml2cXRwYjBpOXA\",\n\nThe subsequent query takes the value from `nextPageToken` and\nsubmits it as the value for `pageToken`: \n\n GET /calendars/primary/events?maxResults=10&singleEvents=true&pageToken=CiAKGjBpNDd2Nmp2Zml2cXRwYjBpOXA"]]