api: Implement POST /messages/<message_id>/reactions.

This commit is contained in:
Yago González 2018-08-07 19:20:34 +02:00 committed by Tim Abbott
parent 49e919ac3a
commit 6f74d5414a

View file

@ -773,6 +773,24 @@ class Client(object):
method='GET' method='GET'
) )
def add_reaction(self, reaction_data):
# type: (Dict[str, str]) -> Dict[str, Any]
'''
Example usage:
>>> client.add_emoji_reaction({
'message_id': '100',
'emoji_name': 'joy',
'emoji_code': '1f602',
'emoji_type': 'unicode_emoji'
})
{'result': 'success', 'msg': ''}
'''
return self.call_endpoint(
url='messages/{}/reactions'.format(reaction_data['message_id']),
method='POST',
)
def remove_reaction(self, reaction_data): def remove_reaction(self, reaction_data):
# type: (Dict[str, str]) -> Dict[str, Any] # type: (Dict[str, str]) -> Dict[str, Any]
''' '''