API > Notifications

Basic JavaScript object

get

Gets comments for specified post

Parameters

  • activityId
    Post ID for which is needed to get comments.
  • limit
    Maximum number of comments which has to be returned. By default 10, minumum value 1, maximum value 50.
  • offsetId
    Comment ID regarding to which a list will be displayed in descending order.

Result

Returns object which contains such properties: success in a case of success and html in a case of error success, message.

  • success
    Request status true in a case of success or false in a case of error.
  • html
    Template render membership-by-supsystic/src/Membership/Activity/views/partials/activity-comments.twig
  • message
    Error message.

Example


post

Publishes new comment.

Parameters

  • activityId
    Post ID.

  • data
    Object with parameters to publish

    Available properties:

    • message
      Message text
    • link
      Link ID to display in a comment, can be received after a method call parseUrlAttachment
    • images
      Image ID array which has to be attached to a comment, can be received after a call uploadImage
  • postAsGroup
    Group ID. If specified – posts comment on behalf of a group.

Result

Returns object with properties success и html:

  • success
    Request status true in a case of success or false in a case of error.
  • html
    Template render membership-by-supsystic/src/Membership/Activity/views/partials/activity-comments.twig

Example


update

Updates comment content.

Parameters

  • commentId
    ID of a comment which has to be updated.

  • data
    Object with parameters to publish

    Available properties:

    • message
      Message text
    • link
      Link ID to display in the comment, can be received after the method call parseUrlAttachment

Result

Returns object with properties success и html:

  • success
    Request status true in a case of success or false in a case of error.
  • html
    Template render membership-by-supsystic/src/Membership/Activity/views/partials/activity-comments.twig.twig

Example


remove

Removes comment.

Parameters

  • commentId
    ID of a comment which has to be deleted.

Result

Returns object with success property:

  • success
    Request status true in a case of success or false in a case of error.

Example


reply

Publishes reply to a comment.

Parameters

  • commentId
    Comment ID.

  • data
    Object with parameters to publish

    Available properties:

    • message
      Message text
    • link
      Link ID to display in the comment, can be received after the method call parseUrlAttachment
    • images
      Image ID array which has to be attached to the comment, can be received after the call uploadImage
  • postAsGroup
    Group ID. If specified – posts comment on behalf of the group.

Result

Returns object with properties success и html:

  • success
    Request status true in a case of success or false in a case of error.
  • html
    Template render membership-by-supsystic/src/Membership/Activity/views/partials/activity-comments.twig

Example


replies

Gets comment replies to a specified comment.

Parameters

  • commentId
    Comment ID for which is needed to get comments.
  • limit
    Maximum number of comments which has to be returned. By default 15, minumum value 1, maximum value 50.
  • offsetId
    Comment ID regarding to which a list will be displayed in descending order.

Result

Returns object which contains such properties: success in a case of success and html in a case of error success, message.

  • success
    Request status true in a case of success or false in a case of error.
  • html
    Tedmplate render membership-by-supsystic/src/Membership/Activity/views/partials/activity-comments.twig
  • message
    Error message.

Example


Categories
Latest Articles
Get plugins bundle today and save over 80%