make search results filter configurable
This commit is contained in:
		
							parent
							
								
									524170d97a
								
							
						
					
					
						commit
						a58c71bb25
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		|  | @ -156,7 +156,7 @@ class PipedClient: | |||
| 
 | ||||
|         return self._get_json(f"/suggestions", **kwargs) | ||||
| 
 | ||||
|     def get_search_results(self, search_query: str, **kwargs) -> t.List[str]: | ||||
|     def get_search_results(self, search_query: str, filter: str="all", **kwargs) -> t.List[str]: | ||||
|         """ | ||||
|             Obtains search results for a query. | ||||
| 
 | ||||
|  | @ -165,6 +165,6 @@ class PipedClient: | |||
|             - `**kwargs` - Additional keyword arguments to pass to `requests.Session.get` | ||||
|         """ | ||||
| 
 | ||||
|         kwargs.update({'params': {'q': search_query, 'filter': 'all'}}) | ||||
|         kwargs.update({'params': {'q': search_query, 'filter': filter}}) | ||||
| 
 | ||||
|         return self._get_json(f"/search", **kwargs) | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue