Reactions
Let users react to messages, posts, and comments, which are visible to others.
Reactions are the interactions that user can perform with message, post or comment. The interactions can be anything such as like, dislike, love etc. It's up to the client to determine the type of reactions. EkoReactionRepository
class provides convenient method to add, remove, and query reactions for any content. Currently reactions are supported for Posts, Messages & Comments.
Query Reactions
You can fetch detailed information about reactions and the user who reacted to the post. EkoReactionRepository
class provides two methods which gets detailed information about reactions to the post. Each information is provided though EkoReaction
object.
You can fetch information about particular reaction name through getReactions
method. This method requires reactionName
, contentId
and referenceType
as a parameter and provide you with collections of EkoReaction
. contentId
as the reference id for Post, Message or Comment.
You can also fetch information about all the reactions through getAllReactions
method. This method requires only postId
as a parameter and provide all reactions for particular message, post or comment.
Add Reaction
You can add any number of reactions to the given post. EkoReactionRepository
provides addReaction
method which accepts reaction name. Reaction name is case sensitive i.e "like" & "Like" are two different reactions.
Remove Reaction
You can remove any reactions added to the post. EkoReactionRepository
provides removeReaction
method which removes reaction name. Reaction name is case sensitive in this case too.
Last updated