elixirfm v1.0.1 Elixirfm.User

Last.fm User Endpoints

Link to this section Summary

Functions

Get a list of tracks by a given artist scrobbled by this user, including scrobble time. Can be limited to specific timeranges, defaults to all time.

Get a list of the user's friends on Last.fm.

Get a user's profile infomation.

Get the last 50 tracks loved by a user.

Get a list of the recent tracks listened to by this user. Also includes the currently playing track with the nowplaying="true" attribute if the user is currently listening.

Get the top albums listened to by a user. You can stipulate a time period. Sends the overall chart by default.

Get the top artists listened to by a user. You can stipulate a time period. Sends the overall chart by default.

Get the top tags used by this user.

Get the top tracks listened to by a user. You can stipulate a time period. Sends the overall chart by default.

Get a list of available charts for this user, expressed as date ranges which can be sent to the chart services.

Link to this section Types

Link to this type

recent_track_arg()

Specs

recent_track_arg() ::
  {:limit, non_neg_integer()}
  | {:page, non_neg_integer()}
  | {:extended, non_neg_integer()}
  | {:to, non_neg_integer()}
  | {:from, non_neg_integer()}
Link to this type

recent_track_args()

Specs

recent_track_args() :: [recent_track_arg()]

Link to this section Functions

Link to this function

artist_tracks(user, artist, args \\ [page: 1])

Specs

artist_tracks(String.t(), String.t(), [{:page, non_neg_integer()}]) ::
  Elixirfm.response()

Get a list of tracks by a given artist scrobbled by this user, including scrobble time. Can be limited to specific timeranges, defaults to all time.

start and end times not implemented yet

Link to this function

friends(query, args \\ [limit: 15, page: 1, recenttracks: false])

Specs

friends(String.t(),
  limit: non_neg_integer(),
  page: non_neg_integer(),
  recenttracks: boolean()
) :: Elixirfm.response()

Get a list of the user's friends on Last.fm.

Specs

Get a user's profile infomation.

Link to this function

loved_tracks(query, args \\ [page: 1, limit: 50])

Specs

loved_tracks(String.t(), page: non_neg_integer(), limit: non_neg_integer()) ::
  Elixirfm.response()

Get the last 50 tracks loved by a user.

Link to this function

recent_tracks(query, args \\ [limit: 20, page: 1, extended: 0, to: 0, from: 0])

Specs

recent_tracks(String.t(), recent_track_args()) :: Elixirfm.response()

Get a list of the recent tracks listened to by this user. Also includes the currently playing track with the nowplaying="true" attribute if the user is currently listening.

extended argument accepts 1 or 0 as true or false

to and from arguments not implemented yet

Link to this function

top_albums(query, args \\ [period: "overall", page: 1, limit: 15])

Specs

top_albums(String.t(),
  period: String.t(),
  page: non_neg_integer(),
  limit: non_neg_integer()
) :: Elixirfm.response()

Get the top albums listened to by a user. You can stipulate a time period. Sends the overall chart by default.

peroid argument acceptes: overall | 7day | 1month | 3month | 6month | 12month

Link to this function

top_artists(query, args \\ [period: "overall", page: 1, limit: 15])

Specs

top_artists(String.t(),
  period: String.t(),
  page: non_neg_integer(),
  limit: non_neg_integer()
) :: Elixirfm.response()

Get the top artists listened to by a user. You can stipulate a time period. Sends the overall chart by default.

Link to this function

top_tags(query, args \\ [limit: 15])

Specs

top_tags(String.t(), [{:limit, non_neg_integer()}]) :: Elixirfm.response()

Get the top tags used by this user.

Link to this function

top_track(query, args \\ [peroid: "overall", page: 1, limit: 15])

Specs

top_track(String.t(),
  peroid: String.t(),
  page: non_neg_integer(),
  limit: non_neg_integer()
) :: Elixirfm.response()

Get the top tracks listened to by a user. You can stipulate a time period. Sends the overall chart by default.

Link to this function

weekly_charts(user)

Specs

weekly_charts(String.t()) :: Elixirfm.response()

Get a list of available charts for this user, expressed as date ranges which can be sent to the chart services.

Link to this function

weekly_track_chart(query, min, max)