aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLorenz Diener <[email protected]>2017-04-26 11:15:48 +0200
committerGitHub <[email protected]>2017-04-26 11:15:48 +0200
commit6d4cc61682f42ad6181dde8ef2fb765b304568bc (patch)
tree318f7ed6473ffd548282496e702fd82c74cf2bb7
parentfde6806120ecb23de0e2da698e4a5a2635f7013d (diff)
parent01b4d113bcbacde6f15eb491d5652716780342c7 (diff)
downloadmastodon.py-6d4cc61682f42ad6181dde8ef2fb765b304568bc.tar.gz
Merge pull request #46 from naoyat/add_remote_follow
Added remote follow support, resolves issue #40
-rw-r--r--mastodon/Mastodon.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py
index 08075a7..c69fe9e 100644
--- a/mastodon/Mastodon.py
+++ b/mastodon/Mastodon.py
@@ -380,6 +380,15 @@ class Mastodon:
380 """ 380 """
381 return self.__api_request('GET', '/api/v1/accounts/' + str(id) + '/followers') 381 return self.__api_request('GET', '/api/v1/accounts/' + str(id) + '/followers')
382 382
383 def follows(self, uri):
384 """
385 Follow a remote user by uri (username@domain).
386
387 Returns a user dict.
388 """
389 params = self.__generate_params(locals())
390 return self.__api_request('POST', '/api/v1/follows', params)
391
383 def account_relationships(self, id): 392 def account_relationships(self, id):
384 """ 393 """
385 Fetch relationships (following, followed_by, blocking) of the logged in user to 394 Fetch relationships (following, followed_by, blocking) of the logged in user to
Powered by cgit v1.2.3 (git 2.41.0)