Comment /comment/{comment-id}

Represents an individual comment attached to a post.

Reading

GET /comment/{comment-id} HTTP/1.1
Host: localhost:3000

Permissions

  • The applied permissions to retrieve the post at which is attached the comment are required.

Fields

Name Description Type

_id

The comment ID.

string

message

The message of the comment.

string

from

The ID of the User that added the comment.

User

post

The ID of the Post at which is attached the comment.

Post

created_time

The date that indicates when the comment was created.

date

updated_time

The date that indicates when the comment was updated for the last time.

date

Publishing

You can publish comments by using the /post/comments edge.

Updating

PUT /comment/{comment-id} HTTP/1.1
Host: localhost:3000

Permissions

  • An access token (pointing to an user) with manage_speaking permission is required.
  • The current person must be the owner of the comment.

Fields

Name Description Type

message

The message of the comment.

string

Response

If successful :

{
    "success": true
}

Otherwise a relevant error message will be returned.

Deleting

DELETE /comment/{comment-id} HTTP/1.1
Host: localhost:3000

Permissions

  • An access token (pointing to an user) with manage_speaking permission is required.
  • At least one of the following criteria must be met :
    • The comment is owned by the current person.
    • The post at which is attached the comment is owned by the current person.
    • The current person has permissions for manage the target object of the post at which is attached the comment.

Fields

No fields are required.

Response

If successful :

{
    "success": true
}

Otherwise a relevant error message will be returned.

Edges

No edges.