PostUserInfos:list
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
需要授权
检索帖子和帖子用户信息对的列表,该列表可能经过了过滤。帖子用户信息包含与帖子相关的每位用户的信息,例如特定于用户的访问权限。立即试用。
请求
HTTP 请求
GET https://www.googleapis.com/blogger/v3/users/userId/blogs/blogId/posts
参数
参数名称 |
值 |
说明 |
必需参数 |
blogId |
string |
要从中提取博文的博客的 ID。
|
userId |
string |
要提取的每位用户信息对应的用户 ID。“self”(不带引号)或用户的个人资料标识符。
|
可选参数 |
endDate |
datetime |
要提取的最新帖子日期,采用 RFC 3339 格式的日期时间。
|
fetchBodies |
boolean |
是否要包含帖子的正文内容。默认值为 false 。
(默认值:false )
|
labels |
string |
要搜索的标签的逗号分隔列表。
|
maxResults |
unsigned integer |
要提取的帖子数量上限。
|
orderBy |
string |
应用于搜索结果的排序方式。默认值为 published 。
可接受的值:
- “
published ”:按帖子发布日期排序
- “
updated ”:按帖子上次更新的日期排序
|
pageToken |
string |
用于对大型结果集进行分页的接续令牌。如需获取下一页结果,请将此参数设置为上一个响应中的“nextPageToken”值。
|
startDate |
datetime |
要提取的最早发布日期,采用 RFC 3339 格式的日期时间。
|
status |
string |
可接受的值包括:
- “
draft ”:草稿帖子
- “
live ”:已发布的帖子
- “
scheduled ”:安排在未来发布的帖子。
|
view |
string |
可接受的值包括:
- “
ADMIN ”:管理员级详细信息
- “
AUTHOR ”:作者级详细信息
- “
READER ”:读者级详细信息
|
授权
此请求需要获得以下至少一个范围的授权(详细了解身份验证和授权)。
范围 |
https://www.googleapis.com/auth/blogger |
https://www.googleapis.com/auth/blogger.readonly |
请求正文
使用此方法时请勿提供请求正文。
响应
如果成功,此方法将返回采用以下结构的响应正文:
{
"kind": "blogger#postUserInfosList",
"nextPageToken": string,
"items": [
postUserInfos Resource
]
}
属性名称 |
值 |
说明 |
备注 |
kind |
string |
此实体的种类。始终为 blogger#postList |
|
nextPageToken |
string |
用于提取下一页(如果有)的分页令牌。 |
|
items[] |
list |
此博客的帖子列表,其中包含帖子的用户信息。 |
|
试试看!
使用下面的 API Explorer 对实际数据调用此方法,然后查看响应。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-11-30。
[null,null,["最后更新时间 (UTC):2024-11-30。"],[[["\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."]]