aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'mastodon')
-rw-r--r--mastodon/Mastodon.py17
1 files changed, 15 insertions, 2 deletions
diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py
index 7c16e5c..58380fd 100644
--- a/mastodon/Mastodon.py
+++ b/mastodon/Mastodon.py
@@ -160,7 +160,7 @@ class Mastodon:
160 __DICT_VERSION_STATUS = bigger_version(bigger_version(bigger_version(bigger_version("2.1.0", 160 __DICT_VERSION_STATUS = bigger_version(bigger_version(bigger_version(bigger_version("2.1.0",
161 __DICT_VERSION_MEDIA), __DICT_VERSION_ACCOUNT), __DICT_VERSION_APPLICATION), __DICT_VERSION_MENTION) 161 __DICT_VERSION_MEDIA), __DICT_VERSION_ACCOUNT), __DICT_VERSION_APPLICATION), __DICT_VERSION_MENTION)
162 __DICT_VERSION_INSTANCE = bigger_version("2.3.0", __DICT_VERSION_ACCOUNT) 162 __DICT_VERSION_INSTANCE = bigger_version("2.3.0", __DICT_VERSION_ACCOUNT)
163 __DICT_VERSION_HASHTAG = "1.0.0" 163 __DICT_VERSION_HASHTAG = "2.3.4"
164 __DICT_VERSION_EMOJI = "2.1.0" 164 __DICT_VERSION_EMOJI = "2.1.0"
165 __DICT_VERSION_RELATIONSHIP = "2.4.3" 165 __DICT_VERSION_RELATIONSHIP = "2.4.3"
166 __DICT_VERSION_NOTIFICATION = bigger_version(bigger_version("1.0.0", __DICT_VERSION_ACCOUNT), __DICT_VERSION_STATUS) 166 __DICT_VERSION_NOTIFICATION = bigger_version(bigger_version("1.0.0", __DICT_VERSION_ACCOUNT), __DICT_VERSION_STATUS)
@@ -852,7 +852,7 @@ class Mastodon:
852 def search_v2(self, q, resolve=False): 852 def search_v2(self, q, resolve=False):
853 """ 853 """
854 Identical to `search()`, except in that it returns tags as 854 Identical to `search()`, except in that it returns tags as
855 `tag dicts`_. 855 `hashtag dicts`_.
856 856
857 Returns a `search result dict`_. 857 Returns a `search result dict`_.
858 """ 858 """
@@ -860,6 +860,19 @@ class Mastodon:
860 return self.__api_request('GET', '/api/v2/search', params) 860 return self.__api_request('GET', '/api/v2/search', params)
861 861
862 ### 862 ###
863 # Reading data: Trends
864 ###
865 @api_version("2.4.3", "2.4.3", __DICT_VERSION_HASHTAG)
866 def trends(self):
867 """
868 Fetch trending-hashtag information, if the instance provides such information.
869
870 Returns a list of `hashtag dicts`_, sorted by the instances trending algorithm,
871 descending.
872 """
873 return self.__api_request('GET', '/api/v1/trends')
874
875 ###
863 # Reading data: Lists 876 # Reading data: Lists
864 ### 877 ###
865 @api_version("2.1.0", "2.1.0", __DICT_VERSION_LIST) 878 @api_version("2.1.0", "2.1.0", __DICT_VERSION_LIST)
Powered by cgit v1.2.3 (git 2.41.0)