aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornaoya_t <[email protected]>2017-04-26 11:49:56 +0900
committernaoya_t <[email protected]>2017-04-26 11:49:56 +0900
commit01b4d113bcbacde6f15eb491d5652716780342c7 (patch)
tree318f7ed6473ffd548282496e702fd82c74cf2bb7 /mastodon
parentfde6806120ecb23de0e2da698e4a5a2635f7013d (diff)
downloadmastodon.py-01b4d113bcbacde6f15eb491d5652716780342c7.tar.gz
Added remote follow support, resolves issue #40
Diffstat (limited to 'mastodon')
-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)