AppleMusicAPI.Song (apple_music_api v0.3.0)

Copy Markdown View Source

Song struct representing a track in Apple Music.

Fields

  • id: Apple Music song ID
  • type: Resource type (always "songs")
  • href: API URL for this resource
  • name: Song name
  • artist_name: Primary artist name
  • album_name: Album name
  • isrc: International Standard Recording Code
  • duration_in_millis: Duration in milliseconds
  • track_number: Track number on the album
  • disc_number: Disc number for multi-disc albums
  • release_date: Release date (YYYY-MM-DD format)
  • artwork_url: URL to album artwork
  • url: Apple Music URL for the song
  • previews: List of preview URLs

Summary

Functions

Decode a song resource from the Apple Music API response.

Types

t()

@type t() :: %AppleMusicAPI.Song{
  album_name: String.t() | nil,
  artist_name: String.t() | nil,
  artwork_url: String.t() | nil,
  disc_number: integer() | nil,
  duration_in_millis: integer() | nil,
  href: String.t() | nil,
  id: String.t() | nil,
  isrc: String.t() | nil,
  name: String.t() | nil,
  previews: [map()] | nil,
  release_date: String.t() | nil,
  track_number: integer() | nil,
  type: String.t() | nil,
  url: String.t() | nil
}

Functions

from_map(data)

@spec from_map(map()) :: t()

Decode a song resource from the Apple Music API response.