" publishedAfter" Youtube Data API中的参数无法按预期工作

时间:2017-08-04 18:00:17

标签: youtube google-api

我正在使用以下网址调用Youtube Data API中的端点搜索:

  

https://www.googleapis.com/youtube/v3/search?part=snippet&forMine=true&type=video&publishedAfter=2015-01-10T00:00:00Z&access_token=access_token

然而,当我把"发布后"参数,我得到一个困惑的答案:

{   "error": {
    "errors": [
      {
        "domain": "youtube.search",
        "reason": "invalidSearchFilter",
        "message": "The request contains an invalid combination of search filters and/or restrictions. Note that you must set the <code>type</code> parameter to <code>video</code> if you set a value for the <code>eventType</code>, <code>videoCaption</code>, <code>videoCategoryId</code>, <code>videoDefinition</code>, <code>videoDimension</code>, <code>videoDuration</code>, <code>videoEmbeddable</code>, <code>videoLicense</code>, <code>videoSyndicated</code>, or <code>videoType</code> parameters.",
        "locationType": "parameter",
        "location": ""
      }
    ],
    "code": 400,
    "message": "The request contains an invalid combination of search filters and/or restrictions. Note that you must set the <code>type</code> parameter to <code>video</code> if you set a value for the <code>eventType</code>, <code>videoCaption</code>, <code>videoCategoryId</code>, <code>videoDefinition</code>, <code>videoDimension</code>, <code>videoDuration</code>, <code>videoEmbeddable</code>, <code>videoLicense</code>, <code>videoSyndicated</code>, or <code>videoType</code> parameters."   } }

我已经使用错误消息的参数进行了测试,但调用不起作用。有谁知道为什么会这样?我已经在&#34; publishedAfter&#34;中尝试了不同的日期格式,但都没有。

0 个答案:

没有答案