diff options
author | Lorenz Diener <[email protected]> | 2019-10-12 21:47:58 +0200 |
---|---|---|
committer | Lorenz Diener <[email protected]> | 2019-10-12 21:47:58 +0200 |
commit | 63bf5afc61503ebd99a7e7bc36014b378db98d23 (patch) | |
tree | b66daf9ec0727cd0c59a9ca8146958d74b508ea3 /docs | |
parent | 3194b1295e8f4a6d151d18ad4f23174c63408c05 (diff) | |
download | mastodon.py-63bf5afc61503ebd99a7e7bc36014b378db98d23.tar.gz |
Implement, test and document featured and suggested tags APIs (fixes #191)
Diffstat (limited to 'docs')
-rw-r--r-- | docs/index.rst | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/docs/index.rst b/docs/index.rst index c0aebb7..b9fcde1 100644 --- a/docs/index.rst +++ b/docs/index.rst | |||
@@ -756,6 +756,21 @@ Preference dicts | |||
756 | # content warnings by default | 756 | # content warnings by default |
757 | } | 757 | } |
758 | 758 | ||
759 | Featured tag dicts | ||
760 | ~~~~~~~~~~~~~~~~~~ | ||
761 | .. _featured tag dict: | ||
762 | |||
763 | .. code-block:: python | ||
764 | |||
765 | mastodon.featured_tags()[0] | ||
766 | # Returns the following dictionary: | ||
767 | { | ||
768 | 'id': # The featured tags id | ||
769 | 'name': # The featured tags name (without leading #) | ||
770 | 'statuses_count': # Number of publicly visible statuses posted with this hashtag that this instance knows about | ||
771 | 'last_status_at': # The last time a public status containing this hashtag was added to this instances database | ||
772 | # (can be None if there are none) | ||
773 | } | ||
759 | 774 | ||
760 | Admin account dicts | 775 | Admin account dicts |
761 | ~~~~~~~~~~~~~~~~~~~ | 776 | ~~~~~~~~~~~~~~~~~~~ |
@@ -907,6 +922,13 @@ their relationships. | |||
907 | .. automethod:: Mastodon.account_relationships | 922 | .. automethod:: Mastodon.account_relationships |
908 | .. automethod:: Mastodon.account_search | 923 | .. automethod:: Mastodon.account_search |
909 | 924 | ||
925 | Reading data: Featured tags | ||
926 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
927 | These functions allow retrieving info about a users featured and suggested tags. | ||
928 | |||
929 | .. automethod:: Mastodon.featured_tags | ||
930 | .. automethod:: Mastodon.featured_tag_suggestions | ||
931 | |||
910 | Reading data: Keyword filters | 932 | Reading data: Keyword filters |
911 | ----------------------------- | 933 | ----------------------------- |
912 | These functions allow you to get information about keyword filters. | 934 | These functions allow you to get information about keyword filters. |
@@ -1058,6 +1080,13 @@ These functions allow you to interact with other accounts: To (un)follow and | |||
1058 | .. automethod:: Mastodon.account_unpin | 1080 | .. automethod:: Mastodon.account_unpin |
1059 | .. automethod:: Mastodon.account_update_credentials | 1081 | .. automethod:: Mastodon.account_update_credentials |
1060 | 1082 | ||
1083 | Writing data: Featured tags | ||
1084 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
1085 | These functions allow setting which tags are featured on a users profile. | ||
1086 | |||
1087 | .. automethod:: Mastodon.featured_tag_create | ||
1088 | .. automethod:: Mastodon.featured_tag_delete | ||
1089 | |||
1061 | Writing data: Keyword filters | 1090 | Writing data: Keyword filters |
1062 | ----------------------------- | 1091 | ----------------------------- |
1063 | These functions allow you to manipulate keyword filters. | 1092 | These functions allow you to manipulate keyword filters. |