从频道ID获取广播ID-YouTube API V3

时间:2020-06-09 20:00:40

标签: api http youtube-api

我需要基于视频URL知道实时聊天的ID(或广播,以便获取实时聊天的ID)(我已经具有基于视频URL的频道ID)。我尝试按照说明的here遵循API端点。

这是我输入URL地址的内容/使用GET请求的内容:

https://www.googleapis.com/youtube/v3/search?part=snippet&channelId=UChs0pSaEoNLV4mevBFGaoKA&eventType=live&type=video&key=AIzaSyDl9Le2hxgLBTLuWidkZL0mqMI7BpFNzsA

这就是输出:

{
  "kind": "youtube#searchListResponse",
  "etag": "HThuNpak09_KEjLGVv8ha1kgI3A",
  "regionCode": "PL",
  "pageInfo": {
    "totalResults": 2,
    "resultsPerPage": 5
  },
  "items": [
    {
      "kind": "youtube#searchResult",
      "etag": "ui0jIAKvsHNSKCOhqlbrgXGcH4o",
      "id": {
        "kind": "youtube#video",
        "videoId": "36YnV9STBqc"
      },
      "snippet": {
        "publishedAt": "2020-03-28T00:19:07Z",
        "channelId": "UChs0pSaEoNLV4mevBFGaoKA",
        "title": "The Good Life Radio • 24/7 Live Radio | Best Relax House, Chillout, Study, Running, Gym, Happy Music",
        "description": "The Good Life is live streaming the best of Relaxing & Chill House Music, Deep House, Tropical House, EDM, Dance & Pop as well as Music for Sleep, Focus, ...",
        "thumbnails": {
          "default": {
            "url": "https://i.ytimg.com/vi/36YnV9STBqc/default_live.jpg",
            "width": 120,
            "height": 90
          },
          "medium": {
            "url": "https://i.ytimg.com/vi/36YnV9STBqc/mqdefault_live.jpg",
            "width": 320,
            "height": 180
          },
          "high": {
            "url": "https://i.ytimg.com/vi/36YnV9STBqc/hqdefault_live.jpg",
            "width": 480,
            "height": 360
          }
        },
        "channelTitle": "The Good Life Radio x Sensual Musique",
        "liveBroadcastContent": "live",
        "publishTime": "2020-03-28T00:19:07Z"
      }
    },
    {
      "kind": "youtube#searchResult",
      "etag": "kRiJkYyDYEITPVKTY4ZwhzM2LeE",
      "id": {
        "kind": "youtube#video",
        "videoId": "wKOEl_vwPSo"
      },
      "snippet": {
        "publishedAt": "2020-04-29T15:57:15Z",
        "channelId": "UChs0pSaEoNLV4mevBFGaoKA",
        "title": "Deep House Radio • 24/7 Live Radio | Vocal Deep House & Chill House Music",
        "description": "Deep House Radio • 24/7 Live Radio | Vocal Deep House & Chill House Music Listen to the Playlist on Spotify: ...",
        "thumbnails": {
          "default": {
            "url": "https://i.ytimg.com/vi/wKOEl_vwPSo/default_live.jpg",
            "width": 120,
            "height": 90
          },
          "medium": {
            "url": "https://i.ytimg.com/vi/wKOEl_vwPSo/mqdefault_live.jpg",
            "width": 320,
            "height": 180
          },
          "high": {
            "url": "https://i.ytimg.com/vi/wKOEl_vwPSo/hqdefault_live.jpg",
            "width": 480,
            "height": 360
          }
        },
        "channelTitle": "The Good Life Radio x Sensual Musique",
        "liveBroadcastContent": "live",
        "publishTime": "2020-04-29T15:57:15Z"
      }
    }
  ]
}

做,我在这里找不到广播ID或聊天ID。你们知道某种解决方法,还是为此解决?您知道自发布我链接的答案以来发生了什么变化吗?

0 个答案:

没有答案