This class handles the storage and manipulation of search results including downloading resources based on a search query.
SearchResults
resultsStores the search results data.
total_countStores the total count of results' element.
total_sizeStores the total size of results
new()Initializes a new SearchResults object with the specified client, results, and dataset identifier.
SearchResults$new(client, results, dataset_id)clientAn object containing the API client used to interact with the dataset.
resultsList containing search results.
dataset_idThe identifier for the dataset being queried.
SearchResult instance
download()Downloads resources based on stored results or selected indices of results.
SearchResults$download(
output_dir,
selected_indexes,
stop_at_failure = TRUE,
force = FALSE,
prompt = TRUE
)output_dirA string specifying the directory where downloaded files will be saved.
selected_indexesOptional; indices of the specific results to download.
stop_at_failureOptional; controls whether the download process of multiple files should immediately stop upon encountering the first failure.
forceOptional; forces the download even if the file already exists in the specified output directory.
promptOptional; enables all user prompts for decisions during file downloads. Defaults to true.
Nothing returned but downloaded files are saved at the specified location.
clone()The objects of this class are cloneable with this method.
SearchResults$clone(deep = FALSE)deepWhether to make a deep clone.