search.controllers.api package

Controller for search API requests.

search.controllers.api.paper(paper_id)[source]

Handle a request for paper metadata from the API.

Parameters:paper_id (str) – arXiv paper ID for the requested paper.
Returns:
  • dict – Response data (to serialize).
  • int – HTTP status code.
  • dict – Extra headers for the response.
Raises:NotFound – Raised when there is no document with the provided paper ID.
Return type:Tuple[Dict[str, Any], int, Dict[str, Any]]
search.controllers.api.search(params)[source]

Handle a search request from the API.

Parameters:params (MultiDict) – GET query parameters from the request.
Returns:
  • dict – Response data (to serialize).
  • int – HTTP status code.
  • dict – Extra headers for the response.
Return type:Tuple[Dict[str, Any], int, Dict[str, Any]]