YouTube数据API V3 - 评论线程请求不返回结果总计数 [英] YouTube Data API v3 - Comment threads request doesn't return count of total results

查看:402
本文介绍了YouTube数据API V3 - 评论线程请求不返回结果总计数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我执行以下YouTube数据API请求,要求列commentThreads, pageInfo /使用totalResults 不是在响应中返回。

我期待 pageInfo /使用totalResults 要返回的相对=nofollow>。

  GET https://www.googleapis.com/youtube/v3/commentThreads?part=snippet%2Creplies&videoId=dGidYBqBHVw&key={YOUR_API_KEY}

例如,如果您使用 API浏览器,然后输入:


  • 部分:片段,回复

  • VIDEOID :dGidYBqBHVw

响应返回 200 OK 与数据的其余部分,但省略了 pageInfo /使用totalResults 值:

 pageInfo:{
  resultsPerPage:20
}


解决方案

我也厌倦了它。这对我的作品。 YouTube或谷歌通常会改变其API的格式或数据结构。这也不是什么大事情。

When I perform the following YouTube Data API request to list commentThreads, pageInfo/totalResults isn't returned in the response.

I expect pageInfo/totalResults to be returned per the documentation.

GET https://www.googleapis.com/youtube/v3/commentThreads?part=snippet%2Creplies&videoId=dGidYBqBHVw&key={YOUR_API_KEY}

For example, if you use the API Explorer, and enter:

  • part: snippet,replies
  • videoId: dGidYBqBHVw

The response returns 200 OK with the rest of the data, but omits the pageInfo/totalResults value:

"pageInfo": {
  "resultsPerPage": 20
} 

解决方案

I have also tired for it. It works for me. Youtube or Google usually change their apis format or data structures. It is not a big thing.

这篇关于YouTube数据API V3 - 评论线程请求不返回结果总计数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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