Source code for mattermostdriver.endpoints.reactions

from .base import Base
from .posts import Posts
from .users import Users


[docs]class Reactions(Base): endpoint = '/reactions'
[docs] def create_reaction(self, options=None): return self.client.post( self.endpoint, options=options )
[docs] def get_reactions_of_post(self, post_id): return self.client.get( Posts.endpoint + '/' + post_id + '/' + self.endpoint, )
[docs] def delete_reaction(self, user_id, post_id, emoji_name, params=None): return self.client.delete( Users.endpoint + '/' + user_id + '/posts/' + post_id + '/reactions/' + emoji_name, params=params )