[Rails] Amazon Product API with ruby-aaws
This gem is awesome! I wanted some advice though on how to arrange my
app to be able to load the Amazon Product information into my database.
I understand that I need to create a new record using the items object,
I am just not sure where to actually do this. I set up the Database so
that it can take the "name" record here, now do i need to configure the
controller?I am so lost and having a hard time finding resources or
example code on this, so any advice would be greatly appreciated. Here
is the script code that gives an output:
require 'rubygems'
require 'amazon/aws/search'
include Amazon::AWS
include Amazon::AWS::Search
resp = Amazon::AWS.item_search( 'GourmetFood', { 'Keywords' =>
'chocolate' } )
items = resp.item_search_response.items.item
items.each do |item|
attribs = item.item_attributes
name = attribs.title
puts "#{name}"
end
Thank you!
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home