Update docs for search function

This commit is contained in:
Lorenz Diener 2017-12-13 17:55:14 +01:00
pare 48d54effc8
commit d7d8f153a3
S'han modificat 2 arxius amb 13 adicions i 1 eliminacions

Veure arxiu

@ -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

Veure arxiu

@ -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)