From ac7196c443db8453ccb6c3c2407c9e844ea4cbae Mon Sep 17 00:00:00 2001 From: Lorenz Diener Date: Sun, 28 Apr 2019 13:58:18 +0200 Subject: Add conversation read marking + tests/docs --- mastodon/Mastodon.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'mastodon') diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py index 6897bc6..f5bf4ac 100644 --- a/mastodon/Mastodon.py +++ b/mastodon/Mastodon.py @@ -1495,6 +1495,21 @@ class Mastodon: params = self.__generate_params(locals()) self.__api_request('POST', '/api/v1/notifications/dismiss', params) + + ### + # Writing data: Conversations + ### + def conversations_read(self, id): + """ + Marks a single conversation as read. + + WARNING: This method is currently not documented in the official API and + might therefore be unstable. + """ + id = self.__unpack_id(id) + url = '/api/v1/conversations/{0}/read'.format(str(id)) + return self.__api_request('POST', url) + ### # Writing data: Accounts ### -- cgit v1.2.3