I am attempting to list the 5 most recent videos (title, updated, thumbnail (hqDefault)) from a channel. I have the data in JSON format, but despite looking at several guides I can not seem to parse it. Any ideas? Can use Javascript or jQuery.
Here's the URL: https://gdata.youtube.com/feeds/api/videos?q=googledevelopers&max-results=5&v=2&alt=jsonc&orderby=published
FWIW here is what I have so far (Disregard HTML formatting)
$.getJSON('https://gdata.youtube.com/feeds/api/videos?q=googledevelopers&max-results=5&v=2&alt=jsonc&orderby=published', function(data) {
var output="<ul>";
for (var i in data.data.items) {
output+="<li>" + data.data.items[i].title + "</li>";
}
document.getElementById("videos").innerHTML=output;
$.getJSON('https://gdata.youtube.com/feeds/api/videos?q=googledevelopers&max-results=5&v=2&alt=jsonc&orderby=published', function(data) { console.log(data); });
– techfoobar