To get artist info, try mbid and then artist name

This commit is contained in:
Claudio Ortolina
2024-12-04 21:07:56 +00:00
parent 39b925676f
commit 8350ffd3a4
5 changed files with 40 additions and 13 deletions
+3 -1
View File
@@ -2,7 +2,9 @@ defmodule LastFm.APIBehaviour do
alias LastFm.{Artist, Config, Track}
@type musicbrainz_id :: String.t()
@type name :: String.t()
@type config :: Config.t()
@callback get_recent_tracks(config) :: {:ok, [Track.t()]} | {:error, String.t()}
@callback get_artist_info(musicbrainz_id, config) :: {:ok, Artist.t()} | {:error, String.t()}
@callback get_artist_info({:musicbrainz_id, musicbrainz_id} | {:name, name}, config) ::
{:ok, Artist.t()} | {:error, String.t()}
end