InfoboardComments

InfoboardComments are used to enable a direct exchange on the content of an InfoboardPost.

Model Definition

Alias

infoboardComment

Relations

Key
Relation
Type
Relation Field(s)

user

Belongs to

user_id

post

Belongs to

post_id

notifications

Has many

notifications.event_id, notifications.event_source

reactions

Morph many

reactions.reactable_type, reactions.reactable_id

currentReaction

Morph one

reactions.reactable_type, reactions.reactable_id, reactions.user_id

Computed properties

  • hash - The hashed id of the InfoboardComment.

Traits

  • TriggersNotifications

List

Get a list of all InfoboardComments the current authenticated User is allowed to view.

Definition

GET /api/infoboard/posts/comments

Example Request

Example Response Body

List by Post

Get a list of all InfoboardComments the current authenticated User is allowed to view by InfoboardPost.

Definition

GET /api/infoboard/posts/{postId}/comments

Example Request

Example Response Body

Show

Show a single InfoboardComment by id or hash.

Definition

GET /api/infoboard/comments/{idOrHash}

Example Request

Example Response

Create

Create a new InfoboardComment by InfoboardPost.

Definition

POST /api/infoboard/posts/{postId}/comments

Request Keys

Key
Type
Default
Description

post_id**

integer

-

The related InfoboardPost.

text*

string

-

The content of the InfoboardComment.

Keys with * are required. Keys with ** are normalized to the information given by the route.

Example Request

Example Response Body

Update

Update an existing InfoboardComment by id.

Definition

PUT /api/infoboard/posts/comments/{id}

Request Keys

Key
Type
Default
Description

text*

string

-

The content of the InfoboardComment.

Keys with * are required.

Example Request

Example Response

Delete

Delete an existing InfoboardComment by id.

Definition

DELETE /api/infoboard/posts/comments/{id}

Example Request

Example Response

Last updated