Enables scripted content fragments to use ratings
Methods
CanCreate
CanCreate Overload 1
Returns whether the accessing user can rate a given piece of content
Velocity
#set($booleanResponse = $core_v2_rating.CanCreate($contentId, $contentTypeId))
JavaScript
var 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 |
CanCreate Overload 2
Returns whether the accessing user can rate a given piece of external content
Velocity
#set($booleanResponse = $core_v2_rating.CanCreate($contentUrl, $oauthClientId))
JavaScript
var booleanResponse = core_v2_rating.CanCreate(contentUrl, oauthClientId);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentUrl | String | Content Url | Required | ||
oauthClientId | Guid | Oauth Client Id | Required |
Returns
Boolean
CanDelete
CanDelete Overload 1
Returns whether the accessing user can delete a rating of a piece of content
Velocity
#set($booleanResponse = $core_v2_rating.CanDelete($contentId, $ratingUserId, "%{ TypeId = $typeIdArg }"))
JavaScript
var booleanResponse = core_v2_rating.CanDelete(contentId, ratingUserId, { TypeId: typeIdArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentId | Guid | Content Id | Required | ||
ratingUserId | Int32 | User who rated the content | Required | ||
options | Options | Set of optional parameters including: | Required | ||
TypeId | Guid | Categorization type | Optional |
CanDelete Overload 2
Returns whether the accessing user can delete a rating of a piece of content
Velocity
#set($booleanResponse = $core_v2_rating.CanDelete($contentId, $ratingUserId))
JavaScript
var booleanResponse = core_v2_rating.CanDelete(contentId, ratingUserId);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentId | Guid | Content Id | Required | ||
ratingUserId | Int32 | User who rated the content | Required |
CanDelete Overload 3
Returns whether the accessing user can delete a rating of a piece of external content
Velocity
#set($booleanResponse = $core_v2_rating.CanDelete($contentUrl, $oauthClientId, $ratingUserId))
JavaScript
var booleanResponse = core_v2_rating.CanDelete(contentUrl, oauthClientId, ratingUserId);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentUrl | String | Content Url | Required | ||
oauthClientId | Guid | Oauth Client Id | Required | ||
ratingUserId | Int32 | User who rated the content | Required |
CanDelete Overload 4
Returns whether the accessing user can delete a rating of a piece of external content
Velocity
#set($booleanResponse = $core_v2_rating.CanDelete($contentUrl, $oauthClientId, $ratingUserId, "%{ TypeId = $typeIdArg }"))
JavaScript
var booleanResponse = core_v2_rating.CanDelete(contentUrl, oauthClientId, ratingUserId, { TypeId: typeIdArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentUrl | String | Content Url | Required | ||
oauthClientId | Guid | Oauth Client Id | Required | ||
ratingUserId | Int32 | User who rated the content | Required | ||
options | Options | Set of optional parameters including: | Required | ||
TypeId | Guid | Categorization type | Optional |
Returns
Boolean
Create
Create Overload 1
Rates a piece of content for the accessing user
Velocity
#set($ratingResponse = $core_v2_rating.Create($contentId, $contentTypeId))
JavaScript
var 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 |
Create Overload 2
Rates a piece of content for the accessing user
Velocity
#set($ratingResponse = $core_v2_rating.Create($contentId, $contentTypeId, "%{ TypeId = $typeIdArg, Value = $valueArg }"))
JavaScript
var 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 | ||
options | Options | Set of optional parameters including: | Required | ||
TypeId | Guid | Categorization type | Optional | ||
Value | Double | Value of the rating | Optional |
Create Overload 3
Rates a piece of content for the accessing user
Velocity
#set($ratingResponse = $core_v2_rating.Create($contentUrl, $oauthClientId))
JavaScript
var ratingResponse = core_v2_rating.Create(contentUrl, oauthClientId);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentUrl | String | Content Url | Required | ||
oauthClientId | Guid | Oauth Client Id | Required |
Create Overload 4
Rates a piece of content for the accessing user
Velocity
#set($ratingResponse = $core_v2_rating.Create($contentUrl, $oauthClientId, "%{ TypeId = $typeIdArg, Value = $valueArg }"))
JavaScript
var ratingResponse = core_v2_rating.Create(contentUrl, oauthClientId, { TypeId: typeIdArg, Value: valueArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentUrl | String | Content Url | Required | ||
oauthClientId | Guid | Oauth Client Id | Required | ||
options | Options | Set of optional parameters including: | Required | ||
TypeId | Guid | Categorization type | Optional | ||
Value | Double | Value of the rating | Optional |
Returns
Delete
Delete Overload 1
Deletes a rating of a piece of content by the accessing user
Velocity
#set($additionalInfoResponse = $core_v2_rating.Delete($contentId))
JavaScript
var additionalInfoResponse = core_v2_rating.Delete(contentId);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentId | Guid | Content Id | Required |
Delete Overload 2
Deletes a rating of a piece of content by the accessing user
Velocity
#set($additionalInfoResponse = $core_v2_rating.Delete($contentId, "%{ TypeId = $typeIdArg }"))
JavaScript
var additionalInfoResponse = core_v2_rating.Delete(contentId, { TypeId: typeIdArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentId | Guid | Content Id | Required | ||
options | Options | Set of optional parameters including: | Required | ||
TypeId | Guid | Categorization type | Optional |
Delete Overload 3
Deletes a rating of a piece of content by the accessing user
Velocity
#set($additionalInfoResponse = $core_v2_rating.Delete($contentUrl, $oauthClientId))
JavaScript
var additionalInfoResponse = core_v2_rating.Delete(contentUrl, oauthClientId);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentUrl | String | Content Url | Required | ||
oauthClientId | Guid | Oauth Client Id | Required |
Delete Overload 4
Deletes a rating of a piece of content by the accessing user
Velocity
#set($additionalInfoResponse = $core_v2_rating.Delete($contentUrl, $oauthClientId, "%{ TypeId = $typeIdArg }"))
JavaScript
var additionalInfoResponse = core_v2_rating.Delete(contentUrl, oauthClientId, { TypeId: typeIdArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentUrl | String | Content Url | Required | ||
oauthClientId | Guid | Oauth Client Id | Required | ||
options | Options | Set of optional parameters including: | Required | ||
TypeId | Guid | Categorization type | Optional |
Returns
Get
Get Overload 1
Gets an existing rating for a piece of content by the accessing user
Velocity
#set($ratingResponse = $core_v2_rating.Get($contentId))
JavaScript
var ratingResponse = core_v2_rating.Get(contentId);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentId | Guid | Content Id | Required |
Get Overload 2
Gets an existing rating for a piece of content by the accessing user
Velocity
#set($ratingResponse = $core_v2_rating.Get($contentId, "%{ TypeId = $typeIdArg }"))
JavaScript
var ratingResponse = core_v2_rating.Get(contentId, { TypeId: typeIdArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentId | Guid | Content Id | Required | ||
options | Options | Set of optional parameters including: | Required | ||
TypeId | Guid | Categorization type | Optional |
Get Overload 3
Gets an existing rating for a piece of content by the accessing user
Velocity
#set($ratingResponse = $core_v2_rating.Get($contentUrl, $oauthClientId))
JavaScript
var ratingResponse = core_v2_rating.Get(contentUrl, oauthClientId);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentUrl | String | Content Url | Required | ||
oauthClientId | Guid | Oauth Client Id | Required |
Get Overload 4
Gets an existing rating for a piece of content by the accessing user
Velocity
#set($ratingResponse = $core_v2_rating.Get($contentUrl, $oauthClientId, "%{ TypeId = $typeIdArg }"))
JavaScript
var ratingResponse = core_v2_rating.Get(contentUrl, oauthClientId, { TypeId: typeIdArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentUrl | String | Content Url | Required | ||
oauthClientId | Guid | Oauth Client Id | Required | ||
options | Options | Set of optional parameters including: | Required | ||
TypeId | Guid | Categorization type | Optional |
Returns
List
Lists ratings
Velocity
#set($pagedListResponse = $core_v2_rating.List("%{ ApplicationId = $applicationIdArg, ContainerId = $containerIdArg, ContentId = $contentIdArg, ContentTypeId = $contentTypeIdArg, ContentUrl = $contentUrlArg, IncludeSubContainers = $includeSubContainersArg, PageIndex = $pageIndexArg, PageSize = $pageSizeArg, SortBy = $sortByArg, SortOrder = $sortOrderArg, TypeId = $typeIdArg, UserId = $userIdArg }"))
JavaScript
var pagedListResponse = core_v2_rating.List({ ApplicationId: applicationIdArg, ContainerId: containerIdArg, ContentId: contentIdArg, ContentTypeId: contentTypeIdArg, ContentUrl: contentUrlArg, IncludeSubContainers: includeSubContainersArg, PageIndex: pageIndexArg, PageSize: pageSizeArg, SortBy: sortByArg, SortOrder: sortOrderArg, TypeId: typeIdArg, UserId: userIdArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
options | Options | Set of optional parameters including: | Required | ||
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 | ||
IncludeSubContainers | Boolean | Include sub containers | Optional | ||
PageIndex | Int32 | Specify the page number of paged results to return. Zero-based index. | Optional | 0 | |
PageSize | Int32 | 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 | Int32 | User identifier | Optional |
Returns
Supports
Returns whether a content type supports rating
Velocity
#set($booleanResponse = $core_v2_rating.Supports($contentTypeId))
JavaScript
var booleanResponse = core_v2_rating.Supports(contentTypeId);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentTypeId | Guid | Content Type Id | Required |
Returns
Boolean