Converts a URL-friendly slug to a full artist record. This is the entry
point for artist profile pages - when a user visits /artist/jane-doe,
use this function to resolve the slug to an artist UUID and profile data.
Returns NULL if no artist matches the slug, allowing you to render a 404. The result includes artist preferences (featured artwork/collection) via a LEFT JOIN, so these fields may be NA for artists without preferences.
Arguments
- slug
Character. URL-friendly artist identifier (e.g., "jane-doe"). Generated from artist name during registration.
- 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
data.table with artist profile fields (artist_uuid, artist_name, bio, location, social URLs, etc.), or NULL if not found.
See also
Other data-access:
art_has_nft(),
db-frame-analytics,
get_art_opensea_url(),
get_art_print_url(),
get_art_purchase_urls(),
get_artist_collections_summary(),
get_artist_index(),
get_artist_opensea(),
get_artist_recent_works(),
get_artist_stats(),
get_artist_style_map(),
get_artist_tags(),
get_artwork_index(),
get_artwork_meta(),
get_artwork_opensea(),
get_artwork_profile(),
get_artwork_profile_full(),
get_artwork_stats(),
get_color_codes(),
get_verification_info()
Examples
if (FALSE) { # \dontrun{
artist_record <- get_artist_by_slug("jane-doe")
if (!is.null(artist_record)) {
artist <- artist_record$artist_uuid
# Use artist UUID for subsequent queries
}
} # }
