Similar.getTracksByTrack
From MeeMixWiki
Contents |
Overview
In Single Request Discovery Mode, this operation will search for standalone track recommendations according to a given track name, your local track id, or MeeMix track 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, ringtones, videos) submitted with lib.submitTrack. |
| optional | libTrackId | string | look for tracks based on your local track id submitted with lib.submitTrack. |
| optional | artistName | string | in case you are trying to search using the trackName option, it is recommended to send the artistName as well. |
| optional | trackName | string | look for tracks based on an track name. |
| optional | trackId | string | look for tracks based on an MeeMix track ID. |
Note: either trackName or trackId 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/mxws/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchemainstance"> <soapenv:Body> <q0:similarGetTracksByTrackRequest> <partnerId>1001</partnerId> <partnerKey>...</partnerKey> <artistName>nirvana</artistName> <trackName>come as you are</trackName> <trackId /> </q0:similarGetTracksByTrackRequest> </soapenv:Body> </soapenv:Envelope>
REST request example:
http://ws.shadow.meemix.com:8080/mxws/services/mxws/similar.getTracksByTrack?partnerId=1001&partnerKey=...&artistName=nirvana&trackName=come%20as%20you%20are
Response
Data Types:
Here is an example of successful response (looking for artistName "Nirvana" and trackName "Come As You Are"):
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Body> <similarGetTracksByTrackResponse xmlns:ns1="http://ws.meemix.com/mxws/"> <tracks> <track> <trackId>75300</trackId> <trackName>Comedown</trackName> <duration>326</duration> <artist> <artistId>1619</artistId> <artistName>Bush</artistName> </artist> <album> <albumId>5342</albumId> <albumName>Sixteen Stone</albumName> </album> <links xmlns:xsi="http://www.w3.org/2001/XMLSchemainstance" xsi:nil="1" /> </track> <track> <trackId>60230</trackId> <trackName>Rape Me</trackName> <duration>170</duration> <artist> <artistId>552</artistId> <artistName>Nirvana</artistName> </artist> <album> <albumId>4296</albumId> <albumName>In Utero</albumName> </album> <links xmlns:xsi="http://www.w3.org/2001/XMLSchemainstance" xsi:nil="1" /> </track> <track> <trackId>6715</trackId> <trackName>Immortality</trackName> <duration>328</duration> <artist> <artistId>386</artistId> <artistName>Pearl Jam</artistName> </artist> <album> <albumId>496</albumId> <albumName>Vitalogy</albumName> </album> <links xmlns:xsi="http://www.w3.org/2001/XMLSchemainstance" xsi:nil="1" /> </track> .. .. </tracks> <trackSuggestions /> </similarGetTracksByTrackResponse> </soapenv:Body> </soapenv:Envelope>
Faults
| Code | Description |
|---|---|
| 1 | Invalid partner ID |
| 2 | Invalid partner key |
| 9 | Track name not found |
| 10 | Invalid track ID |
| 17 | Invalid input (either trackId or trackName must be specified in the request) |
