This service is available via Telligent.Evolution.Extensibility.Apis.Get<Telligent.Evolution.Extensibility.Api.Version1.IRatings>()
and is defined in Telligent.Evolution.Platform.dll
Events
Events.AfterCreate
Handler
void RatingAfterCreateEventHandler(RatingAfterCreateEventArgs e);
Events.AfterDelete
Handler
void RatingAfterDeleteEventHandler(RatingAfterDeleteEventArgs e);
Events.AfterUpdate
Handler
void RatingAfterUpdateEventHandler(RatingAfterUpdateEventArgs e);
Events.BeforeCreate
Handler
void RatingBeforeCreateEventHandler(RatingBeforeCreateEventArgs e);
Events.BeforeDelete
Handler
void RatingBeforeDeleteEventHandler(RatingBeforeDeleteEventArgs e);
Events.BeforeUpdate
Handler
void RatingBeforeUpdateEventHandler(RatingBeforeUpdateEventArgs e);
Properties
Name | Type | Description | Default | Options |
---|---|---|---|---|
DataTypeId Obsolete | Guid | Migrate usage to scripted email or scripted plugins. |
Methods
bool CanCreate(Guid contentId, Guid contentTypeId);
Returns whether the accessing user can rate a given piece of content
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentId | Guid | Content Id | Required | ||
contentTypeId | Guid | Content type Id | Required |
Return Type
bool
bool CanCreate(string contentUrl, Guid oauthClientId);
Returns whether the accessing user can rate a given piece of external content
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
bool CanDelete(Guid contentId, Guid? typeId, int ratingUserId);
Returns whether the accessing user can delete a rating of a piece of content
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentId | Guid | Content Id | Required | ||
typeId | Guid? | Categorization type | Required | ||
ratingUserId | int | User who rated the content | Required |
Return Type
bool
bool CanDelete(string contentUrl, Guid oauthClientId, Guid? typeId, int ratingUserId);
Returns whether the accessing user can delete a rating of a piece of external content
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 | ||
typeId | Guid? | Categorization type | Required | ||
ratingUserId | int | User who rated the content | Required |
Return Type
bool
Rating Create(Guid contentId, Guid contentTypeId, double? value, RatingCreateOptions options = null);
Rates a piece of content for the accessing user
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentId | Guid | Content Id | Required | ||
contentTypeId | Guid | Content type Id | Required | ||
value | double? | Value of the rating | Required | ||
options | RatingCreateOptions | Options include: TypeId | Optional |
Return Type
Rating Create(string contentUrl, Guid oauthClientId, double? value, RatingCreateOptions options = null);
Rates an external content for the accessing user
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 | ||
value | double? | Value of the rating | Required | ||
options | RatingCreateOptions | Options include: TypeId | Optional |
Return Type
AdditionalInfo Delete(Guid contentId, RatingDeleteOptions options = null);
Deletes a rating of a piece of content by the accessing user
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentId | Guid | Content Id | Required | ||
options | RatingDeleteOptions | Options include: TypeId | Optional |
Return Type
AdditionalInfo Delete(string contentUrl, Guid oauthClientId, RatingDeleteOptions options = null);
Deletes a rating of an external content by the accessing user
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 | ||
options | RatingDeleteOptions | Options include: TypeId | Optional |
Return Type
Rating Get(Guid contentId, RatingGetOptions options = null);
Gets an existing rating for a piece of content by the accessing user
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentId | Guid | Content Id | Required | ||
options | RatingGetOptions | Options include: TypeId | Optional |
Return Type
Rating Get(string contentUrl, Guid oauthClientId, RatingGetOptions options = null);
Gets an existing rating for an external content by the accessing user
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 | ||
options | RatingGetOptions | Options include: TypeId | Optional |
Return Type
PagedList<Rating> List(RatingListOptions options = null);
Lists ratings
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
options | RatingListOptions | Options include: ContentId, ContentUrl, ContainerId, ApplicationId, ContentTypeId, UserId, TypeId, SortBy, SortOrder, PageSize, PageIndex | Optional |
Return Type
bool Supports(Guid contentTypeId);
Returns whether a content type supports rating
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentTypeId | Guid | Content type Id | Required |
Return Type
bool