Lastfm.Client behaviour (lastfm_archive v0.9.0) View Source

A behaviour module for retrieving data from Lastfm via its API.

Link to this section Summary

Callbacks

Returns the total playcount, registered time for a user.

Returns the playcount and the latest scrobble date of a user for a given time range.

Returns the scrobbles of a user for a given time range.

Link to this section Types

Specs

from() :: integer()

Specs

limit() :: integer()

Specs

page() :: integer()

Specs

t() :: %Lastfm.Client{api_key: binary(), endpoint: binary(), method: binary()}

Specs

to() :: integer()

Specs

user() :: binary()

Link to this section Callbacks

Specs

info(user(), t()) :: {integer(), integer()} | {:error, term()}

Returns the total playcount, registered time for a user.

Specs

playcount(user(), {from(), to()}, t()) ::
  {integer(), integer()} | {:error, term()}

Returns the playcount and the latest scrobble date of a user for a given time range.

Specs

scrobbles(user(), {page(), limit(), from(), to()}, t()) ::
  map() | {:error, term()}

Returns the scrobbles of a user for a given time range.

See Lastfm API documentation for more details.