diff options
author | Lorenz Diener <[email protected]> | 2019-10-12 19:42:43 +0200 |
---|---|---|
committer | Lorenz Diener <[email protected]> | 2019-10-12 19:42:43 +0200 |
commit | bf96ff5ea0c025859c88c50b8ac5aec1f2284841 (patch) | |
tree | a6e4b1ad7077708e700661986b3dc6a54a9705df | |
parent | 86d06ea48c5742cc44e749023155a0d176cef4cc (diff) | |
download | mastodon.py-bf96ff5ea0c025859c88c50b8ac5aec1f2284841.tar.gz |
follow_request functions return relationship dicts now (fixes #196)
-rw-r--r-- | mastodon/Mastodon.py | 12 |
1 files 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: | |||
2226 | ### | 2226 | ### |
2227 | # Writing data: Follow requests | 2227 | # Writing data: Follow requests |
2228 | ### | 2228 | ### |
2229 | @api_version("1.0.0", "1.0.0", "1.0.0") | 2229 | @api_version("1.0.0", "3.0.0", __DICT_VERSION_RELATIONSHIP) |
2230 | def follow_request_authorize(self, id): | 2230 | def follow_request_authorize(self, id): |
2231 | """ | 2231 | """ |
2232 | Accept an incoming follow request. | 2232 | Accept an incoming follow request. |
2233 | |||
2234 | Returns the updated `relationship dict`_ for the requesting account. | ||
2233 | """ | 2235 | """ |
2234 | id = self.__unpack_id(id) | 2236 | id = self.__unpack_id(id) |
2235 | url = '/api/v1/follow_requests/{0}/authorize'.format(str(id)) | 2237 | url = '/api/v1/follow_requests/{0}/authorize'.format(str(id)) |
2236 | self.__api_request('POST', url) | 2238 | return self.__api_request('POST', url) |
2237 | 2239 | ||
2238 | @api_version("1.0.0", "1.0.0", "1.0.0") | 2240 | @api_version("1.0.0", "3.0.0", __DICT_VERSION_RELATIONSHIP) |
2239 | def follow_request_reject(self, id): | 2241 | def follow_request_reject(self, id): |
2240 | """ | 2242 | """ |
2241 | Reject an incoming follow request. | 2243 | Reject an incoming follow request. |
2244 | |||
2245 | Returns the updated `relationship dict`_ for the requesting account. | ||
2242 | """ | 2246 | """ |
2243 | id = self.__unpack_id(id) | 2247 | id = self.__unpack_id(id) |
2244 | url = '/api/v1/follow_requests/{0}/reject'.format(str(id)) | 2248 | url = '/api/v1/follow_requests/{0}/reject'.format(str(id)) |
2245 | self.__api_request('POST', url) | 2249 | return self.__api_request('POST', url) |
2246 | 2250 | ||
2247 | ### | 2251 | ### |
2248 | # Writing data: Media | 2252 | # Writing data: Media |