View Source LastfmArchive.Behaviour.LastfmClient behaviour (lastfm_archive v0.10.0)
Behaviour and data struct for retrieving data from Lastfm API.
Link to this section Summary
Callbacks
Returns the total playcount, registered, i.e. first scrobble 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
Link to this section Callbacks
@callback info(user(), client()) :: {:ok, {playcount(), registered_time()}} | {:error, term()}
Returns the total playcount, registered, i.e. first scrobble time for a user.
@callback playcount(user(), {from(), to()}, client()) :: {:ok, {playcount(), latest_scrobble_time()}} | {:error, term()}
Returns the playcount and the latest scrobble date of a user for a given time range.
@callback scrobbles(user(), {page(), limit(), from(), to()}, client()) :: {:ok, map()} | {:error, term()}
Returns the scrobbles of a user for a given time range.
See Lastfm API documentation for more details.