java - Youtube API v3 reading playlist -


youtube has close api v2 have rewrite script read youtube playlist.. have managed read items in playlist ajax.

for (var in data.items) 

but not seem can read title of videos. have try :

data.items[i].title 

but not seems work.

here part of data of youtube.

 "items": [  {   "kind": "youtube#playlistitem",   "etag": "\"dhbhldw5j8dk10gxev_ug6rsrem/nuoxgpc9-1qfjdgnicjpggboqiw\"",   "id": "pl00i2_blzsbvkhcdxdtjhomefsehrz4oi",   "snippet": {    "publishedat": "2015-05-15t06:06:55.000z",    "channelid": "uckbfi2uitrlulri-31wztga",    "title": "patrick rosa - angels in sky (teaser)", 

what wrong, m bit lost.

something give titles in specific playlist in javascript:

gapi.client.setapikey('{your-api-key}'); gapi.client.load('youtube', 'v3', function () {      var request = gapi.client.youtube.playlistitems.list({         part: 'snippet',         playlistid: '{your playlist id}'     });      request.execute(function (response) {         (var = 0; < response.items.length; i++) {             console.log(response.items[i].snippet.title);         }     }); }); 

Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

spring cloud - How to configure SpringCloud Eureka instance to point to https on non standard port -

javascript - Bootstrap Popover: iOS Safari strange behaviour -