/ Published in: jQuery
More complete docs here: http://code.google.com/apis/youtube/2.0/developersguideprotocolapiquery_parameters.html#orderbysp Note the use of alt=json. jQuery will append &callback=FUNCTIONNAME automatically. Example url: http://gdata.youtube.com/feeds/api/videos?q=football+-soccer&orderby=published&start-index=11&max-results=10&v=2&callback=func&alt=json
Expand |
Embed | Plain Text
//See more http://code.google.com/apis/youtube/2.0/developers_guide_protocol_api_query_parameters.html $.ajax({ type:'GET', dataType:'jsonp', //url:'http://gdata.youtube.com/feeds/users/USERNAME/uploads?alt=json', //also usable, but less awesome url:'http://gdata.youtube.com/feeds/api/videos', data:{author:'USERNAME', v:2, orderby:'published', alt:'json', 'max-results':10}, success:function(data, textStatus, XMLHttpRequest) { console.log(data); }, error:function(eq, status, error) { alert('error: '+status); } });
Comments
Subscribe to comments
You need to login to post a comment.

Nice.