Appearance
Operations on comments.
Get a comment by ID.
comment, err := client.Comments().Get(ctx, blogId, postId, commentId)
Path Parameters:
blogId
postId
commentId
List comments for a post.
comments, err := client.Comments().List(ctx, blogId, postId, blogger.WithMaxResults(10), blogger.WithStatus(blogger.CommentStatusLive), )
Query Parameters:
maxResults
pageToken
status
startDate
endDate
fetchBodies
view
List all comments for a blog.
comments, err := client.Comments().ListByBlog(ctx, blogId, blogger.WithCommentPost(postId), // Optional: filter to single post )
Approve a pending comment.
comment, err := client.Comments().Approve(ctx, blogId, postId, commentId)
Delete a comment.
err := client.Comments().Delete(ctx, blogId, postId, commentId)
Mark a comment as spam.
comment, err := client.Comments().MarkAsSpam(ctx, blogId, postId, commentId)
Remove comment content while keeping the comment.
comment, err := client.Comments().RemoveContent(ctx, blogId, postId, commentId)
// List comments comments, err := client.Comments().List(ctx, blogId, postId, blogger.WithMaxResults(10), blogger.WithStatus(blogger.CommentStatusPending), )
Comments Resource
Operations on comments.
Methods
Get
Get a comment by ID.
Path Parameters:
blogId— Blog IDpostId— Post IDcommentId— Comment IDList
List comments for a post.
Query Parameters:
maxResults— Max results per pagepageToken— Pagination tokenstatus— Filter by statusstartDate— Start date filterendDate— End date filterfetchBodies— Include comment bodiesview— Access levelListByBlog
List all comments for a blog.
Approve
Approve a pending comment.
Delete
Delete a comment.
MarkAsSpam
Mark a comment as spam.
RemoveContent
Remove comment content while keeping the comment.
Example