评论:listByBlog
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
检索博客的所有帖子评论,可能是过滤后的。立即尝试。
请求
HTTP 请求
GET https://www.googleapis.com/blogger/v3/blogs/blogId/comments
参数
参数名称 |
价值 |
说明 |
必需参数 |
blogId |
string |
要从中提取评论的博客的 ID。
|
可选参数 |
endDate |
datetime |
要提取评论的最新日期,即采用 RFC 3339 格式的日期时间。
|
fetchBodies |
boolean |
是否包含评论的正文内容。
|
maxResults |
unsigned integer |
结果中可包含的评论数量上限。
|
pageToken |
string |
请求已分页时的延续令牌。
|
startDate |
datetime |
要提取评论的最早日期,采用 RFC 3339 格式的日期时间。
|
请求正文
使用此方法时请勿提供请求正文。
响应
如果成功,此方法将返回采用以下结构的响应正文:
{
"kind": "blogger#commentList",
"nextPageToken": string,
"prevPageToken": string,
"items": [
comments Resource
]
}
属性名称 |
价值 |
说明 |
备注 |
kind |
string |
此条目的类型。始终为 blogger#commentList |
|
nextPageToken |
string |
用于提取下一页的分页令牌(如果存在)。 |
|
prevPageToken |
string |
用于获取上一页的分页令牌(如果存在)。 |
|
items[] |
list |
帖子的评论列表。 |
|
试试看!
请使用下面的 API Explorer 针对实际数据调用此方法并查看响应。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-06-26。
[null,null,["最后更新时间 (UTC):2024-06-26。"],[[["\u003cp\u003eRetrieves all comments for a specified blog, optionally filtered by date and other criteria.\u003c/p\u003e\n"],["\u003cp\u003eRequest parameters include \u003ccode\u003eblogId\u003c/code\u003e (required), and optional filters like \u003ccode\u003eendDate\u003c/code\u003e, \u003ccode\u003efetchBodies\u003c/code\u003e, \u003ccode\u003emaxResults\u003c/code\u003e, \u003ccode\u003epageToken\u003c/code\u003e, and \u003ccode\u003estartDate\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe response provides a list of comments, along with pagination tokens (\u003ccode\u003enextPageToken\u003c/code\u003e, \u003ccode\u003eprevPageToken\u003c/code\u003e) for navigating through results.\u003c/p\u003e\n"],["\u003cp\u003eThis method uses an HTTP GET request to the endpoint \u003ccode\u003ehttps://www.googleapis.com/blogger/v3/blogs/blogId/comments\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Comments: listByBlog\n\nRetrieves the comments for a blog, across all posts, possibly filtered.\n[Try it now](#try-it).\n\nRequest\n-------\n\n### HTTP request\n\n```\nGET https://www.googleapis.com/blogger/v3/blogs/blogId/comments\n```\n\n### Parameters\n\n| Parameter name | Value | Description |\n|----------------|--------------------|--------------------------------------------------------------------------|\n| **Required parameters** |||\n| `blogId` | `string` | ID of the blog to fetch comments from. |\n| **Optional parameters** |||\n| `endDate` | `datetime` | Latest date of comment to fetch, a date-time with RFC 3339 formatting. |\n| `fetchBodies` | `boolean` | Whether the body content of the comments is included. |\n| `maxResults` | `unsigned integer` | Maximum number of comments to include in the result. |\n| `pageToken` | `string` | Continuation token if request is paged. |\n| `startDate` | `datetime` | Earliest date of comment to fetch, a date-time with RFC 3339 formatting. |\n\n### Request body\n\nDo not supply a request body with this method.\n\nResponse\n--------\n\nIf successful, this method returns a response body with the following structure:\n\n```objective-c\n{\n \"kind\": \"blogger#commentList\",\n \"nextPageToken\": string,\n \"prevPageToken\": string,\n \"items\": [\n comments Resource\n ]\n}\n```\n\n| Property name | Value | Description | Notes |\n|-----------------|----------|-------------------------------------------------------------|-------|\n| `kind` | `string` | The kind of this entry. Always `blogger#commentList` | |\n| `nextPageToken` | `string` | Pagination token to fetch the next page, if one exists. | |\n| `prevPageToken` | `string` | Pagination token to fetch the previous page, if one exists. | |\n| `items[]` | `list` | The List of Comments for a Post. | |\n\nTry it!\n-------\n\n\nUse the APIs Explorer below to call this method on live data and see the response."]]