Youtube api v3 获取用户视频列表 [英] Youtube api v3 Get list of user's videos
问题描述
使用 Youtube api v2,可以轻松获取视频.只需发送这样的查询:
With Youtube api v2, there's easy way to get videos. Just send a query like this:
Youtube api v2 还有一个用于构建查询的交互式演示页面:http://gdata.youtube.com/demo/index.html
The Youtube api v2 also has an interactive demo page for building query: http://gdata.youtube.com/demo/index.html
使用Youtube api v3,不知道对应的方式.请用 api v3 给我指路.
With Youtube api v3, I don't know the corresponding way. Please point me the way with api v3.
谢谢!
推荐答案
频道#list 方法将返回一个 JSON,其中包含有关频道的一些信息,包括上传"播放列表的播放列表 ID:
The channels#list method will return a JSON with some information about the channel, including the playlist ID for the "uploads" playlist:
https://www.googleapis.com/youtube/v3/channels?part=contentDetails&forUsername=OneDirectionVEVO&key={YOUR_API_KEY}
使用播放列表 ID,您可以使用 playlistItems#list 方法:
With the playlist ID you can get the videos with the playlistItems#list method:
https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&playlistId=UUbW18JZRgko_mOGm5er8Yzg&key={YOUR_API_KEY}
您可以在文档页面的末尾测试这些内容.
You can test those at the end of the documentation pages.
这篇关于Youtube api v3 获取用户视频列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!