# `ExDisco.Releases.Release`
[🔗](https://github.com/bo1ta/ex_disco/blob/main/lib/ex_disco/releases/release.ex#L1)

A specific release (pressing) of a recorded work from Discogs.

Unlike a Master (the abstract work), a Release is a concrete manifestation
with specific details: format (vinyl, CD, cassette), country, label, catalog
number, release date, and tracklist.

## Key Fields

- `:id` — Unique Discogs release ID
- `:title` — Release title
- `:year` — Year of release
- `:released` — Release date (YYYY-MM-DD format)
- `:country` — Country of origin
- `:status` — Release status (Official, Bootleg, etc.)
- `:artists` — Main artists (list of ArtistCredit)
- `:extraartists` — Guest artists, producers, etc.
- `:tracklist` — List of Track structs (songs, movements)
- `:formats` — List of Format structs (Vinyl, CD, etc.)
- `:labels` — List of label entities
- `:genres` — Genre classifications
- `:styles` — Genre styles (e.g., "House", "Techno" within electronic)
- `:images` — Cover art and other images
- `:community` — Community stats (rating, wants, haves)
- `:master_id` — Link to the abstract master release (if applicable)
- `:notes` — Release notes and condition information

## Nested Structures

Many fields are complex nested structs:
- `artists` — See `ExDisco.Types.ArtistCredit`
- `formats` — See `ExDisco.Releases.Format`
- `tracklist` — See `ExDisco.Releases.Track`
- `community` — See `ExDisco.Releases.Community`
- `images` — See `ExDisco.Types.Image`

## Examples

Fetch and explore a release:

    {:ok, release} = ExDisco.Releases.get_release(249504)
    IO.inspect(release.title)
    IO.inspect(release.year)

    release.artists
    |> Enum.map(&(&1.name))
    |> Enum.each(&IO.inspect/1)

    release.tracklist
    |> Enum.each(&IO.inspect(&1.title))

    IO.inspect(release.community.rating.average)

# `release_identifier`

```elixir
@type release_identifier() :: %{type: String.t(), value: String.t()}
```

# `t`

```elixir
@type t() :: %ExDisco.Releases.Release{
  artists: [ExDisco.Types.ArtistCredit.t()],
  community: ExDisco.Releases.Community.t() | nil,
  companies: [ExDisco.Types.CreditEntity.t()],
  country: String.t() | nil,
  data_quality: String.t() | nil,
  date_added: String.t() | nil,
  date_changed: String.t() | nil,
  estimated_weight: non_neg_integer() | nil,
  extraartists: [ExDisco.Types.ArtistCredit.t()],
  format_quantity: non_neg_integer() | nil,
  formats: [ExDisco.Releases.Format.t()],
  genres: [String.t()],
  id: pos_integer(),
  identifiers: [release_identifier()],
  images: [ExDisco.Types.Image.t()],
  labels: [ExDisco.Types.CreditEntity.t()],
  lowest_price: float() | nil,
  master_id: pos_integer() | nil,
  master_url: String.t() | nil,
  notes: String.t() | nil,
  num_for_sale: non_neg_integer() | nil,
  released: String.t() | nil,
  released_formatted: String.t() | nil,
  resource_url: String.t() | nil,
  series: [String.t()],
  status: String.t() | nil,
  styles: [String.t()],
  thumb: String.t() | nil,
  title: String.t(),
  tracklist: [ExDisco.Releases.Track.t()],
  uri: String.t() | nil,
  videos: [ExDisco.Releases.Video.t()],
  year: non_neg_integer() | nil
}
```

# `from_api`

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

---

*Consult [api-reference.md](api-reference.md) for complete listing*
