留言: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,針對即時資料呼叫這個方法,然後查看回應。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-06-26 (世界標準時間)。
[null,null,["上次更新時間: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."]]