当我执行以下 YouTube 数据 API 请求来列出 commentThreads 时,pageInfo/totalResults
未在响应中返回。
我预计pageInfo/totalResults
待退回根据文档 https://developers.google.com/youtube/v3/docs/commentThreads/list#response.
GET https://www.googleapis.com/youtube/v3/commentThreads?part=snippet%2Creplies&videoId=dGidYBqBHVw&key={YOUR_API_KEY}
例如,如果您使用API浏览器 https://developers.google.com/youtube/v3/docs/commentThreads/list#try-it,然后输入:
-
part: 片段、回复
-
videoId:dGidYBqBHVw
响应返回200 OK
与其余数据,但省略pageInfo/totalResults
value:
"pageInfo": {
"resultsPerPage": 20
}
我刚刚尝试了您发布的请求并得到了
{
"kind": "youtube#commentThreadListResponse",
"etag": "\"sGDdEsjSJ_SnACpEvVQ6MtTzkrI/p78HIXZZWNay4CG1YPcS0NCjiOw\"",
"nextPageToken": "Cg0QnNnZ0pTFxwIgACgBEhQIABCI5cnWjcTHAhi4kKTI3bvHAhgCIBQondOJjuX1p_e5AQ==",
"pageInfo": {
"totalResults": 20,
"resultsPerPage": 20
},...
}
好像已经修好了。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)