PostUserInfo:list
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
需要授權
擷取貼文和貼文使用者資訊組合的清單,可能會篩選。貼文使用者資訊包含貼文的個別使用者資訊,例如特定使用者的存取權。立即試用。
要求
HTTP 要求
GET https://www.googleapis.com/blogger/v3/users/userId/blogs/blogId/posts
參數
參數名稱 |
值 |
說明 |
必要參數 |
blogId |
string |
要擷取文章的網誌 ID。 |
userId |
string |
要擷取個別使用者資訊的使用者 ID。使用「self」一詞 (不含引號) 或使用者的個人資料 ID。
|
選用參數 |
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,針對即時資料呼叫這個方法,然後查看回應。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-11-30 (世界標準時間)。
[null,null,["上次更新時間: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."]]