Playlist.setSurprise
From MeeMixWiki
Contents |
Overview
Set the playlist surprise level. For more information about surprise, see the Playlist data type page.
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. |
| required | playlistId | string | the playlistId provided earlier by calling either user.getPlaylists operation or the user.createPlaylistBy* operations. |
| required | surpriseLevel | int | the playlist surprise level is an integer between 0 and 6. A surprise level of 0 will result in playing tracks that are musically relatively similar, while 6 will cause the playlist to include tracks which are musically far from the playlist’s canonical tracks. |
REST request example:
http://ws.shadow.meemix.com:8080/mxws/services/mxws/playlist.setSurprise?partnerId=1001&partnerKey=...&userId=jim&playlistId=17&surpriseLevel=5
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:playlistSetSurpriseRequest> <partnerId>1001</partnerId> <partnerKey>...</partnerKey> <userId>jim</userId> <playlistId>17</playlistId> <surpriseLevel>5</surpriseLevel> </q0:playlistSetSurpriseRequest> </soapenv:Body> </soapenv:Envelope>
Response
If no faults have been thrown, the playlist surprise level was set successfully.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Body> <playlistSetSurpriseResponse xmlns:ns1="http://ws.meemix.com:8080/mxws/"> <success>true</success> </playlistSetSurpriseResponse> </soapenv:Body> </soapenv:Envelope>
Faults
| Code | Description |
|---|---|
| 1 | Invalid partner ID |
| 2 | Invalid partner key |
| 4 | Invalid user ID |
| 6 | Invalid playlist ID |
For a full faults list and example of soapFault please visit the Faults page.
