Fetches 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)

Arguments

artist

Character(1). Artist UUID

collection

Character(1). Collection UUID

cn

Database connection object (from artcore::dbc())

limit

Integer(1). Maximum number of thumbnails to fetch (default 4)

Value

Character vector of CDN thumbnail URLs (empty if no artworks found)

Details

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)

Examples

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", ...)
} # }