{"id":481,"date":"2003-11-04T11:35:39","date_gmt":"2003-11-04T11:35:39","guid":{"rendered":"http:\/\/dev.adambowie.com\/2003\/11\/amazon_web_serv\/"},"modified":"2003-11-04T11:35:39","modified_gmt":"2003-11-04T11:35:39","slug":"amazon_web_serv","status":"publish","type":"post","link":"https:\/\/dev.adambowie.com\/blog\/2003\/11\/amazon_web_serv\/","title":{"rendered":"Amazon Web Services A Go Go"},"content":{"rendered":"<p>Well not content with finally twiddling with <a href=\"http:\/\/mtamazon.sourceforge.net\/\">MTAmazon<\/a> enough to get it working, I&#8217;ve now been playing with the top 10 thing on the right hand side of the page.<br \/>\nBasically you can play around with Amazon.com&#8217;s <a href=\"http:\/\/www.amazon.com\/gp\/aws\/landing.html\/104-8932315-7125501\">scratchpad<\/a> in an attempt to build an RSS XML feed, but the scratchpad doesn&#8217;t fully work. For one thing, the locale setting makes no difference, and for another, it doesn&#8217;t mention RSS feeds.<br \/>\nIt&#8217;s easy enought to discover that these need to be of the form:<br \/>\nhttp:\/\/xml.amazon.com\/onca\/xml3?t=webservices-20&#038;dev-t=amznRss&#038;BrowseNodeSearch=130&#038;mode=dvd&#038;bcm=DVD<br \/>\n&#038;type=lite&#038;page=1&#038;ct=text\/xml&#038;sort=+salesrank<br \/>\n&#038;f=http:\/\/xml.amazon.com\/xsl\/xml-rss091.xsl<br \/>\nBut that&#8217;s only good for the US. First I inserted &#038;locale=uk into the string, and then I replaced the initial URL with xml-eu.amazon.com which started serving me with the correct information. The resultant URLs were completely wrong since Amazon doesn&#8217;t have a UK version of xml-rss091.xsl. So I took a copy of that file, and just replaced all the amazon.com&#8217;s with amazon.co.uk and saved it locally.<br \/>\nEt voila, after replacing developer tokens and associate ID, you get what I have on the right.<br \/>\nHere&#8217;s the sample code:<br \/>\nhttp:\/\/xml-eu.amazon.com\/onca\/xml3?t=webservices-20<br \/>\n&#038;dev-t=amzn-Rss&#038;BrowseNodeSearch=62&#038;mode=books&#038;bcm=<br \/>\n&#038;type=lite&#038;page=1&#038;ct=text\/xml&#038;sort=+salesrank<br \/>\n&#038;locale=uk&#038;f=http:\/\/dev.adambowie.com\/weblog\/xml-rss091.xsl<br \/>\nUPDATE: One thing to note is that I have bastardised that xml-rss091.xsl file a bit so that the description no longer exists. I&#8217;ve replaced this with Amazon&#8217;s asin code since I wanted to use that in conjunction with MTAmazon to pull in pictures of the books. Now I probably should have rewritten the file entirely into an RSS 2.0 compliant version, thus letting me have both pieces of information. But that seemed just too much like hard work. I&#8217;m sure someone else will fully script that version.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Well not content with finally twiddling with MTAmazon enough to get it working, I&#8217;ve now been playing with the top 10 thing on the right hand side of the page. Basically you can play around with Amazon.com&#8217;s scratchpad in an attempt to build an RSS XML feed, but the scratchpad doesn&#8217;t fully work. For one [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/dev.adambowie.com\/blog\/wp-json\/wp\/v2\/posts\/481"}],"collection":[{"href":"https:\/\/dev.adambowie.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dev.adambowie.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dev.adambowie.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dev.adambowie.com\/blog\/wp-json\/wp\/v2\/comments?post=481"}],"version-history":[{"count":0,"href":"https:\/\/dev.adambowie.com\/blog\/wp-json\/wp\/v2\/posts\/481\/revisions"}],"wp:attachment":[{"href":"https:\/\/dev.adambowie.com\/blog\/wp-json\/wp\/v2\/media?parent=481"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dev.adambowie.com\/blog\/wp-json\/wp\/v2\/categories?post=481"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dev.adambowie.com\/blog\/wp-json\/wp\/v2\/tags?post=481"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}