MeinProf featured on the German Amazon Affiliate Blog

Posted by Jonathan

It is not a secret that I am a fan of the Amazon Web Services. Besides EC2 and S3, I also use the Amazon Ecommerce Services (ECS) API at MeinProf.

Our implementation is now featured on the German Amazon Affiliate Blog.

We use the ECS API to let professors and students search for books and study guides on Amazon and then recommend the books to other students. So besides rating a course a student can also recommend supporting literature to others. This is the first step in our plans to increase MeinProfs value to students. We introduced this feature only a short while ago but already have many professors who register and recommend books to their students through our system.

The implementation uses the amazon-ecs ruby library that internally uses Hpricot, the great HTML/XML parser by _why.

The basic usage looks like this:

require 'amazon/ecs'

Amazon::Ecs.options = {
  :aWS_access_key_id => SECRET_KEY,
  :associate_tag => ASSOCIATE_TAG,
  :response_group => 'Medium',
  :country => :de
}

result_set = Amazon::Ecs.item_search('Programming Ruby', {
  :search_index => 'Books' # use Blended if you want also foreign books (usefull in DE and FR)
})

if result_set.has_errors?
  raise "Problem with ECS!" 
end

result_set.items.each do |item|
  puts item.get('title')
  puts item.get('asin')
  puts item.get('detailpageurl')
end

The difficult part is filtering and pre-processing the search term entered by the user in order to reduce the result set.

Comments

Leave a response