Rdio-Sock Documentation

Start with the following example:

rdio = RdioSock()

# Login to Rdio
rdio.user.login("<username>", "<password>")

# Song changed callback
def song_changed(track):
    print "%s - %s - %s" % (track.name, track.album, track.artist)

# PubSub connected callback
def pubsub_connected():
    # Subscribe services into pubsub updates
    rdio.pubsub.subscribe(rdio.services.fields)
    rdio.pubsub.subscribe(rdio.services.private)

    # Bind player events
    rdio.player.on_song_changed.bind(song_changed)

    # Force a player update to get the current state
    # (Updates after this are done via PubSub automatically)
    rdio.player.update()

rdio.pubsub.on_connected.bind(pubsub_connected)

# Connect the WebSocket-PubSub client to enable real-time updates
rdio.pubsub.connect()

When you have this working you should be able to dive into the documentation starting at the main client class rdiosock.RdioSock

Indices and tables