Skip to contents

Retrieves the direct OpenSea listing URL for an NFT artwork. Use this to provide one-click navigation to the NFT marketplace listing.

Unlike get_artwork_opensea() which returns full NFT metadata, this function returns only the URL for lightweight link generation. Returns NULL if no OpenSea listing exists.

Usage

get_art_opensea_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 OpenSea URL, or NULL if not listed.

Examples

if (FALSE) { # \dontrun{
url <- get_art_opensea_url(artist, artwork)
if (!is.null(url)) {
  # Display OpenSea link button
}
} # }