User.createPlaylistByTrack
From MeeMixWiki
Contents |
Overview
Create a playlist based on your local track id, MeeMix track ID or track name.
Request
Parameters:
| Required | Name | Type | Description |
|---|---|---|---|
| required | partnerId | string | your assigned partner ID. |
| required | partnerKey | string | your assigned 32-character partner key. |
| required | userId | string | unique user ID. |
| optional | libId | string | create a playelist based on media library created with lib.create. |
| optional | libTrackId | string | create a playlist based on your local track id submitted with lib.submitTrack. |
| optional | trackId | string | create a playlist based on MeeMix track ID. |
| optional | trackName | string | create a playlist based on a track name. |
| optional | artistName | string | In case you are trying to create a playlist using the trackName option, it is recommended to send the artistName as well. |
NOTE: either trackId or trackName must be specified in the request.
REST request example:
http://ws.shadow.meemix.com:8080/mxws/services/mxws/user.createPlaylistByTrack?partnerId=1001&partnerKey=...&userId=jim&trackName=November%20Rain
SOAP request example:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:q0="http://ws.meemix.com:8080/mxws/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchemainstance"> <soapenv:Body> <q0:userCreatePlaylistByTrackRequest> <partnerId>1001</partnerId> <partnerKey>...</partnerKey> <userId>jim</userId> <trackName>november rain</trackName> </q0:userCreatePlaylistByTrackRequest> </soapenv:Body> </soapenv:Envelope>
Response
The operation returns the newly created playlist.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Body> <userCreatePlaylistByTrackResponse xmlns:ns1="http://ws.meemix.com:8080/mxws/"> <playlist> <playlistId>20</playlistId> <playlistName>November Rain</playlistName> <pulse>1</pulse> <surprise>0</surprise> <atmosphere>1</atmosphere> </playlist> <trackSuggestions /> </userCreatePlaylistByTrackResponse> </soapenv:Body> </soapenv:Envelope>
In case there is more than one option to create a playlist based on the request or in case of a spelling mistake in the trackName, the following example response will be sent: (the following example is a response to create a playlist based on the trackName "One")
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Body> <userCreatePlaylistByTrackResponse xmlns:ns1="http://ws.meemix.com:8080/mxws/"> <playlist xmlns:xsi="http://www.w3.org/2001/XMLSchemainstance" xsi:nil="1" /> <trackSuggestions> <track> <trackId>579736</trackId> <trackName>One</trackName> <artist> <artistId>8517</artistId> <artistName>Eyedea & Abilities</artistName> </artist> <album> <albumId>38598</albumId> <albumName>First Born</albumName> </album> </track> <track> <trackId>136835</trackId> <trackName>One</trackName> <artist> <artistId>241</artistId> <artistName>Metallica</artistName> </artist> <album> <albumId>9433</albumId> <albumName>...And Justice For All</albumName> </album> </track> .. .. </trackSuggestions> </userCreatePlaylistByTrackResponse> </soapenv:Body> </soapenv:Envelope>
See the Track Suggestions data type page for more information.
This operation can be called again using one of the track IDs supplied in this response to complete the create playlist process.
Faults
| Code | Description |
|---|---|
| 1 | Invalid partner ID |
| 2 | Invalid partner key |
| 4 | Invalid user ID |
| 9 | Track name was not found |
| 10 | Invalid track ID |
| 17 | Invalid input (either trackId or trackName must be specified in the request) |
For a full faults list and example of soapFault please visit the Faults page.
