add search support (not just suggestions)

This commit is contained in:
cere 2024-01-16 03:14:52 -05:00
parent e87f804f98
commit 524170d97a
1 changed files with 13 additions and 0 deletions

View File

@ -155,3 +155,16 @@ class PipedClient:
kwargs.update({'params': {'query': search_query}})
return self._get_json(f"/suggestions", **kwargs)
def get_search_results(self, search_query: str, **kwargs) -> t.List[str]:
"""
Obtains search results for a query.
### Parameters:
- `search_query` - The query to get search results for
- `**kwargs` - Additional keyword arguments to pass to `requests.Session.get`
"""
kwargs.update({'params': {'q': search_query, 'filter': 'all'}})
return self._get_json(f"/search", **kwargs)