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.
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
Examples
if (FALSE) { # Sys.getenv("EUROPEANA_KEY") != ""
# \donttest{
#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)
# }
}