Enables scripted content fragments to use ratings

Methods

CanCreate

Returns whether the accessing user can rate a given piece of content

Usage

#set($booleanResponse = $core_v2_rating.CanCreate($contentId, $contentTypeId))

Parameters

NameTypeDescriptionRequiredDefaultOptions
contentIdGuidContent IdRequired
contentTypeIdGuidContent Type IdRequired

Return Type

bool

CanDelete

Returns whether the accessing user can delete a rating of a piece of content

Usage

#set($booleanResponse = $core_v2_rating.CanDelete($contentId, $ratingUserId, "%{TypeId = $typeIdArg}"))

Parameters

NameTypeDescriptionRequiredDefaultOptions
contentIdGuidContent IdRequired
ratingUserIdintUser who rated the contentRequired
TypeIdGuidCategorization typeOptional

Return Type

bool

CanDelete

Returns whether the accessing user can delete a rating of a piece of content

Usage

#set($booleanResponse = $core_v2_rating.CanDelete($contentId, $ratingUserId))

Parameters

NameTypeDescriptionRequiredDefaultOptions
contentIdGuidContent IdRequired
ratingUserIdintUser who rated the contentRequired

Return Type

bool

Create

Rates a piece of content for the accessing user

Usage

#set($ratingResponse = $core_v2_rating.Create($contentId, $contentTypeId))

Parameters

NameTypeDescriptionRequiredDefaultOptions
contentIdGuidContent IdRequired
contentTypeIdGuidContent Type IdRequired

Return Type

Rating

Create

Rates a piece of content for the accessing user

Usage

#set($ratingResponse = $core_v2_rating.Create($contentId, $contentTypeId, "%{TypeId = $typeIdArg, Value = $valueArg}"))

Parameters

NameTypeDescriptionRequiredDefaultOptions
contentIdGuidContent IdRequired
contentTypeIdGuidContent Type IdRequired
TypeIdGuidCategorization typeOptional
ValuedoubleValue of the ratingOptional

Return Type

Rating

Delete

Deletes a rating of a piece of content by the accessing user

Usage

#set($additionalInfoResponse = $core_v2_rating.Delete($contentId))

Parameters

NameTypeDescriptionRequiredDefaultOptions
contentIdGuidContent IdRequired

Return Type

AdditionalInfo

Delete

Deletes a rating of a piece of content by the accessing user

Usage

#set($additionalInfoResponse = $core_v2_rating.Delete($contentId, "%{TypeId = $typeIdArg}"))

Parameters

NameTypeDescriptionRequiredDefaultOptions
contentIdGuidContent IdRequired
TypeIdGuidCategorization typeOptional

Return Type

AdditionalInfo

Get

Gets an existing rating for a piece of content by the accessing user

Usage

#set($ratingResponse = $core_v2_rating.Get($contentId))

Parameters

NameTypeDescriptionRequiredDefaultOptions
contentIdGuidContent IdRequired

Return Type

Rating

Get

Gets an existing rating for a piece of content by the accessing user

Usage

#set($ratingResponse = $core_v2_rating.Get($contentId, "%{TypeId = $typeIdArg}"))

Parameters

NameTypeDescriptionRequiredDefaultOptions
contentIdGuidContent IdRequired
TypeIdGuidCategorization typeOptional

Return Type

Rating

List

Lists ratings

Usage

#set($pagedListResponse = $core_v2_rating.List("%{ApplicationId = $applicationIdArg, ContainerId = $containerIdArg, ContentId = $contentIdArg, ContentTypeId = $contentTypeIdArg, ContentUrl = $contentUrlArg, PageIndex = $pageIndexArg, PageSize = $pageSizeArg, SortBy = $sortByArg, SortOrder = $sortOrderArg, TypeId = $typeIdArg, UserId = $userIdArg}"))

Parameters

NameTypeDescriptionRequiredDefaultOptions
ApplicationIdGuidContent application identifierOptional
ContainerIdGuidContent container identifier Optional
ContentIdGuidContent identifierOptional
ContentTypeIdGuidContent type identifierOptional
ContentUrlstringContent urlOptional
PageIndexintSpecify the page number of paged results to return. Zero-based index.Optional0
PageSizeintSpecify the number of results to return per page.Optional20
SortBystringSort mechanismOptionalRatingDate, Rating
SortOrderstringSort orderOptionalAscendingAscending, Descending
TypeIdGuidCategorization typeOptional
UserIdintUser identifierOptional

Return Type

PagedList<Rating>

Supports

Returns whether a content type supports rating

Usage

#set($booleanResponse = $core_v2_rating.Supports($contentTypeId))

Parameters

NameTypeDescriptionRequiredDefaultOptions
contentTypeIdGuidContent Type IdRequired

Return Type

bool