Lastex (Lastex v0.1.0)

Copy Markdown View Source

A Last.fm API client for Elixir.

Each Last.fm API namespace has its own module: Lastex.Album, Lastex.Artist, Lastex.Chart, Lastex.Geo, Lastex.Library, Lastex.Tag, Lastex.Track, and Lastex.User. Authentication lives in Lastex.Auth.

Every function returns {:ok, result} or {:error, %Lastex.Error{}}. List endpoints return a Lastex.Page carrying the data and pagination counts.

Configure your credentials before making any call:

config :lastex,
  api_key: System.get_env("LASTFM_API_KEY"),
  api_secret: System.get_env("LASTFM_API_SECRET")

Summary

Functions

Returns the configured API key.

Returns the configured API secret.

Functions

api_key()

Returns the configured API key.

Raises if :api_key is not configured.

api_secret()

Returns the configured API secret.

Raises if :api_secret is not configured. The secret is only needed for signed and authenticated calls.