Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Możesz określić maksymalną liczbę zasobów zwracanych przez serwer w odpowiedzi na żądanie listy, ustawiając pole maxResults. Ponadto w przypadku niektórych kolekcji (np. zdarzeń) istnieje sztywny limit pobranych wpisów, którego serwer nigdy nie przekroczy. Jeśli łączna liczba zdarzeń przekroczy tę maksymalną wartość, serwer zwróci jedną stronę wyników.
Pamiętaj, że maxResults nie gwarantuje liczby wyników na jednej stronie.
Niepełne wyniki można rozpoznać po niepustym polu nextPageToken w wyniku. Aby pobrać następną stronę, wykonaj dokładnie to samo żądanie co wcześniej i dołącz pole pageToken z wartością nextPageToken z poprzedniej strony. Na kolejnych stronach będzie widoczny nowy symbol nextPageToken, dopóki nie zostaną pobrane wszystkie wyniki.
Oto przykład zapytania, a następnie zapytania o pobranie następnej strony wyników na liście podzielonej na strony:
GET /calendars/primary/events?maxResults=10&singleEvents=true
//Result contains
"nextPageToken":"CiAKGjBpNDd2Nmp2Zml2cXRwYjBpOXA",
Kolejne zapytanie pobiera wartość z nextPageToken i przesyła ją jako wartość parametru pageToken:
GET /calendars/primary/events?maxResults=10&singleEvents=true&pageToken=CiAKGjBpNDd2Nmp2Zml2cXRwYjBpOXA
[[["Łatwo zrozumieć","easyToUnderstand","thumb-up"],["Rozwiązało to mój problem","solvedMyProblem","thumb-up"],["Inne","otherUp","thumb-up"]],[["Brak potrzebnych mi informacji","missingTheInformationINeed","thumb-down"],["Zbyt skomplikowane / zbyt wiele czynności do wykonania","tooComplicatedTooManySteps","thumb-down"],["Nieaktualne treści","outOfDate","thumb-down"],["Problem z tłumaczeniem","translationIssue","thumb-down"],["Problem z przykładami/kodem","samplesCodeIssue","thumb-down"],["Inne","otherDown","thumb-down"]],["Ostatnia aktualizacja: 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"]]