Skip to contents

Retrieves the external print store URL for an artwork. Use this to link customers to purchase physical prints when marketplace integration is active.

Returns NULL if no print listing exists for the artwork. Check before displaying print purchase buttons or links.

Usage

get_art_print_url(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

Character string with print store URL, or NULL if not available.

Examples

if (FALSE) { # \dontrun{
url <- get_art_print_url(artist, artwork)
if (!is.null(url)) {
  # Display print purchase button
}
} # }