Stuck... have a question...
- ///////////////////////////
- // Enter your info below//
- /////////////////////////
-
- var channelName = 'thedallascowboyshow';
- var vidWidth = 500;
- var vidHeight = 400;
- var maxResults = 10;
- var key = 'TEST KEY';
-
- //////////////////////////////
- // NO edit below this line //
- ////////////////////////////
- $(document).ready (function(){
- $.get (
- "https://www.googleapis.com/youtube/v3/channels",{
- part: 'contentDetails',
- forUsername: channelName,
- key: key},
- function(data){
- $.each(data.items, function(i, item){
- console.log(item);
- pid = item.contentDetails.relatedPlaylists.uploads;
- getVids(pid);
- })
- }
- );
- function getVids(pid){
- $.get (
- "https://www.googleapis.com/youtube/v3/playlistItems",{
- part: 'snippet',
- maxResults: maxResults,
- playlistId: pid,
- key: key},
- function(data){
- var output;
- var date;
- $.each(data.items, function(i, item){
- console.log(item);
- dateId = item.snippet.publishedAt;
- videoId = item.snippet.resourceId.videoId;
-
- output = '<li><iframe height="'+vidHeight+'" width="'+vidWidth+'" src=\"//www.youtube.com/embed/'+videoId+'\" allowfullscreen="true"></iframe></li>';
- date='<li>"'+dateId+'"</;i>';
-
- //Append to results listStyleType
- $('#results').append(output);
- $('#date').append(date);
- })
- }
- );
- }
- });
So far this is what I have... I'm new to all this so I'm stuck... I have the output on line 44 working on the page with no problem....
This is a down and dirty js file I got off of youtube.. believe me if I could figure out how to do this in php I'd rather but...
I'm trying to show the date line 45.. but I'm getting no output... suggetions? :)