download_media {europeanaR} | R Documentation |
Download Media
Description
Function that downloads media, using the response object of the Europeana search API. It uses the fields 'type' and 'edmIsShownBy' to retrieve the items and store them in a local folder.
Usage
download_media(resp, download_dir = NULL, type_ = NULL, quiet = TRUE)
Arguments
resp |
an S3 object of type 'europeana_search_api' or 'cursored_search' |
download_dir |
destination directory. If 'NULL' then 'tempdir()' is used |
type_ |
string in 'c("TEXT", "IMAGE", "SOUND", "VIDEO", "3D")' |
quiet |
boolean to suppress download file messages |
Value
destination folder
Examples
#set your API key with set_key(api_key = "XXXX")
#example_1
resp <- query_search_api("arioch", rows = 2)
download_media(resp, type = "IMAGE")
#example_2 bulk download
res_bulk <- tidy_cursored_search(query = "animal",
qf = "when:17 AND what:painting",
max_items = 3)
download_media(res_bulk)
[Package europeanaR version 0.1.0 Index]