follow_request functions return relationship dicts now (fixes #196)
This commit is contained in:
pare
86d06ea48c
commit
bf96ff5ea0
S'han modificat 1 arxius amb 8 adicions i 4 eliminacions
|
@ -2226,23 +2226,27 @@ class Mastodon:
|
||||||
###
|
###
|
||||||
# Writing data: Follow requests
|
# 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):
|
def follow_request_authorize(self, id):
|
||||||
"""
|
"""
|
||||||
Accept an incoming follow request.
|
Accept an incoming follow request.
|
||||||
|
|
||||||
|
Returns the updated `relationship dict`_ for the requesting account.
|
||||||
"""
|
"""
|
||||||
id = self.__unpack_id(id)
|
id = self.__unpack_id(id)
|
||||||
url = '/api/v1/follow_requests/{0}/authorize'.format(str(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):
|
def follow_request_reject(self, id):
|
||||||
"""
|
"""
|
||||||
Reject an incoming follow request.
|
Reject an incoming follow request.
|
||||||
|
|
||||||
|
Returns the updated `relationship dict`_ for the requesting account.
|
||||||
"""
|
"""
|
||||||
id = self.__unpack_id(id)
|
id = self.__unpack_id(id)
|
||||||
url = '/api/v1/follow_requests/{0}/reject'.format(str(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
|
# Writing data: Media
|
||||||
|
|
Loading…
Referencia en una nova incidència