Class Artist

Represents an artist and provides methods to load and manage artist data.

Constructors

Properties

load: ((id: string) => Promise<Artist>) = ...
name: string = ""
releases: Release[] = []
_loaded: boolean = true
id?: string

Accessors

  • get releaseTypes(): string[]
  • Gets the types of releases associated with the artist.

    Returns string[]

    • An array of release types.
  • get duration(): number
  • Gets the total duration of all tracks by the artist.

    Returns number

    • The total duration of all tracks.

Methods

  • Loads an artist by ID.

    Parameters

    • _id: string

      The ID of the artist to load.

    Returns Promise<Artist>

    • A promise that resolves to the loaded artist.
  • Loads additional data for the artist, including releases.

    Returns Promise<Artist>

    • A promise that resolves to the artist with loaded data.