API - davekilian/rapi GitHub Wiki
Overview
rapi
auth(username, password)
-- Create a sessionreadlibrary(session)
-- Gets the contents of the user's library
rapi.Artist
id
-- A string containing the artist's unique IDname
-- The human-readable display name of the albumimage
-- The URl to a picture of the artistalbumids
-- A list of IDs of albums by this artist
rapi.Album
id
-- A string containing the album's unique IDartistid
-- The ID of the album artistname
-- The human-readable display name of the albumart
-- The URL to the album's album artyear
-- The year this album was releasedtrackids
-- A list of IDs of tracks in this album
rapi.Track
id
-- A string containing the track's unique IDalbumid
-- A string containing the ID of the album this tracks appears inartistid
-- A string containing the ID of the song's album artistname
-- The track titleduration
-- The duration of the track in secondsgenre
-- The track's musical genrestream(format)
-- Opens a stream to the track's contents
auth
Create a session
session = rapi.auth('[email protected]', 'password')
library
Get the contents of the user's library. Returns a list(string)
containing the ID of every track in the user's library
tracks = rapi.library(session)
for track in tracks:
print track.id