Enables scripted content fragments to use BlogComments

Methods

Create

Create a new blog post comment

Usage

#set($blogCommentResponse = $core_v2_blogComment.Create($blogPostId, $body))

Parameters

NameTypeDescriptionRequiredDefaultOptions
blogPostIdintThe parent blog post id for the comment.Required
bodystringBody of the commentRequired

Return Type

BlogComment

Create

Create a new blog post comment

Usage

#set($blogCommentResponse = $core_v2_blogComment.Create($blogPostId, $body, "%{IsApproved = $isApprovedArg, PublishedDate = $publishedDateArg}"))

Parameters

NameTypeDescriptionRequiredDefaultOptions
blogPostIdintThe parent blog post id for the comment.Required
bodystringBody of the commentRequired
IsApprovedboolWhether the comment should be considered approvedOptionalTrue
PublishedDateDateTimeIf PublishedDate is not specified it will default to the current date/timeOptional

Return Type

BlogComment

Delete

Delete a blog post comment

Usage

#set($additionalInfoResponse = $core_v2_blogComment.Delete($id, $blogId, $blogPostId))

Parameters

NameTypeDescriptionRequiredDefaultOptions
idintId of the blog post commentRequired
blogIdintId of the parent blogRequired
blogPostIdintId of the parent blog postRequired

Return Type

AdditionalInfo

Get

Get a single blog post comment

Usage

#set($blogCommentResponse = $core_v2_blogComment.Get($commentId))

Parameters

NameTypeDescriptionRequiredDefaultOptions
commentIdintId of blog post commentRequired

Return Type

BlogComment

Get

Get a single blog post comment

Usage

#set($blogCommentResponse = $core_v2_blogComment.Get($commentId, "%{BlogId = $blogIdArg, BlogPostId = $blogPostIdArg}"))

Parameters

NameTypeDescriptionRequiredDefaultOptions
commentIdintId of blog post commentRequired
BlogIdintId of blogOptional
BlogPostIdintThe parent blog post id for the comment.Optional

Return Type

BlogComment

List

Lists blog post comments

Usage

#set($pagedListResponse = $core_v2_blogComment.List($blogPostId))

Parameters

NameTypeDescriptionRequiredDefaultOptions
blogPostIdintThe parent blog post id.Required

Return Type

PagedList<BlogComment>

List

Lists blog post comments

Usage

#set($pagedListResponse = $core_v2_blogComment.List($blogPostId, "%{IncludeUnpublished = $includeUnpublishedArg, PageIndex = $pageIndexArg, PageSize = $pageSizeArg, SortBy = $sortByArg, SortOrder = $sortOrderArg}"))

Parameters

NameTypeDescriptionRequiredDefaultOptions
blogPostIdintThe parent blog post id.Required
IncludeUnpublishedbooldefines whether response should include unpublished posts too. Default is published only.OptionalFalse
PageIndexintSpecify the page number of paged results to return. Zero-based index.Optional0
PageSizeintSpecify the number of results to return per page. Max 100Optional20
SortBystringSort ByOptionalMostRecentMostComments, MostRecent, MostViewed
SortOrderstringSort OrderOptionalAscendingAscending, Descending

Return Type

PagedList<BlogComment>

Update

Updates a blog post comment

Usage

#set($blogCommentResponse = $core_v2_blogComment.Update($id, "%{Body = $bodyArg, IsApproved = $isApprovedArg, PublishedDate = $publishedDateArg}"))

Parameters

NameTypeDescriptionRequiredDefaultOptions
idintId of the blog post commentRequired
BodystringBody of the commentOptional
IsApprovedboolWhether the comment should be considered approvedOptionalTrue
PublishedDateDateTimeIf PublishedDate is not specified it will default to the current date/time.Optional

Return Type

BlogComment