在YouTube上获取游戏直播流的列表 [英] Get list of gaming live streams on Youtube

查看:492
本文介绍了在YouTube上获取游戏直播流的列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Youtube Data API来获取当前与游戏相关的直播流的列表,但是我找不到适合我需要的端点并返回每个频道的观看人数.

I'm trying to use the Youtube Data API to grab the list of currently gaming related live streams but I can't find any endpoint that fit what I need and return the number of viewers for each of those channels.

你们对我如何做到这一点有任何想法吗?

Do you guys have any idea of how I could manage to do that ?

谢谢.

推荐答案

游戏直播流列表:
https://www.googleapis.com/youtube/v3/search?part=snippet&eventType=live&type=video& videoCategoryId = 20 & regionCode = US& maxResults = 50& key = {YOUR_API_KEY_HERE}

List of gaming live streams:
https://www.googleapis.com/youtube/v3/search?part=snippet&eventType=live&type=video&videoCategoryId=20&regionCode=US&maxResults=50&key={YOUR_API_KEY_HERE}

videoCategoryId = 20是游戏"

videoCategoryId=20 is "Gaming"

获取实时流的详细信息(例如观众编号):

Getting the live stream details (like viewer numbers):
https://www.googleapis.com/youtube/v3/videos?part=snippet%2CliveStreamingDetails&id={VIDEO_ID_HERE}&fields=items(id%2Csnippet(title%2CliveBroadcastContent)%2CliveStreamingDetails%2FconcurrentViewers)&key={YOUR_API_KEY_HERE}

用适当的值替换{}中这些链接的部分.

Substitue the parts of these links that are in {} with your appropriate values.

这篇关于在YouTube上获取游戏直播流的列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆