Appearance
type CommentsService struct{ ... } func NewCommentsService(client builder.TransportProvider) *CommentsService
Access via client.Comments().
client.Comments()
func (s *CommentsService) Get(ctx context.Context, blogId, postId, commentId string) (*schemas.Comment, error)
GET /v3/blogs/{blogId}/posts/{postId}/comments/{commentId}
func (s *CommentsService) List(ctx context.Context, blogId, postId string, opts ...CommentListOption) (*schemas.CommentList, error)
GET /v3/blogs/{blogId}/posts/{postId}/comments
func (s *CommentsService) ListByBlog(ctx context.Context, blogId string, opts ...CommentListOption) (*schemas.CommentList, error)
GET /v3/blogs/{blogId}/comments
func (s *CommentsService) Approve(ctx context.Context, blogId, postId, commentId string) (*schemas.Comment, error)
POST .../comments/{commentId}/approve
func (s *CommentsService) Delete(ctx context.Context, blogId, postId, commentId string) error
DELETE /v3/blogs/{blogId}/posts/{postId}/comments/{commentId}
func (s *CommentsService) MarkAsSpam(ctx context.Context, blogId, postId, commentId string) (*schemas.Comment, error)
POST .../comments/{commentId}/spam
func (s *CommentsService) RemoveContent(ctx context.Context, blogId, postId, commentId string) (*schemas.Comment, error)
POST .../comments/{commentId}/removecontent
type CommentListOption func(*builder.Builder)
WithCommentPageToken(t)
pageToken
WithCommentMaxResults(n)
maxResults
WithCommentStatus(s)
status
LIVE
EMPTIED
PENDING
SPAM
WithCommentView(v)
view
WithCommentStartDate(d)
startDate
WithCommentEndDate(d)
endDate
WithCommentFetchBodies(b)
fetchBodies
WithCommentPost(id)
post
Comments Service
Access via
client.Comments().Methods
Get
GET /v3/blogs/{blogId}/posts/{postId}/comments/{commentId}List
GET /v3/blogs/{blogId}/posts/{postId}/commentsListByBlog
GET /v3/blogs/{blogId}/commentsApprove
POST .../comments/{commentId}/approveDelete
DELETE /v3/blogs/{blogId}/posts/{postId}/comments/{commentId}MarkAsSpam
POST .../comments/{commentId}/spamRemoveContent
POST .../comments/{commentId}/removecontentOptions
WithCommentPageToken(t)pageTokenWithCommentMaxResults(n)maxResultsWithCommentStatus(s)statusLIVE,EMPTIED,PENDING,SPAMWithCommentView(v)viewWithCommentStartDate(d)startDateWithCommentEndDate(d)endDateWithCommentFetchBodies(b)fetchBodiesWithCommentPost(id)post