madoc_canvas_image | R Documentation |
Get a data.frame of canvas information (image height/width + image_url) by using the Madoc API's.
This function performs a GET request to /madoc/api/canvases
madoc_canvas_image(site, id)
site |
character string with the site |
id |
a vector of id's of canvasses |
a data.frame with columns canvas_id, height, width, image_url
projects <- madoc_projects("https://www.madoc.ugent.be/s/brugse-vrije") manifests <- madoc_collection(site = "https://www.madoc.ugent.be/s/brugse-vrije", id = projects$collection_id) ids <- sample(manifests$manifest_id, size = 10) canvasses <- madoc_manifest(site = "https://www.madoc.ugent.be/s/brugse-vrije", id = ids) canvasses_urls <- madoc_canvas_image("https://www.madoc.ugent.be/s/brugse-vrije", id = canvasses$canvas_id) canvasses <- merge(canvasses, canvasses_urls, by = "canvas_id") library(magick) image_read(unlist(canvasses$image_url[[1]]))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.