Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/38.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 用Youtube API搜索频道_Ios_Iphone_Youtube Api_Youtube Data Api_Youtube Channels - Fatal编程技术网

Ios 用Youtube API搜索频道

Ios 用Youtube API搜索频道,ios,iphone,youtube-api,youtube-data-api,youtube-channels,Ios,Iphone,Youtube Api,Youtube Data Api,Youtube Channels,我正在我的iOS应用程序中使用Youtube数据Api V3。有谁能给我举个例子,用名字搜索某个频道的东西 我试着用下面的方法,但它不起作用 {YOUR_API_KEY}&part=snippet&type=channel&q=AnimalPlanetTV 有谁能帮我按名称获取频道数据吗 谢谢这是一个 您需要使用API V3 结果与snippet { "kind": "youtube#channelListResponse", "etag": "\"gMjDJfS6nsym0T-NKCXAL

我正在我的
iOS
应用程序中使用
Youtube数据Api V3
。有谁能给我举个例子,用名字搜索某个频道的东西

我试着用下面的方法,但它不起作用

{YOUR_API_KEY}&part=snippet&type=channel&q=AnimalPlanetTV

有谁能帮我按名称获取频道数据吗

谢谢

这是一个

您需要使用API V3

结果与
snippet

{
 "kind": "youtube#channelListResponse",
 "etag": "\"gMjDJfS6nsym0T-NKCXALC_u_rM/RKAMAh1QnoE3ilYYcvWIqvcDEZo\"",
 "pageInfo": {
  "totalResults": 1,
  "resultsPerPage": 5
 },
 "items": [
  {

   "kind": "youtube#channel",
   "etag": "\"gMjDJfS6nsym0T-NKCXALC_u_rM/MenmiFqQVVN5JQ9MJpC9gddZ4Lw\"",
   "id": "UCkEBDbzLyH-LbB2FgMoSMaQ",
   "snippet": {
    "title": "Animal Planet",
    "description": "Animal Planet is the world's only entertainment brand that immerses viewers in the full range of life in the animal kingdom with rich, deep content via multiple platforms and offers animal lovers and pet owners access to a centralized online, television and mobile community for immersive, engaging, high-quality entertainment, information and enrichment.",
    "publishedAt": "2007-02-14T18:26:59.000Z",
    "thumbnails": {
     "default": {
      "url": "https://yt3.ggpht.com/-FEsYkupUb-A/AAAAAAAAAAI/AAAAAAAAAAA/6SiqnVvRZJY/s88-c-k-no/photo.jpg"
     },
     "medium": {
      "url": "https://yt3.ggpht.com/-FEsYkupUb-A/AAAAAAAAAAI/AAAAAAAAAAA/6SiqnVvRZJY/s240-c-k-no/photo.jpg"
     },
     "high": {
      "url": "https://yt3.ggpht.com/-FEsYkupUb-A/AAAAAAAAAAI/AAAAAAAAAAA/6SiqnVvRZJY/s240-c-k-no/photo.jpg"
     }
    }
   }
  }
 ]
}

用于搜索任何YouTube频道


这将为您提供准确的搜索名称,但是如果用户想要搜索“car”,并且在那里它假设会显示许多其他搜索结果,那么您将得到多个结果