Bài đăng
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.
Tài nguyên bài đăng chứa nội dung HTML của một bài đăng trên blog, cùng với siêu dữ liệu của bài đăng.
Để xem danh sách phương thức cho tài nguyên này, hãy xem phần cuối trang này.
Biểu thị tài nguyên
{
"kind": "blogger#post",
"id": string,
"blog": {
"id": string
},
"published": datetime,
"updated": datetime,
"url": string,
"selfLink": string,
"title": string,
"titleLink": string,
"content": string,
"images": [
{
"url": string
}
],
"author": {
"id": string,
"displayName": string,
"url": string,
"image": {
"url": string
}
},
"replies": {
"totalItems": long,
"selfLink": string,
"items": [
comments Resource
]
},
"labels": [
string
],
"location": {
"name": string,
"lat": double,
"lng": double,
"span": string
},
"status": string
}
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#post . |
|
id |
string |
Mã của bài đăng này. |
|
blog |
object |
Dữ liệu về blog chứa bài đăng này. |
|
blog.id |
string |
Mã của blog chứa bài đăng này. |
|
published |
datetime |
RFC 3339 date-time tại thời điểm đăng bài này. |
|
updated |
datetime |
RFC 3339 date-time tại thời điểm bài đăng này được cập nhật gần đây nhất. |
|
url |
string |
URL nơi bài đăng này xuất hiện. |
|
selfLink |
string |
URL của Blogger API để tìm nạp tài nguyên này. |
|
title |
string |
Tiêu đề bài đăng. |
|
content |
string |
Nội dung của bài đăng. Có thể chứa mã đánh dấu HTML. |
|
author |
object |
Tác giả của bài đăng này. |
|
author.id |
string |
Mã nhận dạng của người tạo bài đăng. |
|
author.displayName |
string |
Tên hiển thị của người tạo bài đăng. |
|
author.url |
string |
URL của trang hồ sơ của người tạo bài đăng. |
|
author.image |
object |
Hình đại diện của người tạo bài đăng. |
|
author.image.url |
string |
URL của hình đại diện của người tạo bài đăng. |
|
replies |
object |
Vùng chứa cho các bình luận của bài đăng này. |
|
replies.totalItems |
long |
Tổng số bình luận trên bài đăng này. |
|
replies.selfLink |
string |
URL của Blogger API để truy xuất các bình luận cho bài đăng này. |
|
labels[] |
list |
Danh sách nhãn được gắn cho bài đăng này. |
|
replies.items[] |
list |
Danh sách nhận xét cho bài đăng này. |
|
location |
object |
Vị trí, nếu bài đăng này được gắn thẻ địa lý. |
|
location.name |
string |
Tên địa điểm. |
|
location.lat |
double |
Vĩ độ của vị trí. |
|
location.lng |
double |
Kinh độ của vị trí. |
|
location.span |
string |
Phạm vi khung nhìn của vị trí. Có thể dùng khi kết xuất bản xem trước bản đồ. |
|
titleLink |
string |
URL của đường liên kết tiêu đề, tương tự như đường liên kết liên quan của nguyên tử. |
|
images[] |
list |
Hiển thị hình ảnh cho Bài đăng. |
|
images[].url |
string |
|
|
status |
string |
Trạng thái của bài đăng. Chỉ đặt cho các yêu cầu ở cấp quản trị |
|
Phương thức
Bạn có thể truy xuất danh sách bài đăng của một blog bằng phương thức list và truy xuất một bài đăng riêng lẻ bằng phương thức get.
- list
- Truy xuất danh sách bài đăng.
- get
- Truy xuất một bài đăng theo mã bài đăng.
- search
- Tìm kiếm một bài đăng khớp với các cụm từ truy vấn đã cho.
- chèn
- Thêm bài đăng.
- xóa
- Xoá một bài đăng theo mã nhận dạng.
- getByPath
- Truy xuất bài đăng theo đường dẫn.
- bản vá
- Cập nhật bài đăng. Phương thức này hỗ trợ ngữ nghĩa bản vá.
- update
- Cập nhật bài đăng.
- phát hành
- Xuất bản bài đăng nháp.
- huỷ bỏ
- Huỷ bỏ trạng thái xuất bản hoặc lên lịch của một bài đăng để chuyển về trạng thái bản nháp. Thao tác này sẽ xoá bài đăng khỏi nội dung có thể xem công khai.
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: 2025-05-15 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-05-15 UTC."],[[["\u003cp\u003eA posts resource stores a blog post's HTML content and metadata, such as title, author, and publication date.\u003c/p\u003e\n"],["\u003cp\u003eThe resource representation includes details like post ID, blog ID, content, author information, comments, labels, and location.\u003c/p\u003e\n"],["\u003cp\u003eYou can manage posts using various methods: list to retrieve multiple posts, get to retrieve a specific post by ID, and others for searching, inserting, deleting, updating, and publishing.\u003c/p\u003e\n"],["\u003cp\u003ePosts can include custom metadata and images, along with details about the post's location if it is geotagged.\u003c/p\u003e\n"]]],[],null,["# Posts\n\nA posts resource contain the HTML content of a blog post, along with post metadata.\n\nFor a list of [methods](#methods) for this resource, see the end of this page.\n\nResource representations\n------------------------\n\n\u003cbr /\u003e\n\n```objective-c\n{\n \"kind\": \"blogger#post\",\n \"id\": string,\n \"blog\": {\n \"id\": string\n },\n \"published\": datetime,\n \"updated\": datetime,\n \"url\": string,\n \"selfLink\": string,\n \"title\": string,\n \"titleLink\": string,\n \"content\": string,\n \"images\": [\n {\n \"url\": string\n }\n ],\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 \"items\": [\n comments Resource\n ]\n },\n \"labels\": [\n string\n ],\n \"location\": {\n \"name\": string,\n \"lat\": double,\n \"lng\": double,\n \"span\": string\n },\n \"status\": string\n}\n```\n\n| Property name | Value | Description | Notes |\n|----------------------|------------|----------------------------------------------------------------------------------------------|-------|\n| `kind` | `string` | The kind of this entity. Always `blogger#post`. | |\n| `id` | `string` | The ID of this post. | |\n| `blog` | `object` | Data about the blog containing this post. | |\n| blog.`id` | `string` | The ID of the blog that contains this post. | |\n| `published` | `datetime` | [RFC 3339](http://www.ietf.org/rfc/rfc3339.txt) `date-time` when this post was published. | |\n| `updated` | `datetime` | [RFC 3339](http://www.ietf.org/rfc/rfc3339.txt) `date-time` when this post was last updated. | |\n| `url` | `string` | The URL where this post is displayed. | |\n| `selfLink` | `string` | The Blogger API URL to fetch this resource from. | |\n| `title` | `string` | The title of the post. | |\n| `content` | `string` | The content of the post. Can contain HTML markup. | |\n| `author` | `object` | The author of this post. | |\n| author.`id` | `string` | The ID 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 Blogger API URL of to retrieve the comments for this post. | |\n| `labels[]` | `list` | The list of labels this post was tagged with. | |\n| replies.`items[]` | `list` | The list of comments for this post. | |\n| `location` | `object` | The location, if this post is geotagged. | |\n| location.`name` | `string` | Location name. | |\n| location.`lat` | `double` | Location's latitude. | |\n| location.`lng` | `double` | Location's longitude. | |\n| location.`span` | `string` | Location's viewport span. Can be used when rendering a map preview. | |\n| `titleLink` | `string` | The title link URL, similar to atom's related link. | |\n| `images[]` | `list` | Display image for the Post. | |\n| images[].`url` | `string` | | |\n| `status` | `string` | Status of the post. Only set for admin-level requests | |\n\nMethods\n-------\n\nYou can retrieve the list of posts for a blog using the [list](/blogger/docs/3.0/reference/posts/list) method, and retrieve an individual post using the [get](/blogger/docs/3.0/reference/posts/get) method.\n\n[list](/blogger/docs/3.0/reference/posts/list)\n: Retrieves a list of posts.\n\n[get](/blogger/docs/3.0/reference/posts/get)\n: Retrieves one post by post ID.\n\n[search](/blogger/docs/3.0/reference/posts/search)\n: Searches for a post that matches the given query terms.\n\n[insert](/blogger/docs/3.0/reference/posts/insert)\n: Adds a post.\n\n[delete](/blogger/docs/3.0/reference/posts/delete)\n: Deletes a post by ID.\n\n[getByPath](/blogger/docs/3.0/reference/posts/getByPath)\n: Retrieves a post by path.\n\n[patch](/blogger/docs/3.0/reference/posts/patch)\n: Updates a post. This method supports [patch semantics](/blogger/docs/3.0/performance).\n\n[update](/blogger/docs/3.0/reference/posts/update)\n: Updates a post.\n\n[publish](/blogger/docs/3.0/reference/posts/publish)\n: Publish a draft post.\n\n[revert](/blogger/docs/3.0/reference/posts/revert)\n: Revert a published or scheduled post to draft state, which removes the post from the publicly viewable content."]]