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

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -