User.createPlaylistByArtist
From MeeMixWiki
Contents |
Overview
Create a playlist based on your local artist ID, MeeMix artist ID or artist 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 | libArtistId | string | look for artists based on your local artist id submitted with lib.submitTrack. |
| optional | artistId | string | create a playlist based on MeeMix artist ID. |
| optional | artistName | string | create a playlist based on an artist name. |
NOTE: either libArtistId, artistId or artistName must be specified in the request.
REST request example:
http://ws.shadow.meemix.com:8080/mxws/services/mxws/user.createPlaylistByArtist?partner_id=1001&partnerKey=...&userId=jim&artistName=Pearl%20Jam
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:userCreatePlaylistByArtistRequest> <partnerId>1001</partnerId> <partnerKey>...</partnerKey> <userId>jim</userId> <artistName>nirvana</artistName> </q0:userCreatePlaylistByArtistRequest> </soapenv:Body> </soapenv:Envelope>
Response
The operation returns the newly created playlist.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Body> <userCreatePlaylistByArtistResponse xmlns:ns1="http://ws.meemix.com:8080/mxws/"> <playlist> <playlistId>17</playlistId> <playlistName>Nirvana</playlistName> <pulse>1</pulse> <surprise>0</surprise> <atmosphere>1</atmosphere> </playlist> <artistSuggestions /> </userCreatePlaylistByArtistResponse> </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 artistName, the following example response will be sent: (the following example is a response to create a playlist based on the artist name "Pink f")
<ns1:userCreatePlaylistByArtistResponse>
<playlist xsi:nil="1" />
<artistSuggestions>
<artist>
<artistId>4845</artistId>
<artistName>Pink</artistName>
</artist>
<artist>
<artistId>330</artistId>
<artistName>Pink Floyd</artistName>
</artist>
<artist>
<artistId>23750</artistId>
<artistName>Pink Cream 69</artistName>
</artist>
</artistSuggestions>
</ns1:userCreatePlaylistByArtistResponse>
See the Artist Suggestions data type page for more information.
This operation can be called again using one of the artist 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 |
| 7 | Artist name not found |
| 8 | Invalid artist ID |
| 17 | Invalid input (either artistId or artistName must be specified in the request) |
For a full faults list and example of soapFault please visit the Faults page.
