Similar.getTracksByArtist
From MeeMixWiki
Contents |
Overview
In Single Request Discovery Mode, this operation will search for standalone track recommendations according to a given artist name, your local artist id or MeeMix artist ID, using your partner ID and partner key. Recommendations are based on musical DNA similarity.
Request
Parameters:
| Required | Name | Type | Description |
|---|---|---|---|
| required | partnerId | string | your assigned partner ID. |
| required | partnerKey | string | your assigned partner key. |
| optional | libId | string | look for tracks based on media library created with lib.create. |
| optional | linkType | string | look for tracks based on a specific Content Type (e.g, ringtone, video) submitted with lib.submitTrack. |
| optional | libArtistId | string | look for tracks based on your local artist id submitted with lib.submitTrack. |
| optional | artistId | string | look for tracks based on an MeeMix artist ID. |
| optional | artistName | string | look for tracks based on an artist name. |
Note: either artistName or artistId must be presented in the request.
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:similarGetTracksByArtistRequest> <partnerId>1001</partnerId> <partnerKey>...</partnerKey> <artistName>nirvana</artistName> </q0:similarGetTracksByArtistRequest> </soapenv:Body> </soapenv:Envelope>
REST request example:
http://ws.shadow.meemix.com:8080/mxws/services/mxws/similar.getTracksByArtist?partnerId=1001&partnerKey=...&artistName=nirvana
Response
Data Types:
In case there is more than one result for the requested artistName or there is a spelling mistake, the following example response will be sent: (the following example is a response to tracks requested based on an artist named 'red hot')
SOAP response example:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Body> <similarGetTracksByArtistResponse xmlns:ns1="http://ws.meemix.com:8080/mxws/"> <tracks /> <artistSuggestions> <artist> <artistId>3166</artistId> <artistName>Red</artistName> </artist> <artist> <artistId>1884</artistId> <artistName>Hot Hot Heat</artistName> </artist> <artist> <artistId>1444</artistId> <artistName>Hot Chip</artistName> </artist> <artist> <artistId>21506</artistId> <artistName>The Red Hot Chili Peppers</artistName> </artist> </artistSuggestions> </similarGetTracksByArtistResponse> </soapenv:Body> </soapenv:Envelope>
Here is an example of successful response (looking for artistName "Nirvana"):
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Body> <similarGetTracksByArtistResponse xmlns:ns1="http://ws.meemix.com:8080/mxws/"> <tracks> <track> <trackId>1712318</trackId> <trackName>In My World</trackName> <artist> <artistId>37632</artistId> <artistName>Sizen</artistName> </artist> <album> <albumId>117535</albumId> <albumName>What Do You See</albumName> </album> </track> <track> <trackId>470054</trackId> <trackName>Bleed</trackName> <artist> <artistId>3919</artistId> <artistName>Soulfly</artistName> </artist> <album> <albumId>31328</albumId> <albumName>Soulfly</albumName> </album> </track> <track> <trackId>9947</trackId> <trackName>Dollar Bill</trackName> <artist> <artistId>415</artistId> <artistName>Screaming Trees</artistName> </artist> <album> <albumId>734</albumId> <albumName>Sweet Oblivion</albumName> </album> </track> .. .. </tracks> <artistSuggestions /> </similarGetTracksByArtistResponse> </soapenv:Body> </soapenv:Envelope>
Faults
| Code | Description |
|---|---|
| 1 | Invalid partner ID |
| 2 | Invalid partner key |
| 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.
