From d7d8f153a31b76493daf68a44e01d4c4e11b180d Mon Sep 17 00:00:00 2001 From: Lorenz Diener Date: Wed, 13 Dec 2017 17:55:14 +0100 Subject: Update docs for search function --- docs/index.rst | 12 ++++++++++++ mastodon/Mastodon.py | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/docs/index.rst b/docs/index.rst index fe92636..da670b1 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -340,6 +340,18 @@ Card dicts 'provider_url': # URL pointing to the embeds provider } +Search result dicts +~~~~~~~~~~~~~~~~~~~ +.. code-block:: python + + mastodon.search(...) + # Returns the folowing dictionary + { + 'accounts': # List of account dicts resulting from the query + 'hashtags': # List of hashtag dicts resulting from the query + 'statuses': # List of toot dicts resulting from the query + } + Instance dicts ~~~~~~~~~~~~~~ .. code-block:: python diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py index e8d68a8..2e3935c 100644 --- a/mastodon/Mastodon.py +++ b/mastodon/Mastodon.py @@ -601,7 +601,7 @@ class Mastodon: Fetch matching hashtags, accounts and statuses. Will search federated instances if resolve is True. - Returns a dict of lists. + Returns a search result dict. """ params = self.__generate_params(locals()) return self.__api_request('GET', '/api/v1/search', params) -- cgit v1.2.3