eodag.plugins.search.build_search_result.BuildPostSearchResult
eodag.plugins.search.build_search_result.BuildPostSearchResult#
- class eodag.plugins.search.build_search_result.BuildPostSearchResult(provider, config)[source]#
BuildPostSearchResult search plugin.
This plugin, which inherits from
PostJsonSearch
, performs a POST request and uses its result to build a singleSearchResult
object.The available configuration parameters inherits from parent classes, with particularly for this plugin:
api_endpoint: (mandatory) The endpoint of the provider’s search interface
pagination: The configuration of how the pagination is done on the provider. It is a tree with the following nodes:
next_page_query_obj: (optional) The additional parameters needed to perform search. These paramaters won’t be included in result. This must be a json dict formatted like {{“foo”:”bar”}} because it will be passed to a .format() method before being loaded as json.
- Parameters
- __init__(provider, config)#
Methods
__init__
(provider, config)build_query_string
(product_type, **kwargs)Build The query string using the search parameters
clear
()Clear search context
collect_search_urls
([page, items_per_page, ...])Wraps PostJsonSearch.collect_search_urls to force product count to 1
count_hits
([count_url, result_type])Count method that will always return 1.
discover_product_types
()Fetch product types list from provider using discover_product_types conf
do_search
(*args, **kwargs)Perform the actual search request, and return result in a single element.
format_free_text_search
(**kwargs)Build the free text search parameter using the search parameters
get_collections
(**kwargs)Get the collection to which the product belongs
get_product_type_def_params
(product_type, ...)Get the provider product type definition parameters
get_queryables
(search_params)Retrieve the metadata mappings that are query-able
map_product_type
(product_type, **kwargs)Map the eodag product type to the provider product type
normalize_results
(results, **kwargs)Build
EOProduct
from provider resultquery
([items_per_page, page, count])Perform a search on an OpenSearch-like interface
update_metadata_mapping
(metadata_mapping)Update plugin metadata_mapping with input metadata_mapping configuration
Attributes
COMPLEX_QS_REGEX
DEFAULT_ITEMS_PER_PAGE
extract_properties
plugins