rocksky/song
app.rocksky.song.* — fetch and create song records.
Types
Builder for a createSong payload. Build one with new_song(...) and
pipe it through with_* setters, then create to get a Request.
pub type NewSong {
NewSong(
title: String,
artist: String,
album_artist: String,
album: String,
duration: option.Option(Int),
mb_id: option.Option(String),
isrc: option.Option(String),
album_art: option.Option(String),
track_number: option.Option(Int),
release_date: option.Option(String),
year: option.Option(Int),
disc_number: option.Option(Int),
lyrics: option.Option(String),
)
}
Constructors
-
NewSong( title: String, artist: String, album_artist: String, album: String, duration: option.Option(Int), mb_id: option.Option(String), isrc: option.Option(String), album_art: option.Option(String), track_number: option.Option(Int), release_date: option.Option(String), year: option.Option(Int), disc_number: option.Option(Int), lyrics: option.Option(String), )
Values
pub fn create(s: NewSong) -> rocksky.Request(types.Song)
Convert a NewSong into a Request(Song) ready for rocksky.send.
pub fn get_song(uri uri: String) -> rocksky.Request(types.Song)
app.rocksky.song.getSong — fetch a song by AT-URI. Combine with
with_mbid, with_isrc, or with_spotify_id instead of (or in addition
to) the URI; the server matches on any provided field.
pub fn get_song_by_isrc(
isrc isrc: String,
) -> rocksky.Request(types.Song)
Variant of get_song keyed by ISRC.
pub fn get_song_by_mbid(
mbid mbid: String,
) -> rocksky.Request(types.Song)
Variant of get_song keyed by MusicBrainz ID instead of URI.
pub fn get_song_by_spotify_id(
spotify_id spotify_id: String,
) -> rocksky.Request(types.Song)
Variant of get_song keyed by Spotify track ID.
pub fn get_song_recent_listeners(
uri uri: String,
) -> rocksky.Request(List(types.Listener))
app.rocksky.song.getSongRecentListeners — recent listeners of a song.
pub fn get_songs() -> rocksky.Request(List(types.Song))
app.rocksky.song.getSongs — paginated songs catalogue. Refine with
rocksky.limit, rocksky.offset, rocksky.genre, with_mbid,
with_isrc, with_spotify_id.
pub fn match_song(
title title: String,
artist artist: String,
) -> rocksky.Request(types.Song)
app.rocksky.song.matchSong — find an existing song record matching the
given metadata.
pub fn new_song(
title title: String,
artist artist: String,
album_artist album_artist: String,
album album: String,
) -> NewSong
pub fn with_isrc(
req: rocksky.Request(a),
isrc: String,
) -> rocksky.Request(a)
pub fn with_mbid(
req: rocksky.Request(a),
mbid: String,
) -> rocksky.Request(a)
pub fn with_spotify_id(
req: rocksky.Request(a),
id: String,
) -> rocksky.Request(a)