Lib.submitTrack
From MeeMixWiki
Contents |
Overview
Submits a track to a media library you previously created using the lib.create operation.
Please supply any additional information you have on the track (in the appropriate optional fields).
NOTE: the actual synchronization of a submitted track with the MeeMix database is performed offline, and may take a period of time. Notification will be sent once synchronization is complete.
Request
Parameters:
| Required | Name | Type | Description |
|---|---|---|---|
| required | partnerId | string | your assigned partner ID. |
| required | partnerKey | string | your assigned 32-character partner key. |
| required | libId | string | the ID you assigned to the library. |
| required | libTrackId | string | your own local track identifier. You can use libTrackId in all related API operations. libTrackId is part of the Track data type. |
| required | trackName | string | the name of the track you wish to submit. |
| required | libArtistId | string | your own local artist identifier. You can use libArtistId in all related API operations. libArtistId is part of the Artist data type |
| required | artistName | string | the artist of the track you wish to submit. |
| optional | albumName | string | the name of the album featuring the track you wish to submit. |
| optional | composer | string | the composer of the track you wish to submit. |
| optional | producer | string | the producer of the track you wish to submit. |
| optional | genre | string | the genre of the track you wish to submit. |
| optional | year | int | the release year of the track you wish to submit. |
| optional | bpm | int | the BPM of the track you wish to submit. |
| optional | playedCount | int | how many times this track was played. |
| optional | rate | int | the track's rating. |
| optional | links | array(Link) | any additional information you want to associate with the track (e.g, ringtone URLs, video clips). This information will later be useful when sent to you in any operation that returns a Track reply. Use the lib.addLinkType function to create a new link type. |
| optional | mediaFile | base64Binary | submit the actual media file to MeeMix. The binary data should be base64 encoded. |
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:libSubmitTrackRequest> <partnerId>1001</partnerId> <partnerKey>...</partnerKey> <libId>1</libId> <libTrackId>82065</libTrackId> <trackName>stan</trackName> <libArtistId>1830</libArtistId> <artistName>eminem</artistName> <albumName xsi:nil="true" /> <composer xsi:nil="true" /> <producer xsi:nil="true" /> <genre>Hip Hop</genre> <year xsi:nil="true" /> <bpm xsi:nil="true" /> <playedCount xsi:nil="true" /> <rate xsi:nil="true" /> <links> <link> <linkType>ringtone</linkType> <linksData> <linkData> <linkId>1</linkId> <linkCookie>http://www.example.com/ringtone_url</linkCookie> </linkData> </linksData> </link> </links> </q0:libSubmitTrackRequest> </soapenv:Body> </soapenv:Envelope>
Response
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Body> <libSubmitTrackResponse xmlns:ns1="http://ws.meemix.com/mxws/"> <trackStatus>Pending</trackStatus> </libSubmitTrackResponse> </soapenv:Body> </soapenv:Envelope>
Faults
| Code | Description |
|---|---|
| 1 | Invalid partner ID |
| 2 | Invalid partner key |
| 15 | Internal server error |
| 18 | Invalid library ID |
For a full faults list and example of soapFault please visit the Faults page.
