From bf96ff5ea0c025859c88c50b8ac5aec1f2284841 Mon Sep 17 00:00:00 2001 From: Lorenz Diener Date: Sat, 12 Oct 2019 19:42:43 +0200 Subject: follow_request functions return relationship dicts now (fixes #196) --- mastodon/Mastodon.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py index 70de3dd..2adee7e 100644 --- a/mastodon/Mastodon.py +++ b/mastodon/Mastodon.py @@ -2226,23 +2226,27 @@ class Mastodon: ### # Writing data: Follow requests ### - @api_version("1.0.0", "1.0.0", "1.0.0") + @api_version("1.0.0", "3.0.0", __DICT_VERSION_RELATIONSHIP) def follow_request_authorize(self, id): """ Accept an incoming follow request. + + Returns the updated `relationship dict`_ for the requesting account. """ id = self.__unpack_id(id) url = '/api/v1/follow_requests/{0}/authorize'.format(str(id)) - self.__api_request('POST', url) + return self.__api_request('POST', url) - @api_version("1.0.0", "1.0.0", "1.0.0") + @api_version("1.0.0", "3.0.0", __DICT_VERSION_RELATIONSHIP) def follow_request_reject(self, id): """ Reject an incoming follow request. + + Returns the updated `relationship dict`_ for the requesting account. """ id = self.__unpack_id(id) url = '/api/v1/follow_requests/{0}/reject'.format(str(id)) - self.__api_request('POST', url) + return self.__api_request('POST', url) ### # Writing data: Media -- cgit v1.2.3