I am using the Amazon Product Advertising API, and for my first project with it, I am trying to get the ASIN of a specific MP3 song download file based on the artist and title. Ultimately, I will use these ASINs to populate the Amazon MP3 Clips Widget .
I am using the PHP class from CodeDiesel.com to get started. It works fine, and I added the following function:
public function searchMusic($artist, $title) {
$parameters = array("Operation" => "ItemSearch",
"Artist" => $artist,
"Title" => $title,
"SearchIndex" => "Music",
"ResponseGroup" => "Medium");
$xml_response=$this->queryAmazon($parameters);
return $xml_response;
}
Now, the trouble is that I can just get albums. For example, if I put “Robert Randolph” for the artist and “Colorblind” for the title, I get Robert Randolph and the Family Band Colorblind album. If I’m looking for a specific track, such as “Thrill Of It,” Amazon cannot find anything.
So, I need to first figure out how to make a query for the name of the track. Then I need to figure out how to limit my results to just downloading MP3s. How can i do this?
If there is documentation on this topic, can you point me in the right direction? I read through it , but I don’t see any parameters for what I want.
Thank you for your time.
source
share