follow_request functions return relationship dicts now (fixes #196)

This commit is contained in:
Lorenz Diener 2019-10-12 19:42:43 +02:00
pare 86d06ea48c
commit bf96ff5ea0

Veure arxiu

@ -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