diff options
author | Lorenz Diener <[email protected]> | 2017-04-26 13:24:27 +0200 |
---|---|---|
committer | Lorenz Diener <[email protected]> | 2017-04-26 13:24:27 +0200 |
commit | 23e796bab4e19348d77a94cbcd27cd3539838cc5 (patch) | |
tree | 36916e37149527e4946af112e768f91682ee916b | |
parent | d25e337c19b0f87027a88b51becd79c83c9667e5 (diff) | |
download | mastodon.py-23e796bab4e19348d77a94cbcd27cd3539838cc5.tar.gz |
Fixed follows docs
-rw-r--r-- | DEVELOPMENT.md | 1 | ||||
-rw-r--r-- | docs/index.rst | 4 | ||||
-rw-r--r-- | mastodon/Mastodon.py | 18 |
3 files changed, 11 insertions, 12 deletions
diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 4693afe..f5d1583 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md | |||
@@ -13,7 +13,6 @@ Here's some general stuff to keep in mind, and some work that needs to be done | |||
13 | * Documentation that needs to be updated: | 13 | * Documentation that needs to be updated: |
14 | * Toot dicts are missing some fields (cards, applications, visibility) | 14 | * Toot dicts are missing some fields (cards, applications, visibility) |
15 | * Some others probably are missing stuff also | 15 | * Some others probably are missing stuff also |
16 | * Follows is missclassified | ||
17 | 16 | ||
18 | * Other things missing: | 17 | * Other things missing: |
19 | * Transparent as well as explicit pagination support | 18 | * Transparent as well as explicit pagination support |
diff --git a/docs/index.rst b/docs/index.rst index bad52d2..166b51e 100644 --- a/docs/index.rst +++ b/docs/index.rst | |||
@@ -238,7 +238,6 @@ their relationships. | |||
238 | .. automethod:: Mastodon.account_statuses | 238 | .. automethod:: Mastodon.account_statuses |
239 | .. automethod:: Mastodon.account_following | 239 | .. automethod:: Mastodon.account_following |
240 | .. automethod:: Mastodon.account_followers | 240 | .. automethod:: Mastodon.account_followers |
241 | .. automethod:: Mastodon.follows | ||
242 | .. automethod:: Mastodon.account_relationships | 241 | .. automethod:: Mastodon.account_relationships |
243 | .. automethod:: Mastodon.account_search | 242 | .. automethod:: Mastodon.account_search |
244 | 243 | ||
@@ -289,7 +288,8 @@ Writing data: Accounts | |||
289 | These functions allow you to interact with other accounts: To (un)follow and | 288 | These functions allow you to interact with other accounts: To (un)follow and |
290 | (un)block. | 289 | (un)block. |
291 | 290 | ||
292 | .. automethod:: Mastodon.account_follow | 291 | .. automethod:: Mastodon.account_follow |
292 | .. automethod:: Mastodon.follows | ||
293 | .. automethod:: Mastodon.account_unfollow | 293 | .. automethod:: Mastodon.account_unfollow |
294 | .. automethod:: Mastodon.account_block | 294 | .. automethod:: Mastodon.account_block |
295 | .. automethod:: Mastodon.account_unblock | 295 | .. automethod:: Mastodon.account_unblock |
diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py index 4717674..68f9e56 100644 --- a/mastodon/Mastodon.py +++ b/mastodon/Mastodon.py | |||
@@ -364,15 +364,6 @@ class Mastodon: | |||
364 | params = self.__generate_params(locals(), ['id']) | 364 | params = self.__generate_params(locals(), ['id']) |
365 | return self.__api_request('GET', '/api/v1/accounts/' + str(id) + '/followers', params) | 365 | return self.__api_request('GET', '/api/v1/accounts/' + str(id) + '/followers', params) |
366 | 366 | ||
367 | def follows(self, uri): | ||
368 | """ | ||
369 | Follow a remote user by uri (username@domain). | ||
370 | |||
371 | Returns a user dict. | ||
372 | """ | ||
373 | params = self.__generate_params(locals()) | ||
374 | return self.__api_request('POST', '/api/v1/follows', params) | ||
375 | |||
376 | def account_relationships(self, id): | 367 | def account_relationships(self, id): |
377 | """ | 368 | """ |
378 | Fetch relationships (following, followed_by, blocking) of the logged in user to | 369 | Fetch relationships (following, followed_by, blocking) of the logged in user to |
@@ -571,6 +562,15 @@ class Mastodon: | |||
571 | """ | 562 | """ |
572 | return self.__api_request('POST', '/api/v1/accounts/' + str(id) + "/follow") | 563 | return self.__api_request('POST', '/api/v1/accounts/' + str(id) + "/follow") |
573 | 564 | ||
565 | def follows(self, uri): | ||
566 | """ | ||
567 | Follow a remote user by uri (username@domain). | ||
568 | |||
569 | Returns a user dict. | ||
570 | """ | ||
571 | params = self.__generate_params(locals()) | ||
572 | return self.__api_request('POST', '/api/v1/follows', params) | ||
573 | |||
574 | def account_unfollow(self, id): | 574 | def account_unfollow(self, id): |
575 | """ | 575 | """ |
576 | Unfollow a user. | 576 | Unfollow a user. |