This service is available via Telligent.Evolution.Extensibility.Api.Version1.PublicApi.Comments
or Telligent.Evolution.Extensibility.Apis.Get<Telligent.Evolution.Extensibility.Api.Version1.IComments>()
and is defined in Telligent.Evolution.Api.dll
Events
Events.AfterCreate
Handler
void CommentAfterCreateEventHandler(CommentAfterCreateEventArgs e);
Events.AfterDelete
Handler
void CommentAfterDeleteEventHandler(CommentAfterDeleteEventArgs e);
Events.AfterUpdate
Handler
void CommentAfterUpdateEventHandler(CommentAfterUpdateEventArgs e);
Events.BeforeCreate
Handler
void CommentBeforeCreateEventHandler(CommentBeforeCreateEventArgs e);
Events.BeforeDelete
Handler
void CommentBeforeDeleteEventHandler(CommentBeforeDeleteEventArgs e);
Events.BeforeUpdate
Handler
void CommentBeforeUpdateEventHandler(CommentBeforeUpdateEventArgs e);
Events.Render
Handler
void CommentRenderEventHandler(CommentRenderEventArgs e);
Methods
bool AllowsComments(Guid contentId, Guid contentTypeId);
Checks if comments are allowed on the content
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentId | Guid | Content Id | Required | ||
contentTypeId | Guid | Content type Id | Required |
Return Type
bool
bool CanCreate(Guid contentId, Guid contentTypeId);
Checks if the user can create a comment on the 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);
Checks if the user can create a comment on 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 commentId);
Checks if the user can delete a comment
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
commentId | Guid | Comment Id | Required |
Return Type
bool
bool CanModify(Guid commentId);
Checks if the user can modify a comment
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
commentId | Guid | Comment Id | Required |
Return Type
bool
Comment Create(string contentUrl, Guid oauthClientId, string comment, CommentCreateOptions options = null);
Create a comment on 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 | ||
comment | string | Comment | Required | ||
options | CommentCreateOptions | Options include: ParentCommentId, CommentTypeId, IsApproved, SortOrder, CreatedDate, IPAddress, ExtendedAttributes | Optional |
Return Type
Comment Create(Guid contentId, Guid contentTypeId, string comment, CommentCreateOptions options = null);
Create a comment on a piece of content
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentId | Guid | Content Id | Required | ||
contentTypeId | Guid | Content type Id | Required | ||
comment | string | Comment | Required | ||
options | CommentCreateOptions | Options include: ParentCommentId, CommentTypeId, IsApproved, SortOrder, CreatedDate, IPAddress, ExtendedAttributes | Optional |
Return Type
AdditionalInfo Delete(Guid commentId);
Deletes a comment
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
commentId | Guid | Comment Id | Required |
Return Type
Comment Get(Guid commentId);
Gets a single comment
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
commentId | Guid | Comment Id | Required |
Return Type
PagedList<Comment> Get(CommentGetOptions options = null);
Lists comments
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
options | CommentGetOptions | Options include: ParentCommentId, ContentId, ContentUrl, CommentTypeId, ContainerId, ApplicationId, ContentTypeId, UserId, SortBy, SortOrder, IsFeatured, PageSize, PageIndex, IsApproved, IsIndexed, IncludeChildren, CommentIds | Optional |
Return Type
CommentStats GetCommentStats(CommentStatsOptions options = null);
Gets comment statistics
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
options | CommentStatsOptions | Options | Optional |
Return Type
CommentStats
bool SupportsComments(Guid contentTypeId);
Checks if comments are supported for the content type
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentTypeId | Guid | Content type Id | Required |
Return Type
bool
Comment Update(Guid commentId, string comment, CommentUpdateOptions options = null);
Update an existing comment
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
commentId | Guid | Comment Id | Required | ||
comment | string | Comment | Required | ||
options | CommentUpdateOptions | Options include: CommentTypeId, IsApproved, IsFeatured, SortOrder, CreatedDate, ExtendedAttributes | Optional |