Builder for app.rocksky.scrobble.createScrobble.
Example
alias Rocksky.Scrobble.Builder, as: Scrobble
Scrobble.new(title: "In Bloom", artist: "Nirvana")
|> Scrobble.album("Nevermind")
|> Scrobble.album_art("https://...")
|> Scrobble.timestamp(System.system_time(:second))
|> Scrobble.submit(client)The lighter-weight one-shot Rocksky.Scrobble.create_scrobble/2 is still
available if you prefer a keyword list.
Summary
Functions
Set album on the builder.
Set albumArt on the builder.
Set appleMusicLink on the builder.
Set artist on the builder.
Set artistPicture on the builder.
Set composer on the builder.
Set copyrightMessage on the builder.
Set deezerLink on the builder.
Set discNumber on the builder.
Set duration on the builder.
Set isrc on the builder.
Set label on the builder.
Set lastfmLink on the builder.
Set lyrics on the builder.
Set mbId on the builder.
Build a new request from a keyword list or map of fields.
Batch-set fields. attrs is a keyword list or map. Accepts the same
key forms as new/1.
Set releaseDate on the builder.
Set spotifyLink on the builder.
Submit the builder. Returns {:ok, body} on success or
{:error, %Rocksky.Error{}} on failure.
Set tidalLink on the builder.
Set timestamp on the builder.
Set title on the builder.
Return the JSON body that would be sent (nil fields stripped).
Set trackNumber on the builder.
Set year on the builder.
Set youtubeLink on the builder.
Types
@type t() :: %Rocksky.Scrobble.Builder{ album: term(), albumArt: term(), appleMusicLink: term(), artist: term(), artistPicture: term(), composer: term(), copyrightMessage: term(), deezerLink: term(), discNumber: term(), duration: term(), isrc: term(), label: term(), lastfmLink: term(), lyrics: term(), mbId: term(), releaseDate: term(), spotifyLink: term(), tidalLink: term(), timestamp: term(), title: term(), trackNumber: term(), year: term(), youtubeLink: term() }
Functions
Set album on the builder.
Set albumArt on the builder.
Set appleMusicLink on the builder.
Set artist on the builder.
Set artistPicture on the builder.
Set composer on the builder.
Set copyrightMessage on the builder.
Set deezerLink on the builder.
Set discNumber on the builder.
Set duration on the builder.
Set isrc on the builder.
Set label on the builder.
Set lastfmLink on the builder.
Set lyrics on the builder.
Set mbId on the builder.
Build a new request from a keyword list or map of fields.
Accepts either the canonical lexicon key (:mbId) or its snake-cased
equivalent (:mb_id). Unknown keys raise.
Batch-set fields. attrs is a keyword list or map. Accepts the same
key forms as new/1.
Set releaseDate on the builder.
Set spotifyLink on the builder.
@spec submit(t(), Rocksky.Client.t()) :: {:ok, term()} | {:error, Rocksky.Error.t()}
Submit the builder. Returns {:ok, body} on success or
{:error, %Rocksky.Error{}} on failure.
Returns {:error, %Rocksky.Error{reason: :missing_fields}} without
making a network call when any required field is nil.
Set tidalLink on the builder.
Set timestamp on the builder.
Set title on the builder.
Return the JSON body that would be sent (nil fields stripped).
Set trackNumber on the builder.
Set year on the builder.
Set youtubeLink on the builder.