View source: R/download_media.R
download_media | R Documentation |
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.
download_media(resp, download_dir = NULL, type_ = NULL, quiet = TRUE)
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 |
destination folder
#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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.