Click here to load reader

+ YouTube API Busca de vídeos no YouTube. Acadêmico: Diego De Faveri Cristiano

  • View
    105

  • Download
    0

Embed Size (px)

Text of + YouTube API Busca de vídeos no YouTube. Acadêmico: Diego De Faveri Cristiano

  • Slide 1
  • + YouTube API Busca de vdeos no YouTube. Acadmico: Diego De Faveri Cristiano
  • Slide 2
  • + YouTube API API de busca de vdeos no YouTube. API do YouTube que voc recebe uma informao de um determinado resultado de pesquisa consultado pela varivel &q String de conexo: http://gdata.youtube.com/feeds/api/videos?v=2&alt=jsonc&q= pucpr &callback=? No prximo slide um trecho da string de retorno...
  • Slide 3
  • + Videos({ "apiVersion":"2.0", "data":{ "updated":"2010-03-27T13:59:31.613Z", "totalItems":977, "startIndex":1, "itemsPerPage":25, "items[{ "id":"kjy51C2olug", "uploaded":"2009-08-31T14:06:03.000Z", "updated":"2010-03-26T19:45:03.000Z, "uploader":"PUCPR50anos", "category":"Education", "title":"PUCPR Medicina, "description":"", "tags":["medicina","pucpr","puc","mdico","sade"], "thumbnail":{ "sqDefault":"http://i.ytimg.com/vi/kjy51C2olug/default.jpg", "hqDefault":"http://i.ytimg.com/vi/kjy51C2olug/hqdefault.jpg"}, "player":{ "default":"http://www.youtube.com/watch?v\u003dkjy51C2olug&feature\u003dyoutube_gdata", "mobile":"http://m.youtube.com/details?v\u003dkjy51C2olug"}, "content":{ "1":"rtsp://v2.cache8.c.youtube.com/CiILENy73wIaGQnolqgt1Lk8khMYDSANFEgGUgZ2aWRlb3MM/0/0/0/video.3gp", "5":"http://www.youtube.com/v/kjy51C2olug?f\u003dvideos&app\u003dyoutube_gdata", "6":"rtsp://v7.cache1.c.youtube.com/CiILENy73wIaGQnolqgt1Lk8khMYESARFEgGUgZ2aWRlb3MM/0/0/0/video.3gp"}, "duration":113, "rating":4.0, "ratingCount":1, "viewCount":4905, "favoriteCount":1, "commentCount":0, "accessControl:{ "syndicate":"allowed", "commentVote":"allowed", "rate":"allowed, comment":"allowed", "embed":"allowed", "videoRespond":"moderated"} }, YouTube API
  • Slide 4
  • + Trabalho comunicao jQuery + JSON $(document).ready(function() { var increment = 0; $.getJSON(" http://gdata.youtube.com/feeds/api/videos?v=2&alt=jsonc&q=pucpr&callback=? ", function(json) { for(increment=0;increment + " + " "+ (json.data.items[increment].title) +" + " ").appendTo("#ul1"); } }); }); Search Result YouTube API
  • Slide 5
  • + "title":"PUCPR Medicina "thumbnail":{ "sqDefault":"http://i.ytimg.com/vi/kjy51C2olug/default.jpg" "player":{ "default":"http://www.youtube.com/watch?v\u003dkjy51C2olug&feature\u003dyoutube_gdata" "+(json.data.items[increment].title)+"