This service is available via Telligent.Evolution.Extensibility.Apis.Get<Telligent.Evolution.Extensibility.Api.Version1.IComments>()
and is defined in Telligent.Evolution.Platform.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, CommentDeleteOptions options = null);
Deletes a comment
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
commentId | Guid | Comment Id | Required | ||
options | CommentDeleteOptions | Options include: DeleteChildren | Optional |
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
ApiList<ThreadedComment> Get(CommentGetThreadedOptions options = null);
Lists comments
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
options | CommentGetThreadedOptions | Options include: ParentCommentId, ContentId, ContentUrl, CommentTypeId, ContentTypeId, OAuthClientId, CreatedStartDate, CreatedEndDate ThreadedSortBy, ThreadedSortOrder, FlattenedSortBy, FlattenedSortOrder, RootPageSize, FlattenedDepth, ChildPageSize | Optional |
Return Type
ApiList<Comment> GetAncestors(Guid commentId, int? depth);
Gets the hierarchy ancestors for a threaded comment.
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
commentId | Guid | Id of the comment | Required | ||
depth | int? | Level of ancestors to return from the root comment down. Zero based with a max of 9. If 0 is specified, only the root comment id is returned. If the comment is the root comment, ApiList will have no records. | Required |
Return Type
CommentStats GetCommentStats(CommentStatsOptions options = null);
Gets comment statistics
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
options | CommentStatsOptions | Options | Optional |
Return Type
CommentStats
ApiList<ThreadedComment> GetForComment(CommentGetThreadedForCommentOptions options = null);
Lists threaded comments for a specified comment
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
options | CommentGetThreadedForCommentOptions | Options include: CommentId, ContentId, ContentUrl, CommentTypeId, ContentTypeId, OAuthClientId, ThreadedSortBy, ThreadedSortOrder, FlattenedSortBy, FlattenedSortOrder, FlattenedDepth, PageSize, Direction | Optional |
Return Type
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 |