ExDisco.Artists.Artist (ex_disco v0.1.0)

Copy Markdown View Source

A musician, group, or other artist from Discogs.

An Artist represents a person, group, or collective that has released music. Each artist has basic information (name, profile) and can have multiple aliases, name variations, and images.

Common Fields

  • :id — Unique Discogs artist ID
  • :name — Primary artist name (band name, artist stage name)
  • :real_name — Real name if different from stage name
  • :profile — Biography and description
  • :aliases — List of ArtistAlias records (alternate names)
  • :name_variations — List of alternate spellings
  • :images — Cover art and other images
  • :data_quality — Discogs data quality rating for this entry

Examples

Get artist information:

{:ok, artist} = ExDisco.Artists.get(1)
IO.inspect(artist.name)
# "Arif Mardin"
Enum.each(artist.aliases, &IO.inspect(&1.name))
# Alternate names...

Summary

Functions

Creates a new Artist struct from the api response.

Types

t()

@type t() :: %ExDisco.Artists.Artist{
  aliases: [ExDisco.Artists.ArtistAlias.t()],
  cover_image: String.t() | nil,
  data_quality: String.t() | nil,
  id: pos_integer(),
  images: [ExDisco.Types.Image.t()],
  name: String.t(),
  name_variations: [String.t()],
  profile: String.t() | nil,
  real_name: String.t() | nil,
  releases_url: String.t() | nil,
  resource_url: String.t() | nil,
  thumb: String.t() | nil,
  uri: String.t() | nil
}

Functions

from_api(data)

@spec from_api(map()) :: t()

Creates a new Artist struct from the api response.