Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
返回每个活动的视频 ID 将非常有用。只返回视频标题和描述似乎很奇怪。我只是瞎了吗?有没有办法获取每个活动项目的视频 ID?
这是活动源的端点:
http://developers.google.com/apis-explorer/#p/youtube/v3/youtube.activities.list?part=snippet&channelId=UC3Ntz3-vGtr17V5JjUqiARA&maxResults=50&fields=items&_h=4&
您需要在请求的“part”属性的值中包含“contentDetails”——这就是包含活动的 videoID 的地方。因此,具体来说,您的请求将到达端点:
https://www.googleapis.com/youtube/v3/activities?part=id%2Csnippet%2CcontentDetails&channelId=UC3Ntz3-vGtr17V5JjUqiARA&maxResults=50&key={YOUR_API_KEY}