When using https://www.googleapis.com/youtube/v3/search?part=snippet&type=video&relatedToVideoId=HZsRjrYW-lk&maxResults=10&key=${key} the response doesnt contain nextPageToken even though the number of results are more than the no of items returns
I tried increasing the maxResults to check if there are more results and using maxResults for pagination but i dont think its the best way to get 40 results and return last 10 result for example :-1st page :- currentPage = 0 ;maxResult=currentPage+10;return items[maxResult-10]---items[maxResult]so for 1st page currenPage = 0 ,maxResult = 10,return : items[0]--items[10]
2nd page :- currentPage = 10 ;maxResutl = currentPage+10 ;return items[maxResult-10]--items[maxResult]so for 2nd page currenPage = 10 ;maxResult = 20 ;retrn items[10]--items[20]..and so on
but the problem is that i need to get all the vidoes and then cut the part i dont need