संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
maxResults फ़ील्ड सेट करके, यह कंट्रोल किया जा सकता है कि सूची के अनुरोध के जवाब में, सर्वर ज़्यादा से ज़्यादा कितने संसाधन दिखाए. इसके अलावा, कुछ कलेक्शन (जैसे, इवेंट) के लिए, वापस लाई गई एंट्री की संख्या पर एक तय सीमा होती है. सर्वर इस सीमा से ज़्यादा एंट्री कभी नहीं लाएगा. अगर इवेंट की कुल संख्या इस सीमा से ज़्यादा है, तो सर्वर एक पेज के नतीजे दिखाता है.
याद रखें कि maxResults से यह गारंटी नहीं मिलती कि एक पेज पर कितने नतीजे दिखेंगे.
अधूरे नतीजों का पता, नतीजे में मौजूद nextPageToken फ़ील्ड से लगाया जा सकता है. अगला पेज पाने के लिए, पहले जैसा ही अनुरोध करें और पिछले पेज की वैल्यू के साथ pageToken फ़ील्ड जोड़ें.nextPageToken सभी नतीजे मिलने तक, अगले पेजों पर एक नया nextPageToken दिया जाता है.
उदाहरण के लिए, यहां एक क्वेरी दी गई है. इसके बाद, पेज की सूची में नतीजों के अगले पेज को पाने के लिए क्वेरी दी गई है:
GET /calendars/primary/events?maxResults=10&singleEvents=true
//Result contains
"nextPageToken":"CiAKGjBpNDd2Nmp2Zml2cXRwYjBpOXA",
अगली क्वेरी, nextPageToken से वैल्यू लेती है और उसे pageToken की वैल्यू के तौर पर सबमिट करती है:
GET /calendars/primary/events?maxResults=10&singleEvents=true&pageToken=CiAKGjBpNDd2Nmp2Zml2cXRwYjBpOXA
[[["समझने में आसान है","easyToUnderstand","thumb-up"],["मेरी समस्या हल हो गई","solvedMyProblem","thumb-up"],["अन्य","otherUp","thumb-up"]],[["वह जानकारी मौजूद नहीं है जो मुझे चाहिए","missingTheInformationINeed","thumb-down"],["बहुत मुश्किल है / बहुत सारे चरण हैं","tooComplicatedTooManySteps","thumb-down"],["पुराना","outOfDate","thumb-down"],["अनुवाद से जुड़ी समस्या","translationIssue","thumb-down"],["सैंपल / कोड से जुड़ी समस्या","samplesCodeIssue","thumb-down"],["अन्य","otherDown","thumb-down"]],["आखिरी बार 2024-12-21 (UTC) को अपडेट किया गया."],[[["Control the maximum number of resources returned in a list request by setting the `maxResults` field, with some collections having hard limits on retrievable entries."],["Detect incomplete results by checking for a non-empty `nextPageToken` field, which indicates the presence of additional pages."],["Retrieve the next page of results by performing the same request and appending a `pageToken` field with the `nextPageToken` value from the previous page."],["The server provides new `nextPageToken` values on subsequent pages until all results are retrieved, enabling complete data retrieval through pagination."]]],[]]