Rocksky.Scrobble (Rocksky v0.1.0)

Copy Markdown View Source

app.rocksky.scrobble.* endpoints.

Summary

Functions

Create a new scrobble. Requires an authenticated client.

Fetch a scrobble. Params: :uri.

List scrobbles. Params: :did, :following, :limit, :offset.

Functions

create_scrobble(client, body)

Create a new scrobble. Requires an authenticated client.

Required keys: :title, :artist. See the lexicon for the full set of optional fields (album, mbId, isrc, spotifyLink, timestamp, …).

Example

client
|> Rocksky.Scrobble.create_scrobble(
  title: "In Bloom",
  artist: "Nirvana",
  album: "Nevermind",
  timestamp: System.system_time(:second)
)

get_scrobble(client, params \\ [])

Fetch a scrobble. Params: :uri.

get_scrobbles(client, params \\ [])

List scrobbles. Params: :did, :following, :limit, :offset.