add search support (not just suggestions)
This commit is contained in:
		
							parent
							
								
									e87f804f98
								
							
						
					
					
						commit
						524170d97a
					
				
					 1 changed files with 13 additions and 0 deletions
				
			
		|  | @ -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) | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue