Videos API - How do I automatically update my posts?

2

Is there a video API for YouTube and Vimeo that can be embedded through a script on a website and that gives me the ability to automatically update the posts I've made?

    
asked by anonymous 22.02.2014 / 16:53

1 answer

0

Yes, you have the YouTube API itself. It's available at this link: link

I made one of these in Rede TV Rondônia. It looked something like this:

function showVideosShopTV( data ) {
  var feed = data.feed;

  var entries = feed.entry || [];

  // console.log(entries)

  var html = ['<ul class="videos-shop-tv-container">'];

  for (var i = 0; i < entries.length; i++) {
    var entry = entries[i];
    var title = entry.title.$t;
    var link = entry.link[0].href;
    var thumbnailUrl = entries[i].media$group.media$thumbnail[0].url;
    var datetime = new Date(entry.published.$t);

    html.push('<li>', '<div class="thumb video"><a class="borda-interna vc modal-video-link-shoptv" data-share-link="', link ,'" data-title="', title ,'" href="', link ,'"><img src="', thumbnailUrl, '" width="220" height="165" /></a></div><div style="color: #999; font-size: 12px; line-height: 18px; text-align: left;">',datetime.getDate() + '/' + datetime.getMonth() + '/' + datetime.getFullYear(),'</div><div style="overflow-wrap: break-word;" class="title-videos">', title, '</div></li>');
  }
  document.getElementById('videos-shop-tv-container').innerHTML = html.join('');
}

<script type="text/javascript" src="http://gdata.youtube.com/feeds/users/ShopTVRondonia/uploads?alt=json-in-script&callback=showVideosShopTV&max-results=20&orderby=published&time=this_week&format=5"></script>

I just could not get the deletion videos. To do this create a function to make the list of videos random.

But it's a start.

    
23.02.2014 / 03:11