评论

帖子资源的评论。

有关此类资源的方法列表,请参阅本页面的结尾部分。

资源表示法

{
  "kind": "blogger#comment",
  "status": string,
  "id": string,
  "inReplyTo": {
    "id": string
  },
  "post": {
    "id": string
  },
  "blog": {
    "id": string
  },
  "published": datetime,
  "updated": datetime,
  "selfLink": string,
  "content": string,
  "author": {
    "id": string,
    "displayName": string,
    "url": string,
    "image": {
      "url": string
    }
  }
}
属性名称 说明 备注
kind string 相应资源的类型。始终为 blogger#comment
id string 相应资源的 ID。
post object 包含相应评论的帖子的相关数据。
post.id string 包含相应评论的帖子的标识符。
blog object 包含相应评论的博客的相关数据。
blog.id string 包含相应评论的博客的标识符。
published datetime RFC 3339 date-time 格式的相应评论的发布日期和时间,例如“2012-04-15T19:38:01-07:00”。
updated datetime RFC 3339 date-time 格式的相应评论的上次更新时间,例如“2012-04-15T19:43:21-07:00”
content string 评论的内容,可以包含 HTML 标记。
author object 相应评论的作者。
author.id string 评论创建者的标识符。
author.displayName string 评论创建者的显示名称。
author.url string 评论者的个人资料页面的网址。
author.image object 创作者头像网址的容器。
author.image.url string 评论者的头像图片的网址。
inReplyTo object 此回复所回复的评论的相关数据。
inReplyTo.id string 相应评论的父级评论的 ID。
status string 评论的状态。只有对博客拥有管理权限的用户才能看到此状态。

方法

如需检索帖子的评论列表,请使用 list 方法。如需检索单个评论,请使用 get 方法。

list
检索帖子评论列表。
get
根据 commentId 检索一条评论资源。
approve
将评论标记为非垃圾评论。
delete
按 ID 删除评论。
listByBlog
检索博客中所有帖子的评论,检索到的可能是经过了过滤的评论。
markAsSpam
将评论标记为垃圾评论。这会将评论的状态设置为 spam,并在默认评论呈现中隐藏该评论。
removeContent
移除评论的内容。