From 5576c190ad98eca700ee797332410fc043f05931 Mon Sep 17 00:00:00 2001 From: Lorenz Diener Date: Mon, 30 Jul 2018 15:38:51 +0200 Subject: Search v2 --- mastodon/Mastodon.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py index b997402..7c16e5c 100644 --- a/mastodon/Mastodon.py +++ b/mastodon/Mastodon.py @@ -848,6 +848,17 @@ class Mastodon: params = self.__generate_params(locals()) return self.__api_request('GET', '/api/v1/search', params) + @api_version("2.4.3", "2.4.3", __DICT_VERSION_SEARCHRESULT) + def search_v2(self, q, resolve=False): + """ + Identical to `search()`, except in that it returns tags as + `tag dicts`_. + + Returns a `search result dict`_. + """ + params = self.__generate_params(locals()) + return self.__api_request('GET', '/api/v2/search', params) + ### # Reading data: Lists ### -- cgit v1.2.3