This Spotify App pulls a list of playlists via a REST request, then randomly cycles through them playing a song from each.
mkdir ~/Spotify
cd ~/Spotify
git clone git://github.com/ddn/spotify-member-music.git
Your REST API should return a JSON encoded array of a name and a URL such as:
[{"uri":"http:\/\/open.spotify.com\/user\/ddn3d\/playlist\/4dnoJs5ZZgDK9B21pAJhpg","name":"David Dellanave"}]