Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • ArticleInstanceCommentsClient

Index

Constructors

constructor

Properties

Protected apiClient

apiClient: ApiClient

Protected articleInstanceCommentsRepliesClient

articleInstanceCommentsRepliesClient: ArticleInstanceCommentRepliesClient

Protected articleInstanceCommentsRoute

articleInstanceCommentsRoute: ArticleInstanceCommentsRoute

statuses

statuses: ICommentStatus = CommentStatus

Contains a reference to valid list of article comment states. It returns an object containing all article comment states.

method
example

articleInstanceCommentsClient.statuses.approved;

Accessors

replies

routeDefinition

Methods

approve

  • Returns a promise that is resolved once the approve article comment action has been performed. This action sets the state of an article comment to "approved". This route uses HAL enabled objects to obtain routes and therefore it doesn't apply articleCommentsRoute route template. Here is an example of how a route can be obtained from HAL enabled objects:

    let params = modelMapper.updateParams(articleComment);
    let uri = params['model'].links('comment-approve').href;
    
    method
    example

    // articleComment is a resource previously fetched using get action. articleInstanceCommentsClient.approve(articleComment, commentOptions) .then(function (data) { // perform success action here }, function (response, status, headers, config) { // perform error handling here });

    Parameters

    Returns PromiseLike<IHttpResponse<void>>

    A promise that is resolved once the approve article comment action has been performed.

create

  • Returns a promise that is resolved once the create article comment action has been performed; this action creates a new comment for an article.

    method
    example

    articleInstanceCommentsClient.create({ articleId : '', comment : , userId : '' }) .then(function (data) { // perform success action here }, function (response, status, headers, config) { // perform error handling here });

    Parameters

    • data: IArticleComment

      An article comment object that needs to be inserted into the system.

    Returns PromiseLike<IHttpResponse<IArticleComment>>

    A promise that is resolved once the create article comment action has been performed.

find

  • Returns a promise that is resolved once the find action has been performed. Success response returns a list of article comment resources matching the given criteria.

    method
    example

    articleInstanceCommentsClient.find({ pageNumber : 1, pageSize : 10, orderBy : '', orderDirection : '', search : '' }) .success(function (collection) { // perform success action here }) .error(function (response, status, headers, config) { // perform error handling here });

    Parameters

    • articleId: string

      Article slug or id which uniquely identifies article whose comment resources need to be retrieved.

    • Optional options: IOptions

      Query resource options object.

    Returns PromiseLike<IHttpResponse<IQueryModel<IArticleComment>>>

    A promise that is resolved once the find action has been performed.

flag

  • Returns a promise that is resolved once the flag article comment action has been performed. This action sets the state of an article comment to "flagged". This route uses HAL enabled objects to obtain routes and therefore it doesn't apply articleCommentsRoute route template. Here is an example of how a route can be obtained from HAL enabled objects:

    let params = modelMapper.updateParams(articleComment);
    let uri = params['model'].links('comment-flag').href;
    
    method
    example

    // articleComment is a resource previously fetched using get action. articleInstanceCommentsClient.flag(articleComment) .then(function (data) { // perform success action here }, function (response, status, headers, config) { // perform error handling here });

    Parameters

    Returns PromiseLike<IHttpResponse<void>>

    A promise that is resolved once the flag article comment action has been performed.

get

  • Returns a promise that is resolved once the get action has been performed. Success response returns the specified article comment resource.

    method
    example

    articleInstanceCommentsClient.get('', '') .then(function (data) { // perform success action here }, function (response, status, headers, config) { // perform error handling here });

    Parameters

    • articleId: string

      Article slug or id which uniquely identifies article whose comment resource needs to be retrieved.

    • commentId: string

      Id which identifies article comment resource that needs to be retrieved.

    • Optional options: IGetRequestOptions

      Options object that contains embed data.

    Returns PromiseLike<IHttpResponse<IArticleComment>>

    A promise that is resolved once the get action has been performed.

remove

  • Returns a promise that is resolved once the remove article comment action has been performed. If the action is successfully completed, the article comment resource and its replies will be permanently removed from the system. This route uses HAL enabled objects to obtain routes and therefore it doesn't apply articleCommentsRoute route template. Here is an example of how a route can be obtained from HAL enabled objects:

    let params = modelMapper.removeParams(articleComment);
    let uri = params['model'].links('delete').href;
    
    method
    example

    // articleComment is a resource previously fetched using get action. articleInstanceCommentsClient.remove(articleComment) .then(function (data) { // perform success action here }, function (response, status, headers, config) { // perform error handling here });

    Parameters

    • data: IArticleComment

      An article comment object used to delete specified article comment resource.

    Returns PromiseLike<IHttpResponse<void>>

    A promise that is resolved once the remove article comment action has been performed.

removeAll

  • Returns a promise that is resolved once the removeAll article comment action has been performed. This action will remove all comments and comment replies from an article if successfully completed. This route uses HAL enabled objects to obtain routes and therefore it doesn't apply articleInstanceRoute route template. Here is an example of how a route can be obtained from HAL enabled objects:

    let params = modelMapper.removeParams(articleComment);
    let uri = params['model'].links('delete-comments-by-article').href;
    
    method
    example

    // articleComment is a resource previously fetched using get action. articleInstanceCommentsClient.removeAll(articleComment) .then(function (data) { // perform success action here }, function (response, status, headers, config) { // perform error handling here });

    Parameters

    • data: IArticle

      An article object used to delete specified article comment resource.

    Returns PromiseLike<IHttpResponse<void>>

    A promise that is resolved once the removeAll article comment action has been performed.

report

  • Returns a promise that is resolved once the report article comment action has been performed. This action sets the state of an article comment to "reported". This route uses HAL enabled objects to obtain routes and therefore it doesn't apply articleCommentsRoute route template. Here is an example of how a route can be obtained from HAL enabled objects:

    let params = modelMapper.updateParams(articleComment);
    let uri = params['model'].links('comment-report').href;
    
    method
    example

    // articleComment is a resource previously fetched using get action. articleInstanceCommentsClient.report(articleComment, commentOptions) .success(function (data) { // perform success action here }) .error(function (response, status, headers, config) { // perform error handling here });

    Parameters

    Returns PromiseLike<IHttpResponse<void>>

    A promise that is resolved once the report article comment action has been performed.

spam

  • Returns a promise that is resolved once the mark as spam article comment action has been performed. This action sets the state of an article comment to "spam". This route uses HAL enabled objects to obtain routes and therefore it doesn't apply articleInstanceRoute route template. Here is an example of how a route can be obtained from HAL enabled objects:

    let params = modelMapper.updateParams(articleComment);
    let uri = params['model'].links('comment-spam').href;
    
    method
    example

    // articleComment is a resource previously fetched using get action. articleInstanceClient.spam(articleComment) .then(function (data) { // perform success action here }, function (response, status, headers, config) { // perform error handling here });

    Parameters

    Returns PromiseLike<IHttpResponse<void>>

    A promise that is resolved once the mark as spam article comment action has been performed.

unapprove

  • Returns a promise that is resolved once the unapprove article comment action has been performed. This action sets the state of an article comment to "unapproved". This route uses HAL enabled objects to obtain routes and therefore it doesn't apply articleCommentsRoute route template. Here is an example of how a route can be obtained from HAL enabled objects:

    let params = modelMapper.updateParams(articleComment);
    let uri = params['model'].links('comment-unapprove').href;
    
    method
    example

    // articleComment is a resource previously fetched using get action. articleInstanceCommentsClient.unapprove(articleComment) .then(function (data) { // perform success action here }, function (response, status, headers, config) { // perform error handling here });

    Parameters

    Returns PromiseLike<IHttpResponse<void>>

    A promise that is resolved once the unapprove article comment action has been performed.

unflag

  • Returns a promise that is resolved once the unflag article comment action has been performed. This action removes the "flagged" comment mark. This route uses HAL enabled objects to obtain routes and therefore it doesn't apply articleCommentsRoute route template. Here is an example of how a route can be obtained from HAL enabled objects:

    let params = modelMapper.updateParams(articleComment);
    let uri = params['model'].links('comment-unflag').href;
    
    method
    example

    // articleComment is a resource previously fetched using get action. articleInstanceCommentsClient.unflag(articleComment) .then(function (data) { // perform success action here }, function (response, status, headers, config) { // perform error handling here });

    Parameters

    Returns PromiseLike<IHttpResponse<void>>

    A promise that is resolved once the unflag article comment action has been performed.

unreport

  • Returns a promise that is resolved once the unreport article comment action has been performed. This action removes the "reported" comment mark. This route uses HAL enabled objects to obtain routes and therefore it doesn't apply articleCommentsRoute route template. Here is an example of how a route can be obtained from HAL enabled objects:

    let params = modelMapper.updateParams(articleComment);
    let uri = params['model'].links('comment-unreport').href;
    
    method
    example

    // articleComment is a resource previously fetched using get action. articleInstanceCommentsClient.unreport(articleComment) .then(function (data) { // perform success action here }, function (response, status, headers, config) { // perform error handling here });

    Parameters

    Returns PromiseLike<IHttpResponse<void>>

    A promise that is resolved once the unreport article comment action has been performed.

unspam

  • Returns a promise that is resolved once the unspam article comment action has been performed. This action removes the "spam" comment state. This route uses HAL enabled objects to obtain routes and therefore it doesn't apply articleInstanceRoute route template. Here is an example of how a route can be obtained from HAL enabled objects:

    let params = modelMapper.updateParams(articleComment);
    let uri = params['model'].links('comment-unspam').href;
    
    method
    example

    // articleComment is a resource previously fetched using get action. articleInstanceClient.unspam(articleComment) .then(function (data) { // perform success action here }, function (response, status, headers, config) { // perform error handling here });

    Parameters

    Returns PromiseLike<IHttpResponse<void>>

    A promise that is resolved once the unspam article comment action has been performed.

update

  • Returns a promise that is resolved once the update article comment action has been performed; this action updates an article comment resource. This route uses HAL enabled objects to obtain routes and therefore it doesn't apply articleCommentsRoute route template. Here is an example of how a route can be obtained from HAL enabled objects:

    let params = modelMapper.updateParams(articleComment);
    let uri = params['model'].links('put').href;
    
    method
    example

    // articleComment is a resource previously fetched using get action. articleInstanceCommentsClient.update(articleComment) .then(function (data) { // perform success action here }, function (response, status, headers, config) { // perform error handling here });

    Parameters

    • data: IArticleComment

      An article comments object used to update specified article comment resource.

    Returns PromiseLike<IHttpResponse<void>>

    A promise that is resolved once the update article comment action has been performed.

Generated using TypeDoc