Can I access all live broadcasts with YouTube's LiveStreaming API?

点点圈 提交于 2019-12-12 19:05:00

问题


Meerkat allows access to all its live broadcasts via REST API. Does YouTube's live streaming API allow the same? I can see that they allow CRUD through the API for a particular user. My question is can I access all live broadcasts with the API?


回答1:


You can use the Search/list endpoint of the regular YouTube v3 API and filter the results to only receive live content. Make sure to pass in the following parameters:

part -> snippet

eventType -> live

type -> video (required when setting eventType to live)

The full get request:

HTTP GET https://www.googleapis.com/youtube/v3/search?part=snippet&eventType=live&type=video&key={YOUR_API_KEY}


来源:https://stackoverflow.com/questions/33380083/can-i-access-all-live-broadcasts-with-youtubes-livestreaming-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!