Add types and specs for LastFm module

This commit is contained in:
Claudio Ortolina
2024-11-11 20:51:00 +00:00
parent 8e1916c22a
commit c7b9aadb70
6 changed files with 38 additions and 1 deletions
+10
View File
@@ -17,6 +17,16 @@ defmodule LastFm.Track do
:scrobbled_at_label
]
@type t :: %__MODULE__{
musicbrainz_id: String.t(),
title: String.t(),
artist: Artist.t(),
album: Album.t(),
cover_url: String.t(),
scrobbled_at_uts: integer(),
scrobbled_at_label: String.t()
}
def from_api_response(raw_tracks) do
Enum.map(raw_tracks, fn t ->
album = %Album{