Streaming Availability

फ्रीमियम
Verified
द्वारा Movie of the Night | अपडेट किया गया 3 days ago | Movies
लोकप्रियता

9.9 / 10

लेटेंसी

608ms

सेवा का स्तर

100%

Health Check

N/A

सभी चर्चाओं पर वापस जाएं

pages total_pages

Rapid account: Awolrob
awolrob
3 years ago

I’m selecting several services and only getting limited data. How do I attemtped to receive “unlimited” data back?

'data: { results: [], total_pages: 87 }'

when I do not specify a "pages" parm I only get 25 results

when I specify a "pages" of 100 I go NO data back.

Do I have to call the API once to determine the number of pages then again setting the number of pages?
Rapid account: Cevatbarisyilmaz
cevatbarisyilmaz Commented 3 years ago

Hi,

To query the whole data, you need to first send a request with page=1 or without a page parameter (note that there’s no “pages” parameter, there’s only “page”). Consume the data in the results, then check the “total_pages” and send a new request for each page. i.e. if total_pages = 5, then you need to send extra requests with page=2, page=3, page=4, and page=5

Maximum amount of items for each request is 25 for Search Ultra endpoint. So if there’re 100 results, you’ll need to send 4 requests to get them all.

When you are setting “page” to 100, and the total pages are 87, that means you are querying a page that does not exists, thus the endpoint returns an empty array.

Hope this helps. Let me know if you any other questions.

चर्चा में शामिल हों - नीचे टिप्पणी जोड़ें:

नई टिप्पणियाँ पोस्ट करने के लिए लॉग इन / साइनअप करें