R/utils-collections-data.R
get_collection_artwork_previews.RdFetches thumbnail URLs for the most recent artworks in a collection. Returns a list column suitable for adding to a collections data.frame.
get_collection_artwork_previews(artist, collection, cn, limit = 4)Character vector of CDN thumbnail URLs (empty if no artworks found)
This function queries app.artwork_index for the most recent public artworks in a collection and constructs CDN thumbnail URLs using artutils::path_artwork_thumb().
Thumbnail URL pattern: https://.../thumbnails/{artist}/{artwork}.jpeg
Database Dependencies:
app.artwork_index (art_uuid, artist_uuid, collection_uuid, visibility, created_date)
if (FALSE) { # \dontrun{
cn <- artcore::dbc()
artist <- "123e4567-e89b-12d3-a456-426614174000"
collection <- "987fcdeb-51a2-43f7-9876-543210fedcba"
previews <- get_collection_artwork_previews(artist, collection, cn)
# Returns: c("https://...thumb1.jpeg", "https://...thumb2.jpeg", ...)
} # }