Enables scripted content fragments to use Comments
Methods
AllowsComments
Checks if comment on the content
Usage
#set($booleanResponse = $core_v2_comments.AllowsComments($contentId, $contentTypeId))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentId | Guid | Content Id | Required | ||
contentTypeId | Guid | Content Type Id | Required |
Return Type
bool
CanCreateComment
Checks if the user can create a comment on the content
Usage
#set($booleanResponse = $core_v2_comments.CanCreateComment($contentId, $contentTypeId))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentId | Guid | Content Id | Required | ||
contentTypeId | Guid | Content Type Id | Required |
Return Type
bool
CanCreateComment
Checks if the user can create a comment on external content
Usage
#set($booleanResponse = $core_v2_comments.CanCreateComment($contentUrl, $oauthClientId))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentUrl | string | The URL at which this content can be accessed. | Required | ||
oauthClientId | Guid | OAuth client ID containing this external content. | Required |
Return Type
bool
CanDeleteComment
Checks if the user can delete a comment
Usage
#set($booleanResponse = $core_v2_comments.CanDeleteComment($commentId))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
commentId | Guid | Comment Id | Required |
Return Type
bool
CanModifyComment
Checks if the user can modify a comment
Usage
#set($booleanResponse = $core_v2_comments.CanModifyComment($commentId))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
commentId | Guid | Comment Id | Required |
Return Type
bool
Create
Create a comment on a piece of content
Usage
#set($commentResponse = $core_v2_comments.Create($contentId, $contentTypeId, $comment, "%{CommentType = $commentTypeArg, CreatedDate = $createdDateArg, IPAddress = $iPAddressArg, IsApproved = $isApprovedArg, ParentCommentId = $parentCommentIdArg, SortOrder = $sortOrderArg, Url = $urlArg}"))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentId | Guid | Content Id | Required | ||
contentTypeId | Guid | Content Type Id | Required | ||
comment | string | Comment | Required | ||
CommentType | Guid | Comment Type | Optional | ||
CreatedDate | DateTime | Created Date | Optional | Current Date/Time | |
IPAddress | string | I P Address | Optional | ||
IsApproved | bool | Is Approved | Optional | True | |
ParentCommentId | Guid | Parent Comment Id | Optional | ||
SortOrder | int | Sort Order | Optional | ||
Url | string | Url | Optional |
Return Type
Create
Create a comment on external content
Usage
#set($commentResponse = $core_v2_comments.Create($contentUrl, $oauthClientId, $comment, "%{CommentType = $commentTypeArg, CreatedDate = $createdDateArg, ExtendedAttributes = $extendedAttributesArg, IPAddress = $iPAddressArg, IsApproved = $isApprovedArg, ParentCommentId = $parentCommentIdArg, SortOrder = $sortOrderArg, Url = $urlArg}"))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentUrl | string | The URL at which this content can be accessed. | Required | ||
oauthClientId | Guid | OAuth client ID containing this external content. | Required | ||
comment | string | Comment | Required | ||
CommentType | Guid | Comment Type | Optional | ||
CreatedDate | DateTime | Created Date | Optional | Current Date/Time | |
ExtendedAttributes | string | Extended attributes are key-value pairs set using the syntax _ExtendedAttributes_key=value. i.e. _ExtendedAttributes_MyKey=MyValue sets ExtendedAttributes["MyKey"] to "MyValue". | Optional | ||
IPAddress | string | I P Address | Optional | ||
IsApproved | bool | Is Approved | Optional | True | |
ParentCommentId | Guid | Parent Comment Id | Optional | ||
SortOrder | int | Sort Order | Optional | ||
Url | string | Url | Optional |
Return Type
Delete
Deletes a comment
Usage
#set($additionalInfoResponse = $core_v2_comments.Delete($commentId))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
commentId | Guid | Comment Id | Required |
Return Type
Get
Gets a single comment
Usage
#set($commentResponse = $core_v2_comments.Get($commentId))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
commentId | Guid | Comment Id | Required |
Return Type
List
Lists comments
Usage
#set($pagedListResponse = $core_v2_comments.List("%{ApplicationId = $applicationIdArg, CommentIds = $commentIdsArg, CommentType = $commentTypeArg, ContainerId = $containerIdArg, ContentId = $contentIdArg, ContentTypeId = $contentTypeIdArg, ContentUrl = $contentUrlArg, IncludeChildren = $includeChildrenArg, IncludeSubContainers = $includeSubContainersArg, IsApproved = $isApprovedArg, IsFeatured = $isFeaturedArg, PageIndex = $pageIndexArg, PageSize = $pageSizeArg, ParentCommentId = $parentCommentIdArg, SortBy = $sortByArg, SortOrder = $sortOrderArg, UserId = $userIdArg}"))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
ApplicationId | Guid | Application Id | Optional | ||
CommentIds | string | Comma separated list of Comment Ids. Used to filter comments and sort order if SoryBy is set to CommentIdsOrder | Optional | ||
CommentType | Guid | Comment Type | Optional | ||
ContainerId | Guid | Container Id | Optional | ||
ContentId | Guid | Content Id | Optional | ||
ContentTypeId | Guid | Content Type Id | Optional | ||
ContentUrl | string | Content Url | Optional | ||
IncludeChildren | bool | Include Children | Optional | ||
IncludeSubContainers | bool | Include sub containers | Optional | ||
IsApproved | bool | Is Approved | Optional | ||
IsFeatured | bool | Is Featured | Optional | ||
PageIndex | int | Specify the page number of paged results to return. Zero-based index. | Optional | 0 | |
PageSize | int | Specify the number of results to return per page. | Optional | 20 | |
ParentCommentId | Guid | Parent Comment Id | Optional | ||
SortBy | string | Sort By | Optional | ApplicationId, Body, CommentId, CommentIdsOrder, CommentTypeId, ContainerId, ContentId, ContentTypeId, CreatedUserId, CreatedUtcDate, FormattedBody, IpAddress, IsApproved, IsFeatured, IsIndexed, LastUpdatedUserId, LastUpdatedUtcDate, NodeId, ParentCommentId, Score:SCORE_ID, SortOrder | |
SortOrder | string | Sort Order | Optional | Ascending | Ascending, Descending |
UserId | int | User Id | Optional |
Return Type
SupportsComments
Checks if comments are supported for the content type
Usage
#set($booleanResponse = $core_v2_comments.SupportsComments($contentTypeId))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentTypeId | Guid | Content Type Id | Required |
Return Type
bool
Update
Update an existing comment
Usage
#set($commentResponse = $core_v2_comments.Update($commentId, $comment, "%{CommentType = $commentTypeArg, CreatedDate = $createdDateArg, ExtendedAttributes = $extendedAttributesArg, IsApproved = $isApprovedArg, IsFeatured = $isFeaturedArg, SortOrder = $sortOrderArg}"))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
commentId | Guid | Comment Id | Required | ||
comment | string | Comment | Required | ||
CommentType | Guid | Comment Type | Optional | ||
CreatedDate | DateTime | Created Date | Optional | ||
ExtendedAttributes | string | Extended attributes are key-value pairs set using the syntax _ExtendedAttributes_key=value. i.e. _ExtendedAttributes_MyKey=MyValue sets ExtendedAttributes["MyKey"] to "MyValue". | Optional | ||
IsApproved | bool | Is Approved | Optional | ||
IsFeatured | bool | Is Featured | Optional | ||
SortOrder | int | Sort Order | Optional |