Youtube javascript api pagination params -
in youtube api v2 documentation. recommended use rel="previous"
, rel="next"
work pagination.
http://gdata.youtube.com/feeds/api/videos?start-index=51&max-results=25
let above link, start 51 , limit 25 videos params within link. problem is, don't want use link directly, want separate params , pass function params.
how can that?
if i'm understanding question, easy do, break string chunks , insert function parameters.
function make_url(start_index, max_results) { return "http://gdata.youtube.com/feeds/api/videos?start-index=" + start_index + "&max-results=" + max_results }
then calling make_url(100, 25) return url this.
http://gdata.youtube.com/feeds/api/videos?start-index=100&max-results=25
Comments
Post a Comment