Skip to content

Instantly share code, notes, and snippets.

@benbonnet
Created May 28, 2009 14:20
Show Gist options
  • Save benbonnet/119335 to your computer and use it in GitHub Desktop.
Save benbonnet/119335 to your computer and use it in GitHub Desktop.
Google Portfolio
require 'net/http'
require 'rexml/document'
http = Net::HTTP.new('finance.google.com', 80)
path = "/finance/feeds/default/portfolios"
headers = {'Authorization' => "AuthSubtoken=\"#{api.token}\""}
resp, data = http.get(path, headers)
@doc = Hpricot.XML(open(data.body))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment