Organization

The organization related methods allow you to specify streaming options as well as build a list of files to stream.

lockerData

http://ws.mp3tunes.com/api/v0/lockerData?sid=<session id>&partner_token=<partner token>&output=<output format>

parameters

sid (required)

A valid session id, received from the “login” method.

partner_token (required)

A valid partner token. A Partner Token is used to uniquely identify and authenticate all entities using API's to communicate with MP3tunes.com. If you do not already have a partner token you may request one from the partner page.

output (optional)

Your preferred output format. These include xml, and json.

type (optional)

Type options constist of artist, album, track, and playlist. Passing a type of artist, album, or playlist will return the respective id's of those types of content in a user's locker.

album_id (optional)

Id of an album in a user's locker. A list of albums in a user's locker can be retrieved by passing a type of album.

artist_id (optional)

Id of an artist in a user's locker. A list of artists in a user's locker can be retrieved by passing a type of artist.

The lockerData method allows you to retrieve a list of the contents of a user's locker. You can retrieve a list of every track in a locker, or compile a list of only artists, albums, or playlists. You use the track type to list all of the tracks in a user's locker. In order to list only the tracks by a specific artist or in a specific album you use the track type in conjunction with the artist_id and album_id parameters.

Example 2.9. Listing albums in a user's locker (JSON)


http://ws.mp3tunes.com/api/v0/lockerData?sid=ec08029c87e05b2c49b6ac0cd194b68b&output=json&type=album

[{"albumId":"160",
  "albumTitle":"...In All Their Splendor",
  "artistId":"130","artistName":"Li'l Cap'n Travis"},
 {"albumId":"406",
  "albumTitle":"..aspen it is",
  "artistId":"301",
  "artistName":"..aspenitis"},
 {"albumId":"13",
  "albumTitle":"10 Horse Johnson",
  "artistId":"11",
  "artistName":"10 Horse Johnson"},
 {"albumId":"902",
  "albumTitle":"Scenes From A Memory",
  "artistId":"25",
  "artistName":"Dream Theater"}]

       

Example 2.10. Listing albums in a user's locker (XML)


http://ws.mp3tunes.com/api/v0/lockerData?sid=ec08029c87e05b2c49b6ac0cd194b68b&output=xml&type=album

<mp3tunes>
 <item>
  <albumId>160</albumId>
  <albumTitle>...In All Their Splendor</albumTitle>
  <artistId>130</artistId>
  <artistName>Li'l Cap'n Travis</artistName>
 </item>
 <item>
  <albumId>406</albumId>
  <albumTitle>..aspen it is</albumTitle>
  <artistId>301</artistId>
  <artistName>..aspenitis</artistName>
 </item>
 <item>
  <albumId>13</albumId>
  <albumTitle>10 Horse Johnson</albumTitle>
  <artistId>11</artistId>
  <artistName>10 Horse Johnson</artistName>
 </item>
 <item>
  <albumId>902</albumId>
  <albumTitle>Scenes From A Memory</albumTitle>
  <artistId>25</artistId>
  <artistName>Dream Theater</artistName>
 </item>
</mp3tunes>

       

Example 2.11. Listing the tracks in an album (JSON)


http://ws.mp3tunes.com/api/v0/lockerData?sid=ec08029c87e05b2c49b6ac0cd194b68b&output=json&type=track&album_id=902

{"albumData": {"albumId":"902",
               "albumTitle":"Scenes From A Memory",
               "artistId":"25",
               "artistName":"Dream Theater"},
 "trackList":[{"trackId":"12022",
               "trackTitle":"Scene One - Regression",
               "trackNumber":"1",
               "trackLength":126754.062500,
               "trackFileName":"scene_one__regression.mp3",
               "trackFileKey":"456e7d07e3857455eca4afdee8d8598e",
               "downloadURL":"http:\/\/content.mp3tunes.com\/storage\/lockerget\/456e7d07e3857455eca4afdee8d8598e?sid=ec08029c87e05b2c49b6ac0cd194b68b",
               "albumTitle":"Scenes From A Memory",
               "albumYear":"1999",
               "artistName":"Dream Theater"},
              {"trackId":"12024",
               "trackTitle":"Scene Two - I. Overture 1928",
               "trackNumber":"2",
               "trackLength":217921.375000,
               "trackFileName":"scene_two__i_overture_1928.mp3",
               "trackFileKey":"1f57736f02048243db0d43c0ded5120d",
               "downloadURL":"http:\/\/content.mp3tunes.com\/storage\/lockerget\/1f57736f02048243db0d43c0ded5120d?sid=ec08029c87e05b2c49b6ac0cd194b68b",
               "albumTitle":"Scenes From A Memory",
               "albumYear":"1999",
               "artistName":"Dream Theater"},
              {"trackId":"12026",
               "trackTitle":"Scene Two - II. Strange Deja Vu",
               "trackNumber":"3",
               "trackLength":312458.500000,
               "trackFileName":"scene_two__ii_strange_deja_vu.mp3",
               "trackFileKey":"6cdb0b8e97ed7fc658fbcd2a2745d6a9",
               "downloadURL":"http:\/\/content.mp3tunes.com\/storage\/lockerget\/6cdb0b8e97ed7fc658fbcd2a2745d6a9?sid=ec08029c87e05b2c49b6ac0cd194b68b",
               "albumTitle":"Scenes From A Memory",
               "albumYear":"1999",
               "artistName":"Dream Theater"},
              {"trackId":"12025",
               "trackTitle":"Scene Three - I. Through My Words",
               "trackNumber":"4",
               "trackLength":62257.687500,
               "trackFileName":"scene_three__i_through_my_words.mp3",
               "trackFileKey":"5d84aaee5af711ff06f4ecdadcfb0c12",
               "downloadURL":"http:\/\/content.mp3tunes.com\/storage\/lockerget\/5d84aaee5af711ff06f4ecdadcfb0c12?sid=ec08029c87e05b2c49b6ac0cd194b68b",
               "albumTitle":"Scenes From A Memory",
               "albumYear":"1999",
               "artistName":"Dream Theater"},
              {"trackId":"12028",
               "trackTitle":"Scene Three - II. Fatal Tragedy",
               "trackNumber":"5",
               "trackLength":409477.312500,
               "trackFileName":"scene_three__ii_fatal_tragedy.mp3",
               "trackFileKey":"2d8bcf3bdc75d33eca151b1ef74b3233",
               "downloadURL":"http:\/\/content.mp3tunes.com\/storage\/lockerget\/2d8bcf3bdc75d33eca151b1ef74b3233?sid=ec08029c87e05b2c49b6ac0cd194b68b",
               "albumTitle":"Scenes From A Memory",
               "albumYear":"1999",
               "artistName":"Dream Theater"},
              {"trackId":"12029",
               "trackTitle":"Scene Four - Beyond This Life",
               "trackNumber":"6",
               "trackLength":682770.375000,
               "trackFileName":"scene_four__beyond_this_life.mp3",
               "trackFileKey":"5b00f8e121eec87cdeaa85b7159246d0",
               "downloadURL":"http:\/\/content.mp3tunes.com\/storage\/lockerget\/5b00f8e121eec87cdeaa85b7159246d0?sid=ec08029c87e05b2c49b6ac0cd194b68b",
               "albumTitle":"Scenes From A Memory",
               "albumYear":"1999",
               "artistName":"Dream Theater"},
              {"trackId":"12023",
               "trackTitle":"Scene Five - Through Her Eyes",
               "trackNumber":"7",
               "trackLength":329359.750000,
               "trackFileName":"scene_five__through_her_eyes.mp3",
               "trackFileKey":"2c9506ddbb374d47793d3ce07ee48443",
               "downloadURL":"http:\/\/content.mp3tunes.com\/storage\/lockerget\/2c9506ddbb374d47793d3ce07ee48443?sid=ec08029c87e05b2c49b6ac0cd194b68b",
               "albumTitle":"Scenes From A Memory",
               "albumYear":"1999",
               "artistName":"Dream Theater"},
              {"trackId":"12030",
                "trackTitle":"Scene Six - Home",
                "trackNumber":"8",
                "trackLength":773467.500000,
                "trackFileName":"scene_six__home.mp3",
                "trackFileKey":"af1d1a9e4f3d9caba4bba859a35fd396",
                "downloadURL":"http:\/\/content.mp3tunes.com\/storage\/lockerget\/af1d1a9e4f3d9caba4bba859a35fd396?sid=ec08029c87e05b2c49b6ac0cd194b68b",
                "albumYear":"1999",
                "artistName":"Dream Theater"},
               {"trackId":"12033",
                "trackTitle":"Scene Seven - I. The Dance Of Eternity",
                "trackNumber":"9",
                "trackLength":373767.937500,
                "trackFileName":"scene_seven__i_the_dance_of_eternity.mp3",
                "trackFileKey":"9eaffc87815d17eb100b42648a7c089b",
                "downloadURL":"http:\/\/content.mp3tunes.com\/storage\/lockerget\/9eaffc87815d17eb100b42648a7c089b?sid=ec08029c87e05b2c49b6ac0cd194b68b",
                "albumTitle":"Scenes From A Memory",
                "albumYear":"1999",
                "artistName":"Dream Theater"},
               {"trackId":"12031",
                "trackTitle":"Scene Seven - II. One Last Time",
                "trackNumber":"10",
                "trackLength":226829.125000,
                "trackFileName":"scene_seven__ii_one_last_time.mp3",
                "trackFileKey":"912585cfbf3319693118c347935da726",
                "downloadURL":"http:\/\/content.mp3tunes.com\/storage\/lockerget\/912585cfbf3319693118c347935da726?sid=ec08029c87e05b2c49b6ac0cd194b68b",
                "albumTitle":"Scenes From A Memory",
                "albumYear":"1999",
                "artistName":"Dream Theater"},
               {"trackId":"12032",
                "trackTitle":"Scene Eight - The Spirit Carries On",
                "trackNumber":"11",
                "trackLength":398349.125000,
                "trackFileName":"scene_eight__the_spirit_carries_on.mp3",
                "trackFileKey":"6722e70adaf9291552db559f41506a07",
                "downloadURL":"http:\/\/content.mp3tunes.com\/storage\/lockerget\/6722e70adaf9291552db559f41506a07?sid=ec08029c87e05b2c49b6ac0cd194b68b",
                "albumTitle":"Scenes From A Memory",
                "albumYear":"1999",
                "artistName":"Dream Theater"},
               {"trackId":"12034",
                "trackTitle":"Scene Nine - Finally Free",
                "trackNumber":"12",
                "trackLength":719864.250000,
                "trackFileName":"scene_nine__finally_free.mp3",
                "trackFileKey":"57b4ce3a89b5c02c8b119f11faf1ba03",
                "downloadURL":"http:\/\/content.mp3tunes.com\/storage\/lockerget\/57b4ce3a89b5c02c8b119f11faf1ba03?sid=ec08029c87e05b2c49b6ac0cd194b68b",
                "albumTitle":"Scenes From A Memory",
                "albumYear":"1999",
                "artistName":"Dream Theater"}]}

       

Example 2.12. Listing the tracks in an album (XML)


http://ws.mp3tunes.com/api/v0/lockerData?sid=ec08029c87e05b2c49b6ac0cd194b68b&output=xml&type=track&album_id=902

<mp3tunes>
 <albumData>
  <albumId>902</albumId>
  <albumTitle>Scenes From A Memory</albumTitle>
  <artistId>25</artistId>
  <artistName>Dream Theater</artistName>
 </albumData>
 <trackList>
  <item>
   <trackId>12022</trackId>
   <trackTitle>Scene One - Regression</trackTitle>
   <trackNumber>1</trackNumber>
   <trackLength>126754.0625</trackLength>
   <trackFileName>scene_one__regression.mp3</trackFileName>
   <trackFileKey>456e7d07e3857455eca4afdee8d8598e</trackFileKey>
   <downloadURL>
    http://content.mp3tunes.com/storage/lockerget/456e7d07e3857455eca4afdee8d8598e?sid=ec08029c87e05b2c49b6ac0cd194b68b
   </downloadURL>
   <albumTitle>Scenes From A Memory</albumTitle>
   <albumYear>1999</albumYear>
   <artistName>Dream Theater</artistName>
  </item>
  <item>
   <trackId>12024</trackId>
   <trackTitle>Scene Two - I. Overture 1928</trackTitle>
   <trackNumber>2</trackNumber>
   <trackLength>217921.375</trackLength>
   <trackFileName>scene_two__i_overture_1928.mp3</trackFileName>
   <trackFileKey>1f57736f02048243db0d43c0ded5120d</trackFileKey>
   <downloadURL>
    http://content.mp3tunes.com/storage/lockerget/1f57736f02048243db0d43c0ded5120d?sid=ec08029c87e05b2c49b6ac0cd194b68b
   </downloadURL>
   <albumTitle>Scenes From A Memory</albumTitle>
   <albumYear>1999</albumYear>
   <artistName>Dream Theater</artistName>
  </item>
  <item>
   <trackId>12026</trackId>
   <trackTitle>Scene Two - II. Strange Deja Vu</trackTitle>
   <trackNumber>3</trackNumber>
   <trackLength>312458.5</trackLength>
   <trackFileName>scene_two__ii_strange_deja_vu.mp3</trackFileName>
   <trackFileKey>6cdb0b8e97ed7fc658fbcd2a2745d6a9</trackFileKey>
   <downloadURL>
    http://content.mp3tunes.com/storage/lockerget/6cdb0b8e97ed7fc658fbcd2a2745d6a9?sid=ec08029c87e05b2c49b6ac0cd194b68b
   </downloadURL>
   <albumTitle>Scenes From A Memory</albumTitle>
   <albumYear>1999</albumYear>
   <artistName>Dream Theater</artistName>
  </item>
  <item>
   <trackId>12025</trackId>
   <trackTitle>Scene Three - I. Through My Words</trackTitle>
   <trackNumber>4</trackNumber>
   <trackLength>62257.6875</trackLength>
   <trackFileName>scene_three__i_through_my_words.mp3</trackFileName>
   <trackFileKey>5d84aaee5af711ff06f4ecdadcfb0c12</trackFileKey>
   <downloadURL>
    http://content.mp3tunes.com/storage/lockerget/5d84aaee5af711ff06f4ecdadcfb0c12?sid=ec08029c87e05b2c49b6ac0cd194b68b
   </downloadURL>
   <albumTitle>Scenes From A Memory</albumTitle>
   <albumYear>1999</albumYear>
   <artistName>Dream Theater</artistName>
  </item>
  <item>
   <trackId>12028</trackId>
   <trackTitle>Scene Three - II. Fatal Tragedy</trackTitle>
   <trackNumber>5</trackNumber>
   <trackLength>409477.3125</trackLength>
   <trackFileName>scene_three__ii_fatal_tragedy.mp3</trackFileName>
   <trackFileKey>2d8bcf3bdc75d33eca151b1ef74b3233</trackFileKey>
   <downloadURL>
    http://content.mp3tunes.com/storage/lockerget/2d8bcf3bdc75d33eca151b1ef74b3233?sid=ec08029c87e05b2c49b6ac0cd194b68b
   </downloadURL>
   <albumTitle>Scenes From A Memory</albumTitle>
   <albumYear>1999</albumYear>
   <artistName>Dream Theater</artistName>
  </item>
  <item>
   <trackId>12029</trackId>
   <trackTitle>Scene Four - Beyond This Life</trackTitle>
   <trackNumber>6</trackNumber>
   <trackLength>682770.375</trackLength>
   <trackFileName>scene_four__beyond_this_life.mp3</trackFileName>
   <trackFileKey>5b00f8e121eec87cdeaa85b7159246d0</trackFileKey>
   <downloadURL>
    http://content.mp3tunes.com/storage/lockerget/5b00f8e121eec87cdeaa85b7159246d0?sid=ec08029c87e05b2c49b6ac0cd194b68b
   </downloadURL>
   <albumTitle>Scenes From A Memory</albumTitle>
   <albumYear>1999</albumYear>
   <artistName>Dream Theater</artistName>
  </item>
  <item>
   <trackId>12023</trackId>
   <trackTitle>Scene Five - Through Her Eyes</trackTitle>
   <trackNumber>7</trackNumber>
   <trackLength>329359.75</trackLength>
   <trackFileName>scene_five__through_her_eyes.mp3</trackFileName>
   <trackFileKey>2c9506ddbb374d47793d3ce07ee48443</trackFileKey>
   <downloadURL>
    http://content.mp3tunes.com/storage/lockerget/2c9506ddbb374d47793d3ce07ee48443?sid=ec08029c87e05b2c49b6ac0cd194b68b
   </downloadURL>
   <albumTitle>Scenes From A Memory</albumTitle>
   <albumYear>1999</albumYear>
   <artistName>Dream Theater</artistName>
  </item>
  <item>
   <trackId>12030</trackId>
   <trackTitle>Scene Six - Home</trackTitle>
   <trackNumber>8</trackNumber>
   <trackLength>773467.5</trackLength>
   <trackFileName>scene_six__home.mp3</trackFileName>
   <trackFileKey>af1d1a9e4f3d9caba4bba859a35fd396</trackFileKey>
   <downloadURL>
    http://content.mp3tunes.com/storage/lockerget/af1d1a9e4f3d9caba4bba859a35fd396?sid=ec08029c87e05b2c49b6ac0cd194b68b
   </downloadURL>
   <albumTitle>Scenes From A Memory</albumTitle>
   <albumYear>1999</albumYear>
   <artistName>Dream Theater</artistName>
  </item>
  <item>
   <trackId>12033</trackId>
   <trackTitle>Scene Seven - I. The Dance Of Eternity</trackTitle>
   <trackNumber>9</trackNumber>
   <trackLength>373767.9375</trackLength>
   <trackFileName>scene_seven__i_the_dance_of_eternity.mp3</trackFileName>
   <trackFileKey>9eaffc87815d17eb100b42648a7c089b</trackFileKey>
   <downloadURL>
    http://content.mp3tunes.com/storage/lockerget/9eaffc87815d17eb100b42648a7c089b?sid=ec08029c87e05b2c49b6ac0cd194b68b
   </downloadURL>
   <albumTitle>Scenes From A Memory</albumTitle>
   <albumYear>1999</albumYear>
   <artistName>Dream Theater</artistName>
  </item>
  <item>
   <trackId>12031</trackId>
   <trackTitle>Scene Seven - II. One Last Time</trackTitle>
   <trackNumber>10</trackNumber>
   <trackLength>226829.125</trackLength>
   <trackFileName>scene_seven__ii_one_last_time.mp3</trackFileName>
   <trackFileKey>912585cfbf3319693118c347935da726</trackFileKey>
   <downloadURL>
    http://content.mp3tunes.com/storage/lockerget/912585cfbf3319693118c347935da726?sid=ec08029c87e05b2c49b6ac0cd194b68b
   </downloadURL>
   <albumTitle>Scenes From A Memory</albumTitle>
   <albumYear>1999</albumYear>
   <artistName>Dream Theater</artistName>
  </item>
  <item>
   <trackId>12032</trackId>
   <trackTitle>Scene Eight - The Spirit Carries On</trackTitle>
   <trackNumber>11</trackNumber>
   <trackLength>398349.125</trackLength>
   <trackFileName>scene_eight__the_spirit_carries_on.mp3</trackFileName>
   <trackFileKey>6722e70adaf9291552db559f41506a07</trackFileKey>
   <downloadURL>
    http://content.mp3tunes.com/storage/lockerget/6722e70adaf9291552db559f41506a07?sid=ec08029c87e05b2c49b6ac0cd194b68b
   </downloadURL>
   <albumTitle>Scenes From A Memory</albumTitle>
   <albumYear>1999</albumYear>
   <artistName>Dream Theater</artistName>
  </item>
  <item>
   <trackId>12034</trackId>
   <trackTitle>Scene Nine - Finally Free</trackTitle>
   <trackNumber>12</trackNumber>
   <trackLength>719864.25</trackLength>
   <trackFileName>scene_nine__finally_free.mp3</trackFileName>
   <trackFileKey>57b4ce3a89b5c02c8b119f11faf1ba03</trackFileKey>
   <downloadURL>
    http://content.mp3tunes.com/storage/lockerget/57b4ce3a89b5c02c8b119f11faf1ba03?sid=ec08029c87e05b2c49b6ac0cd194b68b
   </downloadURL>
   <albumTitle>Scenes From A Memory</albumTitle>
   <albumYear>1999</albumYear>
   <artistName>Dream Theater</artistName>
  </item>
 </trackList>
</mp3tunes>

       

Example 2.13. Listing the playlists in a user's locker (XML)


http://ws.mp3tunes.com/api/v0/lockerData?sid=ec08029c87e05b2c49b6ac0cd194b68b&output=xml&type=playlist

<mp3tunes>
 <item>
  <playlistId>1676</playlistId>
  <title>Work</title>
  <fileName>work_playlist.m3u</fileName>
  <fileCount>12</fileCount>
  <dateModified/>
 </item>
 <item>
  <playlistId>1337</playlistId>
  <title>Programming music</title>
  <fileName>music_f0r_t3h_c0d3.m3u</fileName>
  <fileCount>65535</fileCount>
  <dateModified/>
 </item>
 <item>
  <playlistId>1685</playlistId>
  <title>Dave Matthews Hour</title>
  <fileName>dave_matthews_hour.m3u</fileName>
  <fileCount>17</fileCount>
  <dateModified/>
 </item>
</mp3tunes>