Updating free youtube gallery to work with Youtube 3.0 API -


youtube 3.0 going kill off useful slider code, instead want updated.

to start off, i've looked through api , migration tips , deprecated functions lists, , makes sense. i'm not familiar enough how gallery coded update function on 3.0 quickly.

so figured i'd ask question on here see if can done sooner save time.

i did not code this! distributed under apache license , made simone gianni. it's been useful me , many others want updated , continue being useful everyone.

the original: http://jsfiddle.net/nmva9/490/

i'm pretty sure @ point fine except use of getjson deprecated in 3.0.

$.getjson('http://gdata.youtube.com/feeds/users/' + allopts.user + '/uploads?alt=json-in-script&format=5&callback=?', null, function(data) {             var feed = data.feed;             var videos = [];             $.each(feed.entry, function(i, entry) {                 var video = {                     title: entry.title.$t,                     id: entry.id.$t.match('[^/]*$'),                     thumbnails: entry.media$group.media$thumbnail                 };                 videos.push(video);             }); 

thanks in advance.

edit: jlmcdonald help. rocketed me forward on this. right way, thumbnails, or thought? once resolving problems thumbnails i'm left seems blank returns no reason. viewable here: http://jsfiddle.net/ynatb/10/

not sure why, i'm assuming i'm making valid wrong place.

thanks again.

first of all, couple of caveats:

1) in v3 of youtube api, read request require api key, each developer has on his/her own @ http://console.developers.google.com. make that, if redistributing new code, won't plug , play ... devs have edit include own api key in relevant location.

2) might need change code implements thumbnails ... thumbnail object in v3 uses different parameter names various types of thumbnails.

anyway, having said that, here's how you'd translate above code v3:

    var videos = [];     $.get('https://www.googleapis.com/youtube/v3/channels?part=snippet&forusername='+allopts.user+'&key=', function(channeldata) {         $.get('https://www.googleapis.com/youtube/v3/search?order=date&part=id,snippet&channelid='+channeldata.items[0].id+'&key=', function(videodata) {             $.each(videodata.items, function(k,v) {               var video = {                         title: v.snippet.title,                         id: v.id.videoid,                         thumbnails: v.snippet.thumbnails               };               videos.push(video);             });         });     });