Reactions
Last updated
Last updated
Reactions
are a quick and easy way to provide feedback to Reactable
entities via an emoji. Each can only submit one Reaction
per Reactable
.
The Reactions
of all are then summarized in order to obtain a quick picture of user sentiment for the Reactable
.
user
Belongs to
user_id
reactable
Reactable
Morph to
reactable_type
, reactable_id
infoboardPost
- React to a .
infoboardComment
- React to a .
manualEntry
- React to a .
chatMessage
- React to a ChatMessages
.
The following appends
can be applied on all Reactable
entities:
reactions_summary
Adds the reactions_summary
append to the response, containing the reaction
and the count
. The reaction counts are sorted from highest to lowest.
Example response:
List the Reactions
for given Reactable
.
Definition
GET
/api/reactions/{reactableType}/{reactableId}
Example Request
Example Response
Get a summary of Reactions
for given Reactable
. It has the same structure as the reactions_summary
append.
Definition
GET
/api/reactions/{reactableType}/{reactableId}/summary
Example Request
Example Response
Definition
POST
/api/reactions
Request Keys
reactable_id
*
integer
The ID of the Reactable
entity.
reactable_type
*
string
value
*
string
The emoji to react to the Reactable
entity.
Keys with *
are required.
Example Request
Example Response
Delete an Reaction
by id
.
Definition
DELETE
/api/reactions/{id}
Example Request
Example Response
Create a new Reaction
. If the reaction for given reactable_type
, reactable_id
and the authenticated ID exits, it will be updated.
The of the Reaction
.