Introduction
The following are variables used in the examples. When used in a URL, variables should be URL encoded (e.g. escape spaces with %20)
USER = Musicmobs user name
PASSKEY = md5 hash of a Musicmobs user password
ARTIST = an artist name
ALBUM = an album name
SONG = a song name
PLAYLIST = title of a playlist
PLAYCOUNT = song playcount
RATING = song rating of 1-100
Verify a User and Password
To check if a user and password match, request this URL:
http://xml.musicmobs.com/services/user/USER?display=none&passkey=PASSKEY
If the user and password match, there will be an attribute "passkey" in the User element that matches the PASSKEY. If they don't match there will be no "passkey" attribute.
Sync Stats
Musicmobs uses a bulk update method to import stats. Dump the entire library information into a tab delimited string where each song is on its own line. The column order is:
ARTIST SONG PLAYCOUNT ALBUM RATING
Note: Don't URL encode these!
Do a HTTP POST to the following URL with the above string as the POST body:
http://control.musicmobs.com/updateStats?user=USER&passkey=PASSKEY
Stats should show up on a user page within a few minutes.
Publish a Playlist
All playlists should be in XSPF format. To read more about XSPF visit www.xspf.org.
There are a lot of optional elements in a XSPF but Musicmobs will be looking for a structure like this:
<playlist version="0" xmlns="http://xspf.org/ns/0/">
<title>Glam Hooks</title>
<annotation>Wham, Glam, Thank You Ma'am</annotation>
<trackList>
<track>
<creator>Queen</creator>
<album>Jazz</album>
<title>Fat Bottomed Girls</title>
</track>
<track>
<creator>Queen</creator>
<album>Jazz</album>
<title>Bicycle Race</title>
</track>
<track>
<creator>David Bowie</creator>
<album>The Rise and Fall of Ziggy Stardust</album>
<title>Suffragette City</title>
</track>
</trackList>
</playlist>
The <annotation> element is the description for the playlist. The following HTML tags are allowed in the annotation:
<br><h1><b><i><a><ul><li><pre><hr><blockquote><img><div><span>
To submit the playlist, do a HTTP POST to the following URL with the XSPF string as the POST body:
http://control.musicmobs.com/postPlaylist?user=USER&passkey=PASSKEY
Locate a XSPF
All songs lists on Musicmobs are exposed as XSPF via our REST API. Here are the various URLs:
All artists must be URL encoded and separated by the + character.
With all of these URLs you can append the query string: ?results=X where X is the number of songs you want in the playlist. For example:
http://xspf.musicmobs.com/music/Kiss.xspf?results=50
Play a XSPF
Musicmobs XSPFs do not contain any track location information. We take a content resolution approach to dealing with playlists. What this means is that once you get a XSPF, it's up to you to locate the songs. Mobster locates and plays songs in iTunes using Applescript on OS X and COM on Windows. You can check out the code for Mobster here: http://sourceforge.net/projects/mmobster.
In addition to playing XSPFs, we think there are opportunities to develop applications around searching the net for the songs listed and doing neat things with the display of the playlists. Please contact us if you've developed an application that works with Musicmobs XSPFs and we'll list it on the website.
Change Your Featured Album
On top of the navigation panel of every user's page, there is room for a featured album. To change the album use this url:
http://control.musicmobs.com/featureAlbum?user=USER&passkey=PASSKEY&artist=ARTIST&album=ALBUM
Since we get our cover data from Amazon, not all albums have artwork.
Comments (0)
You don't have permission to comment on this page.