BTPWS-SearchFrom DBWiki[edit] Search for Song Example[edit] Performing a SearchTo perform a search you must have already retrieved an API key. Searches are helpful when you want to find out if something is available for sale via Bitmunk. To perform a search, you must do the following: http://www.sandbox.bitmunk.com:9080/api/xml/search Your GET request should contain the following URL-encoded parameters:
The formatted GET request should look like this: GET /api/xml/search?apiKey=416a&mediaType=audio_song&sellable=true&query=bitmunk+squad HTTP/1.1 Host: www.sandbox.bitmunk.com:9080 User-Agent: MySoftware/1.2 The following XML will be returned to you: <?xml version="1.0" encoding="UTF-8"?> <xml_response version="1.0"> <search_result version="2.0"> <time>48</time> <result type="media_id"> <list>6491443,6491444,6491445,6491446</list> </result> <media type="audio_song"> <searched_term>bitmunk</searched_term> <searched_term>squad</searched_term> </media> </search_result> </xml_response> [edit] Populating Search DataYou can retrieve full media information for any digital work available on Bitmunk. Typically, the first two steps are retrieving an API key and making a search call. You will receive a list of media info IDs. You can then take these media info IDs and fill out the information for each media info ID by hitting the following URL: http://www.sandbox.bitmunk.com:9080/api/xml/mediainfo/populate Your GET request should contain the following URL-encoded parameters:
The formatted GET request should look like this: GET /api/xml/mediainfo/populate?apiKey=416a&mediaIds=6491443,6491444 HTTP/1.1 Host: www.sandbox.bitmunk.com:9080 User-Agent: MySoftware/1.2 The following XML will be returned to you:
<?xml version="1.0" encoding="UTF-8"?>
<xml_response version="1.0">
<media_info_set version="2.0">
<media_info version="2.0" id="6491443" type="audio_song">
<owner_id>32073</owner_id>
<sellable>1</sellable>
<status>claimed</status>
<creator>Bitmunk Squad</creator>
<title>Bitmunk Squad Theme Song</title>
<sample_range>10:40</sample_range>
<parent_media_ids/>
<child_media_ids/>
<details>
<release_date>2007-01-12</release_date>
<category>audio</category>
<distribution_formats>mp3-bmwm</distribution_formats>
<banned_countries/>
<isrc/>
<creator_description_id>0</creator_description_id>
<artist>Bitmunk Squad</artist>
<track>1</track>
<length>0</length>
<genre/>
<publisher>Bitmunk Industrial Recording
1 Bitmunk Offices
Blacksburg VA, 24060</publisher>
<publisher_description_id>0</publisher_description_id>
<composer/>
<composer_description_id>0</composer_description_id>
<content_rating>not_rated</content_rating>
<audio_albums/>
<mixed_albums/>
<cover_song>0</cover_song>
<licenses>sc,sc-p2p,sc-wb</licenses>
<picture_id>0</picture_id>
<short_description>This song is a test song for purchase.</short_description>
<long_description>This song is a test song for purchase on our sandbox open source
server.</long_description>
</details>
<royalties>
<payee version="2.0" id="41067">
<amount version="2.0" currency="usd">0.496</amount>
<source>sva</source>
<reason>Bitmunk Squad Artist Royalty</reason>
<media_id>6491443</media_id>
</payee>
<payee version="2.0" id="1032">
<amount version="2.0" currency="usd">0.0535</amount>
<source>Bitmunk Records</source>
<reason>Music Label Digital Distribution Fee</reason>
<media_id>6491443</media_id>
</payee>
</royalties>
</media_info>
<media_info version="2.0" id="6491444" type="audio_song">
<owner_id>32073</owner_id>
<sellable>1</sellable>
<status>claimed</status>
<creator>Bitmunk Squad</creator>
<title>Bitmunk Love Ballad</title>
<sample_range>10:40</sample_range>
<parent_media_ids/>
<child_media_ids/>
<details>
<release_date>2007-01-12</release_date>
<category>audio</category>
<distribution_formats>mp3-bmwm</distribution_formats>
<banned_countries/>
<irc/>
<creator_description_id>0</creator_description_id>
<artist>Bitmunk Squad</artist>
<track>1</track>
<length>0</length>
<genre/>
<publisher>Bitmunk Industrial Recording
1 Bitmunk Offices
Blacksburg VA, 24060</publisher>
<publisher_description_id>0</publisher_description_id>
<composer/>
<composer_description_id>0</composer_description_id>
<content_rating>not_rated</content_rating>
<audio_albums/>
<mixed_albums/>
<cover_song>0</cover_song>
<licenses>sc,sc-p2p,sc-wb</licenses>
<picture_id>0</picture_id>
<short_description>This song is a test song for purchase.</short_description>
<long_description>This song is a test song for purchase on our sandbox open source
server.</long_description>
</details>
<royalties>
<payee version="2.0" id="41067">
<amount version="2.0" currency="usd">0.465</amount>
<source>sva</source>
<reason>Bitmunk Squad Artist Royalty</reason>
<media_id>6491444</media_id>
</payee>
<payee version="2.0" id="1032">
<amount version="2.0" currency="usd">0.0535</amount>
<source>Bitmunk Records</source>
<reason>Music Label Digital Distribution Fee</reason>
<media_id>6491444</media_id>
</payee>
</royalties>
</media_info>
</media_info_set>
</xml_response>
|

