Youtube data API version 3 pagination -
I understand that YouTube has next and previous page token in response and we want them to go to the previous and next page Can be used. / P>
Example:
https://www.googleapis.com/youtube/v3/search?&q=key= {key} and part = snippets and maximum results = 20 & Amp; ; Order = viewcount & amp; Q = abc & amp; Type = Video & amp; Videiodurebil = long & amp; Video Type = Film & amp; PageToken = CD323A
My question is how do I n page of special search?
Please note that some people can see that this is impossible, but I have applied some site to it.
YouTube API provides only NextPageToken
and previous page talk
, is it, sorry: see the document here:
You can still take points on one page, but you have to implement the URL by calling it multiple times next page- Each time in your request, and caching results as the token
as PageToken
.
By the way, this question has already been answered here (see 1 point answer of 1):
Referring to them:
Especially in your case where you need 50 pages per page and you are looking like 3 paging (1, 2, next), you need to bring the results twice, so you will keep both results in the cache so that the page Results 1 and 2 will be obtained from the cache. For the next, make sure that you are making Google the query again by sending the next page to Talk.
In order to show page 1-N and to display each page 50 results, you need to query N-1 for Google API. But if you are displaying 10 results per page, then you can show 5 pages (1-5) before using this result to retrieve the results you can use to create a single query of 50 results and next to the next number Page token must be sent above
Note- The Google YouTube API provides up to 50 results.
Comments
Post a Comment