defmodule Spotifex do @moduledoc """ Provides access to the Spotify API. """ @spec configure(String.t, String.t, String.t) :: {:ok, []} defdelegate configure(client_id, client_secret, redirect_uri), to: Spotifex.Config, as: :configure @spec configure() :: {:ok, []} defdelegate configure, to: Spotifex.Config, as: :configure @spec configure(atom, String.t) :: {:ok, []} defdelegate configure(atom, token), to: Spotifex.Config, as: :configure @spec authorize_url!() :: String.t defdelegate authorize_url!, to: Spotifex.OAuthStrategy, as: :authorize_url! @spec authorize_url!(Enum.t) :: String.t defdelegate authorize_url!(scope), to: Spotifex.OAuthStrategy, as: :authorize_url! defdelegate authorize_url!(scope, state), to: Spotifex.OAuthStrategy, as: :authorize_url! defdelegate get_token!(code), to: Spotifex.OAuthStrategy, as: :get_token! ## - Playlists @spec my_playlists(binary, map) :: %Spotifex.Model.PageResponse{} defdelegate my_playlists(token \\ :global, options \\ %{}), to: Spotifex.API.Playlists, as: :my_playlists ## - Profiles @spec me(binary) :: %Spotifex.Model.Profile{} defdelegate me(token \\ :global), to: Spotifex.API.Profiles, as: :me @spec user(binary, binary) :: %Spotifex.Model.Profile{} defdelegate user(user_id, token \\ :global), to: Spotifex.API.Profiles, as: :user end