TokenPagination
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
啟用權杖分頁功能時,List 作業傳回的分頁資訊。
支援分頁作業的清單作業只會傳回一個「頁面」個結果。這個通訊協定緩衝區訊息會說明已傳回的網頁。
使用權杖分頁時,用戶端應使用下一個/上一個符記來取得結果頁面。是否出現下一個/上一個符記,代表系統是否可存取下一頁/上一頁,並提供了存取該網頁的手段。如要存取其他頁面,請將 ListRequest.page_token 設為 nextPageToken 或 previousPageToken。
JSON 表示法 |
{
"nextPageToken": string,
"previousPageToken": string
} |
欄位 |
nextPageToken |
string
傳送至標準清單欄位「pageToken」的權杖。如果有可用的符記,其優先順序高於操縱 startIndex。
|
previousPageToken |
string
|
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-26 (世界標準時間)。
[null,null,["上次更新時間:2025-07-26 (世界標準時間)。"],[[["\u003cp\u003eThis document explains the structure of pagination information returned for list operations that support paging when token pagination is enabled.\u003c/p\u003e\n"],["\u003cp\u003eClients should utilize the \u003ccode\u003enextPageToken\u003c/code\u003e or \u003ccode\u003epreviousPageToken\u003c/code\u003e to navigate between pages of results.\u003c/p\u003e\n"],["\u003cp\u003eThe presence or absence of these tokens indicates the availability of additional pages.\u003c/p\u003e\n"],["\u003cp\u003eThe JSON representation of this pagination information includes \u003ccode\u003enextPageToken\u003c/code\u003e and \u003ccode\u003epreviousPageToken\u003c/code\u003e fields as strings.\u003c/p\u003e\n"]]],["List operations with pagination return one page of results. `nextPageToken` and `previousPageToken` are provided as strings to access subsequent or prior pages. Clients should set `ListRequest.page_token` to one of these tokens for navigation. The presence of these tokens indicates if a respective page is available. Tokens are favored over manipulating `startIndex` for accessing pages. JSON representation uses these string values.\n"],null,["# TokenPagination\n\n- [JSON representation](#SCHEMA_REPRESENTATION)\n\nPagination information returned by a List operation when token pagination is enabled.\n\nList operations that supports paging return only one \"page\" of results. This protocol buffer message describes the page that has been returned.\n\nWhen using token pagination, clients should use the next/previous token to get another page of the result. The presence or absence of next/previous token indicates whether a next/previous page is available and provides a mean of accessing this page. ListRequest.page_token should be set to either nextPageToken or previousPageToken to access another page.\n\n| JSON representation |\n|------------------------------------------------------------------|\n| ``` { \"nextPageToken\": string, \"previousPageToken\": string } ``` |\n\n| Fields ||\n|---------------------|----------------------------------------------------------------------------------------------------------------------------------------|\n| `nextPageToken` | `string` Tokens to pass to the standard list field 'pageToken'. Whenever available, tokens are preferred over manipulating startIndex. |\n| `previousPageToken` | `string` |"]]