PostUserInfos: danh sách
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Yêu cầu quyền uỷ quyền
Truy xuất danh sách các cặp bài đăng và thông tin người dùng đăng, có thể đã được lọc. Thông tin người dùng của bài đăng chứa thông tin về bài đăng cho mỗi người dùng, chẳng hạn như quyền truy cập dành riêng cho người dùng.
Thử ngay.
Yêu cầu
Yêu cầu HTTP
GET https://www.googleapis.com/blogger/v3/users/userId/blogs/blogId/posts
Tham số
Tên thông số |
Giá trị |
Mô tả |
Tham số bắt buộc |
blogId |
string |
Mã của blog để tìm nạp bài đăng.
|
userId |
string |
Mã nhận dạng của người dùng để tìm nạp thông tin cho mỗi người dùng. Từ "self" (không có dấu ngoặc kép) hoặc giá trị nhận dạng hồ sơ của người dùng.
|
Thông số tuỳ chọn |
endDate |
datetime |
Ngày đăng bài mới nhất để tìm nạp, một ngày-giờ theo định dạng RFC 3339.
|
fetchBodies |
boolean |
Liệu có đưa nội dung của bài đăng vào hay không. Giá trị mặc định là false .
(Mặc định: false )
|
labels |
string |
Danh sách nhãn được phân tách bằng dấu phẩy để tìm kiếm.
|
maxResults |
unsigned integer |
Số lượng bài đăng tối đa cần tìm nạp.
|
orderBy |
string |
Thứ tự sắp xếp áp dụng cho kết quả tìm kiếm. Giá trị mặc định là published .
Các giá trị được chấp nhận là:
- "
published ": Sắp xếp theo ngày đăng bài
- "
updated ": Sắp xếp theo ngày cập nhật gần đây nhất của bài đăng
|
pageToken |
string |
Mã thông báo tiếp tục, dùng để phân trang qua các tập hợp kết quả lớn. Để nhận trang kết quả tiếp theo, hãy đặt tham số này thành giá trị "nextPageToken" trong phản hồi trước đó.
|
startDate |
datetime |
Ngày đăng sớm nhất để tìm nạp, một ngày-giờ theo định dạng RFC 3339.
|
status |
string |
Các giá trị được chấp nhận là:
- "
draft ": Bài đăng nháp
- "
live ": Bài đăng đã xuất bản
- "
scheduled ": Bài đăng được lên lịch xuất bản trong tương lai.
|
view |
string |
Các giá trị được chấp nhận là:
- "
ADMIN ": Thông tin chi tiết ở cấp quản trị
- "
AUTHOR ": Thông tin chi tiết ở cấp tác giả
- "
READER ": Thông tin chi tiết về cấp độ người đọc
|
Ủy quyền
Yêu cầu này yêu cầu uỷ quyền với ít nhất một trong các phạm vi sau (đọc thêm về việc xác thực và uỷ quyền).
Phạm vi |
https://www.googleapis.com/auth/blogger |
https://www.googleapis.com/auth/blogger.readonly |
Nội dung yêu cầu
Không cung cấp nội dung yêu cầu bằng phương thức này.
Phản hồi
Nếu thành công, phương thức này sẽ trả về một nội dung phản hồi có cấu trúc sau:
{
"kind": "blogger#postUserInfosList",
"nextPageToken": string,
"items": [
postUserInfos Resource
]
}
Tên tài sản |
Giá trị |
Mô tả |
Ghi chú |
kind |
string |
Loại thực thể này. Luôn là blogger#postList |
|
nextPageToken |
string |
Mã thông báo phân trang để tìm nạp trang tiếp theo, nếu có. |
|
items[] |
list |
Danh sách Bài đăng có thông tin Người dùng cho bài đăng đó, cho Blog này. |
|
Hãy dùng thử!
Sử dụng Trình khám phá API bên dưới để gọi phương thức này trên dữ liệu trực tiếp và xem phản hồi.
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2024-11-30 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2024-11-30 UTC."],[[["\u003cp\u003eRetrieves a list of posts and user-specific information for those posts from a specified blog.\u003c/p\u003e\n"],["\u003cp\u003eAllows filtering of posts by date, labels, status, and other criteria.\u003c/p\u003e\n"],["\u003cp\u003eRequires authorization with specific scopes for access.\u003c/p\u003e\n"],["\u003cp\u003eReturns paginated results with post and user information.\u003c/p\u003e\n"],["\u003cp\u003eCan be tested using the provided API Explorer.\u003c/p\u003e\n"]]],[],null,["# PostUserInfos: list\n\n**Requires [authorization](#auth)**\n\nRetrieves a list of post and post user info pairs, possibly filtered. The post user info contains per-user information about the post, such as access rights, specific to the user.\n[Try it now](#try-it).\n\nRequest\n-------\n\n### HTTP request\n\n```\nGET https://www.googleapis.com/blogger/v3/users/userId/blogs/blogId/posts\n```\n\n### Parameters\n\n| Parameter name | Value | Description |\n|----------------|--------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| **Required parameters** |||\n| `blogId` | `string` | ID of the blog to fetch posts from. |\n| `userId` | `string` | ID of the user for the per-user information to be fetched. Either the word 'self' (sans quote marks) or the user's profile identifier. |\n| **Optional parameters** |||\n| `endDate` | `datetime` | Latest post date to fetch, a date-time with RFC 3339 formatting. |\n| `fetchBodies` | `boolean` | Whether to include the post's body content. Default is `false`. (Default: `false`) |\n| `labels` | `string` | Comma-separated list of labels to search for. |\n| `maxResults` | `unsigned integer` | Maximum number of posts to fetch. |\n| `orderBy` | `string` | Sort order applied to search results. Default is `published`. \u003cbr /\u003e \u003cbr /\u003e Acceptable values are: - \"`published`\": Order by the date the post was published - \"`updated`\": Order by the date the post was last updated |\n| `pageToken` | `string` | The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of \"nextPageToken\" from the previous response. |\n| `startDate` | `datetime` | Earliest post date to fetch, a date-time with RFC 3339 formatting. |\n| `status` | `string` | Acceptable values are: - \"`draft`\": Draft posts - \"`live`\": Published posts - \"`scheduled`\": Posts that are scheduled to publish in future. |\n| `view` | `string` | Acceptable values are: - \"`ADMIN`\": Admin level detail - \"`AUTHOR`\": Author level detail - \"`READER`\": Reader level detail |\n\n### Authorization\n\nThis request requires authorization with at least one of the following scopes ([read more about authentication and authorization](/blogger/docs/3.0/using#auth)).\n\n| Scope |\n|----------------------------------------------------|\n| `https://www.googleapis.com/auth/blogger` |\n| `https://www.googleapis.com/auth/blogger.readonly` |\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#postUserInfosList\",\n \"nextPageToken\": string,\n \"items\": [\n postUserInfos Resource\n ]\n}\n```\n\n| Property name | Value | Description | Notes |\n|-----------------|----------|----------------------------------------------------------------------|-------|\n| `kind` | `string` | The kind of this entity. Always `blogger#postList` | |\n| `nextPageToken` | `string` | Pagination token to fetch the next page, if one exists. | |\n| `items[]` | `list` | The list of Posts with User information for the post, for this Blog. | |\n\nTry it!\n-------\n\n\nUse the APIs Explorer below to call this method on live data and see the response."]]