Skip to contents

The primary data aggregation function for artwork detail pages. Fetches everything needed to render a complete artwork view: artist context, artwork details, performance stats, benchmarks, paths, and configuration.

This function is optimized for the "one artwork, full detail" use case. It batches database queries and reuses the connection across all fetches. For gallery grids or lists, use the individual query functions instead.

Usage

get_appdata(artist, artwork, cn = NULL)

Arguments

artist

Character. Artist UUID (format: "746bxxxx-xxxx-xxxx-xxxxxxxxxxxx"). Validated with artcore::validate_uuid() where applicable.

artwork

Character. Artwork UUID (format: "99xxxxxx-xxxx-xxxx-xxxxxxxxxxxx"). Validated with artcore::validate_uuid() where applicable.

cn

Database connection. If NULL, creates a connection via artcore::dbc() and closes it on exit. Pass an existing connection to batch multiple queries efficiently.

Value

Nested list with all data needed for artwork detail view

Return Structure

artist

Artist context: info, stats, URLs, urlsDT (purchase URLs), artworks, collections, benchmarks

artwork

Artwork details: profile, styles, stats, benchmarks, verification, meta, frames

paths

CDN paths: frames, graphs, signature, diffs

config

Asset counts: n_frames, n_variants, n_carousel

certificate

Certificate of authenticity data (if issued)

collection

Parent collection UUID

Examples

if (FALSE) { # \dontrun{
appdata <- get_appdata(artist, artwork)

# Artist context for header
appdata$artist$info$artist_name
appdata$artist$stats$tot_hours
appdata$artist$thumb

# Artwork performance
appdata$artwork$stats$brush_strokes
appdata$artwork$benchmarks$time_effort$score

# Replay player setup
appdata$paths$frames   # Frame URL prefix
appdata$config$n_frames

# Purchase URLs for all artworks
appdata$artist$urlsDT[art_uuid == artwork]$url_print
appdata$artist$urlsDT[art_uuid == artwork]$url_opensea
} # }