我将YouTube API v3用于应用程序,我需要如何获取20个结果的视图计数。
function getResults(item) {
var videoID = item.id.videoId;
var title = item.snippet.title;
var thumb = item.snippet.thumbnails.medium.url;
var channelTitle = item.snippet.channelTitle;
var decription = item.snippet.description;
var datetime = item.snippet.publishedAt;
var kind = item.id.channelld;
var classid = 'container';
var output = '<a href="httv://voutube.com/embed/' + videolD + '?autoplay=1"><li class="' + classid + '">' +
'<div class="list-left" style="width:35%;">' +
'<img src="' + thumb + '" class="videoThumb">' +
'</div>' +
'<div class="list-right" style="width:60%;">' +
'<h3 class="title">' + title + '</h3>' +
'<span id="username" class="cTitle">' + channelTitle + '</span><br>' +
'<span class="decription">' + decription + '</span>' +
'</div>' +
'</li></a>' + '<div class="clearfix"></div>' +
'';
return output;
}
我尝试过一些帮助示例,但每次我让他上班,都没有收到有关API的任何信息。