Use LastFm.Config where needed

This commit is contained in:
Claudio Ortolina
2024-12-03 09:18:55 +00:00
parent b49434b789
commit 2094c1cf7b
6 changed files with 36 additions and 34 deletions
+4 -5
View File
@@ -1,9 +1,8 @@
defmodule LastFm.APIBehaviour do
alias LastFm.{Artist, Track}
alias LastFm.{Artist, Config, Track}
@type musicbrainz_id :: String.t()
@type user :: String.t()
@type api_key :: String.t()
@callback get_recent_tracks(user, api_key) :: {:ok, [Track.t()]} | {:error, String.t()}
@callback get_artist_info(musicbrainz_id, api_key) :: {:ok, Artist.t()} | {:error, 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()}
end