Methods
CanCreate
Returns whether the accessing user can rate a given piece of content
Usage
#set($booleanResponse = $core_v2_rating.CanCreate($contentId, $contentTypeId))
Parameters
| Name | Type | Description | Required | Default | Options |
|---|
| contentId | Guid | Content Id | Required | | |
| contentTypeId | Guid | Content Type Id | Required | | |
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
| Name | Type | Description | Required | Default | Options |
|---|
| contentId | Guid | Content Id | Required | | |
| ratingUserId | int | User who rated the content | Required | | |
| TypeId | Guid | Categorization type | Optional | | |
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
| Name | Type | Description | Required | Default | Options |
|---|
| contentId | Guid | Content Id | Required | | |
| ratingUserId | int | User who rated the content | Required | | |
Return Type
bool
Create
Rates a piece of content for the accessing user
Usage
#set($ratingResponse = $core_v2_rating.Create($contentId, $contentTypeId))
Parameters
| Name | Type | Description | Required | Default | Options |
|---|
| contentId | Guid | Content Id | Required | | |
| contentTypeId | Guid | Content Type Id | Required | | |
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
| Name | Type | Description | Required | Default | Options |
|---|
| contentId | Guid | Content Id | Required | | |
| contentTypeId | Guid | Content Type Id | Required | | |
| TypeId | Guid | Categorization type | Optional | | |
| Value | double | Value of the rating | Optional | | |
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
| Name | Type | Description | Required | Default | Options |
|---|
| contentId | Guid | Content Id | Required | | |
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
| Name | Type | Description | Required | Default | Options |
|---|
| contentId | Guid | Content Id | Required | | |
| TypeId | Guid | Categorization type | Optional | | |
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
| Name | Type | Description | Required | Default | Options |
|---|
| contentId | Guid | Content Id | Required | | |
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
| Name | Type | Description | Required | Default | Options |
|---|
| contentId | Guid | Content Id | Required | | |
| TypeId | Guid | Categorization type | Optional | | |
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
| Name | Type | Description | Required | Default | Options |
|---|
| ApplicationId | Guid | Content application identifier | Optional | | |
| ContainerId | Guid | Content container identifier | Optional | | |
| ContentId | Guid | Content identifier | Optional | | |
| ContentTypeId | Guid | Content type identifier | Optional | | |
| ContentUrl | string | Content url | 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 | |
| SortBy | string | Sort mechanism | Optional | Rating | Date, Rating |
| SortOrder | string | Sort order | Optional | Ascending | Ascending, Descending |
| TypeId | Guid | Categorization type | Optional | | |
| UserId | int | User identifier | Optional | | |
Return Type
PagedList<Rating>
Supports
Returns whether a content type supports rating
Usage
#set($booleanResponse = $core_v2_rating.Supports($contentTypeId))
Parameters
| Name | Type | Description | Required | Default | Options |
|---|
| contentTypeId | Guid | Content Type Id | Required | | |
Return Type
bool