Fixed follows docs

This commit is contained in:
Lorenz Diener 2017-04-26 13:24:27 +02:00
pare d25e337c19
commit 23e796bab4
S'han modificat 3 arxius amb 11 adicions i 12 eliminacions

Veure arxiu

@ -13,7 +13,6 @@ Here's some general stuff to keep in mind, and some work that needs to be done
* Documentation that needs to be updated:
* Toot dicts are missing some fields (cards, applications, visibility)
* Some others probably are missing stuff also
* Follows is missclassified
* Other things missing:
* Transparent as well as explicit pagination support

Veure arxiu

@ -238,7 +238,6 @@ their relationships.
.. automethod:: Mastodon.account_statuses
.. automethod:: Mastodon.account_following
.. automethod:: Mastodon.account_followers
.. automethod:: Mastodon.follows
.. automethod:: Mastodon.account_relationships
.. automethod:: Mastodon.account_search
@ -290,6 +289,7 @@ These functions allow you to interact with other accounts: To (un)follow and
(un)block.
.. automethod:: Mastodon.account_follow
.. automethod:: Mastodon.follows
.. automethod:: Mastodon.account_unfollow
.. automethod:: Mastodon.account_block
.. automethod:: Mastodon.account_unblock

Veure arxiu

@ -364,15 +364,6 @@ class Mastodon:
params = self.__generate_params(locals(), ['id'])
return self.__api_request('GET', '/api/v1/accounts/' + str(id) + '/followers', params)
def follows(self, uri):
"""
Follow a remote user by uri (username@domain).
Returns a user dict.
"""
params = self.__generate_params(locals())
return self.__api_request('POST', '/api/v1/follows', params)
def account_relationships(self, id):
"""
Fetch relationships (following, followed_by, blocking) of the logged in user to
@ -571,6 +562,15 @@ class Mastodon:
"""
return self.__api_request('POST', '/api/v1/accounts/' + str(id) + "/follow")
def follows(self, uri):
"""
Follow a remote user by uri (username@domain).
Returns a user dict.
"""
params = self.__generate_params(locals())
return self.__api_request('POST', '/api/v1/follows', params)
def account_unfollow(self, id):
"""
Unfollow a user.