aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'mastodon')
-rw-r--r--mastodon/Mastodon.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py
index 1561fa1..899aae4 100644
--- a/mastodon/Mastodon.py
+++ b/mastodon/Mastodon.py
@@ -1313,6 +1313,28 @@ class Mastodon:
1313 return self.__api_request('GET', '/api/v2/search', params) 1313 return self.__api_request('GET', '/api/v2/search', params)
1314 1314
1315 ### 1315 ###
1316 # Reading data: Trends
1317 ###
1318 @api_version("2.4.3", "3.0.0", __DICT_VERSION_HASHTAG)
1319 def trends(self, limit = None):
1320 """
1321 Fetch trending-hashtag information, if the instance provides such information.
1322
1323 Specify `limit` to limit how many results are returned (the maximum number
1324 of results is 10, the endpoint is not paginated).
1325
1326 Does not require authentication unless locked down by the administrator.
1327
1328 Important versioning note: This endpoint does not exist for Mastodon versions
1329 between 2.8.0 (inclusive) and 3.0.0 (exclusive).
1330
1331 Returns a list of `hashtag dicts`_, sorted by the instances trending algorithm,
1332 descending.
1333 """
1334 params = self.__generate_params(locals())
1335 return self.__api_request('GET', '/api/v1/trends', params)
1336
1337 ###
1316 # Reading data: Lists 1338 # Reading data: Lists
1317 ### 1339 ###
1318 @api_version("2.1.0", "2.1.0", __DICT_VERSION_LIST) 1340 @api_version("2.1.0", "2.1.0", __DICT_VERSION_LIST)
Powered by cgit v1.2.3 (git 2.41.0)