aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLorenz Diener <[email protected]>2017-12-13 17:55:14 +0100
committerLorenz Diener <[email protected]>2017-12-13 17:55:14 +0100
commitd7d8f153a31b76493daf68a44e01d4c4e11b180d (patch)
treea9f567fc42b82e1a8749f078159c5b8c84bc0a49
parent48d54effc8444b7f119ded786a6e750accf22027 (diff)
downloadmastodon.py-d7d8f153a31b76493daf68a44e01d4c4e11b180d.tar.gz
Update docs for search function
-rw-r--r--docs/index.rst12
-rw-r--r--mastodon/Mastodon.py2
2 files changed, 13 insertions, 1 deletions
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
340 'provider_url': # URL pointing to the embeds provider 340 'provider_url': # URL pointing to the embeds provider
341 } 341 }
342 342
343Search result dicts
344~~~~~~~~~~~~~~~~~~~
345.. code-block:: python
346
347 mastodon.search(...)
348 # Returns the folowing dictionary
349 {
350 'accounts': # List of account dicts resulting from the query
351 'hashtags': # List of hashtag dicts resulting from the query
352 'statuses': # List of toot dicts resulting from the query
353 }
354
343Instance dicts 355Instance dicts
344~~~~~~~~~~~~~~ 356~~~~~~~~~~~~~~
345.. code-block:: python 357.. 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:
601 Fetch matching hashtags, accounts and statuses. Will search federated 601 Fetch matching hashtags, accounts and statuses. Will search federated
602 instances if resolve is True. 602 instances if resolve is True.
603 603
604 Returns a dict of lists. 604 Returns a search result dict.
605 """ 605 """
606 params = self.__generate_params(locals()) 606 params = self.__generate_params(locals())
607 return self.__api_request('GET', '/api/v1/search', params) 607 return self.__api_request('GET', '/api/v1/search', params)
Powered by cgit v1.2.3 (git 2.41.0)