帖子
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
重要提示:我们将于 2024 年 9 月 30 日停止支持 v2.0 JSON API。
为了确保功能继续正常运行,请将依赖于 v2.0 JSON API 的应用更新为最新的 API 版本。如需获取最新版本,请使用左侧导航栏中的链接。
资源表示法
“Posts”资源包含博客中帖子的数据和元数据。
{
"kind": "blogger#post",
"id": long,
"blog": {
"id": long
},
"published": datetime,
"updated": datetime,
"url": string,
"selfLink": string,
"title": string,
"content": string,
"author": {
"id": string,
"displayName": string,
"url": string,
"image": {
"url": string
}
},
"replies": {
"totalItems": long,
"selfLink": string
},
"labels": [
string
]
}
属性名称 |
值 |
说明 |
备注 |
kind |
string |
此实体的种类。始终为 blogger#post 。 |
|
id |
long |
此帖子的标识符。 |
|
blog |
object |
包含此帖子的博客的相关数据。 |
|
blog.id |
long |
包含此帖子的博客的标识符。 |
|
published |
datetime |
此帖子的发布日期时间(采用 RFC 3339 格式)。 |
|
updated |
datetime |
上次更新此帖子的 RFC 3339 日期时间。 |
|
url |
string |
显示此帖子的网址。 |
|
selfLink |
string |
用于提取此资源的 API REST 网址。 |
|
title |
string |
帖子的标题。 |
|
content |
string |
帖子的内容。可能包含 HTML 标记。 |
|
author |
object |
此帖子的作者。 |
|
author.id |
string |
帖子创建者的标识符。 |
|
author.displayName |
string |
帖子创作者的显示名称。 |
|
author.url |
string |
帖子创作者的个人资料页面的网址。 |
|
author.image |
object |
帖子创作者的头像。 |
|
author.image.url |
string |
帖子创作者的头像网址。 |
|
replies |
object |
此帖子的评论容器。 |
|
replies.totalItems |
long |
此帖子的评论总数。 |
|
replies.selfLink |
string |
此帖子的评论的网址。 |
|
labels[] |
list |
此帖子添加的标签列表。 |
|
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-12-21。
[null,null,["最后更新时间 (UTC):2024-12-21。"],[[["\u003cp\u003eSupport for the v2.0 JSON API will be discontinued on September 30, 2024, requiring applications to update to the latest API version.\u003c/p\u003e\n"],["\u003cp\u003eThe API allows retrieval of blog posts using the \u003ccode\u003eblogger.posts.list\u003c/code\u003e and \u003ccode\u003eblogger.posts.get\u003c/code\u003e methods, enabling access to post data.\u003c/p\u003e\n"],["\u003cp\u003ePosts contain HTML content and metadata such as title, author information, publication date, and associated labels.\u003c/p\u003e\n"],["\u003cp\u003eThe "Posts Resource" provides a structured representation of a blog post, including details like ID, content, author, and comments.\u003c/p\u003e\n"]]],[],null,["# Posts\n\n**Important**:\nWe will discontinue support for the v2.0 JSON API on September 30th, 2024.\nTo ensure continued functionality, update your applications that rely on the v2.0 JSON API\nto the latest API version. For the latest version, use the links in the left-side navbar.\nPosts contain the HTML content of a blog post.\n\nMethods\n-------\n\nYou can retrieve the list of Posts for a Blog using the [blogger.posts.list](/blogger/docs/2.0/json/reference/posts/list) method, and retrieve an individual Post using the [blogger.posts.get](/blogger/docs/2.0/json/reference/posts/get) method.\n\n[list](/blogger/docs/2.0/json/reference/posts/list)\n: Retrieves a list of posts.\n\n[get](/blogger/docs/2.0/json/reference/posts/get)\n: Retrieves one post by postId.\n\nResource Representations\n------------------------\n\nThe Posts Resource contains the data and metadata for a post in a blog.\n\n```text\n{\n \"kind\": \"blogger#post\",\n \"id\": long,\n \"blog\": {\n \"id\": long\n },\n \"published\": datetime,\n \"updated\": datetime,\n \"url\": string,\n \"selfLink\": string,\n \"title\": string,\n \"content\": string,\n \"author\": {\n \"id\": string,\n \"displayName\": string,\n \"url\": string,\n \"image\": {\n \"url\": string\n }\n },\n \"replies\": {\n \"totalItems\": long,\n \"selfLink\": string\n },\n \"labels\": [\n string\n ]\n}\n```\n\n| Property Name | Value | Description | Notes |\n|----------------------|------------|-----------------------------------------------------|-------|\n| `kind` | `string` | The kind of this entity. Always `blogger#post`. | |\n| `id` | `long` | The identifier of this post. | |\n| `blog` | `object` | Data about the blog containing this post. | |\n| blog.`id` | `long` | The identifier of the blog that contains this post. | |\n| `published` | `datetime` | RFC 3339 date-time when this post was published. | |\n| `updated` | `datetime` | RFC 3339 date-time when this post was last updated. | |\n| `url` | `string` | The URL where this post is displayed. | |\n| `selfLink` | `string` | The API REST URL to fetch this resource from. | |\n| `title` | `string` | The title of the post. | |\n| `content` | `string` | The content of the post. May contain HTML markup. | |\n| `author` | `object` | The author of this post. | |\n| author.`id` | `string` | The identifier of the post creator. | |\n| author.`displayName` | `string` | The post creator's display name. | |\n| author.`url` | `string` | The URL of the post creator's Profile page. | |\n| author.`image` | `object` | The post creator's avatar. | |\n| author.image.`url` | `string` | The post creator's avatar URL. | |\n| `replies` | `object` | The container for this post's comments. | |\n| replies.`totalItems` | `long` | The total number of comments on this post. | |\n| replies.`selfLink` | `string` | The URL of the comments on this post. | |\n| `labels[]` | `list` | The list of labels this post was tagged with. | |"]]