views:

20

answers:

0
  • Is there a way to retrieve product information using ruby and google base api. I have installed the googlebase gem: gem install googlebase?
  • I created a test script as mentioned in the example at: http://googlebase.rubyforge.org/
require 'rubygems'
require 'google/base'

Google::Base.establish_connection('username', 'password')
response = Google::Base.get('http://google.com/base/feeds/attributes?bq=cp-7960g')

puts response

This prints "301 The document has moved" in the console. But when I type this uri in the browser, I do get results. Can anyone show me an example of how I can retrieve the weight or price (for example) for a product using the GoogleBase API in ruby?