R/utils-collections-data.R
add_artwork_previews_to_collections.RdAdds an artwork_previews list column to a collections data.frame by fetching thumbnail URLs for each collection's most recent artworks.
add_artwork_previews_to_collections(collections, cn, limit = 4)The input data.frame with an added artwork_previews list column
This is a convenience wrapper around get_collection_artwork_previews() that operates on a full collections data.frame. The artist_uuid from the first row is used for all collections (assumes single-artist context).
The artwork_previews column is a list column where each element is a character vector of thumbnail URLs.
if (FALSE) { # \dontrun{
cn <- artcore::dbc()
artist <- "123e4567-e89b-12d3-a456-426614174000"
collections <- artutils::get_artist_collections_summary(artist, cn)
collections <- add_artwork_previews_to_collections(collections, cn)
# Now collections$artwork_previews[[1]] contains URLs for first collection
} # }