f29dd1f0ab
The release group contains only 25 releases, which breaks tracking scrobble status. Albums like "Toto IV" or "Hounds of Love" end up looking like they're not part of the collections because the individual releases are not stored. Still error prone, because this change doesn't paginate to more than 100 records, but that will be addressed in a future commit.
17 lines
662 B
Elixir
17 lines
662 B
Elixir
defmodule MusicBrainz.APIBehaviour do
|
|
@type musicbrainz_id :: String.t()
|
|
@type config :: MusicBrainz.Config.t()
|
|
|
|
@callback get_release_group(musicbrainz_id, config) :: {:ok, map()} | {:error, String.t()}
|
|
|
|
@callback get_releases(musicbrainz_id, config) :: {:ok, map()} | {:error, String.t()}
|
|
|
|
@callback get_release(musicbrainz_id, config) :: {:ok, map()} | {:error, String.t()}
|
|
|
|
@callback search_release_group(String.t(), Keyword.t(), config) ::
|
|
{:ok, [map()]} | {:error, String.t()}
|
|
|
|
@callback get_cover_art({:musicbrainz_id, musicbrainz_id()} | {:url, String.t()}, config) ::
|
|
{:ok, binary()} | {:error, String.t()}
|
|
end
|