First pass at uniformed types, specs and docs
- spec public functions (skipping controllers, views, live views and components) - use types instead of explanations in docs - remove redundant docs - fix typos
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
defmodule Discogs do
|
||||
alias Discogs.API
|
||||
|
||||
@spec get_artist(integer() | String.t()) :: {:ok, map()} | {:error, term()}
|
||||
def get_artist(id) do
|
||||
discogs_config = discogs_config()
|
||||
|
||||
API.get_artist(id, discogs_config)
|
||||
end
|
||||
|
||||
@spec get_artist_image(String.t()) :: {:ok, binary()} | {:error, :cover_not_available}
|
||||
def get_artist_image(url) do
|
||||
discogs_config = discogs_config()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user