you are here: codestackercodes [RSS] → tag yahoo [RSS]

yahoo! search boss sample

# first, install bossman

gem sources -a http://gems.github.com
gem install jpignata-bossman

# the sample

require 'rubygems'
require 'bossman'
include BOSSMan

BOSSMan.application_id = "Your Application ID here"

news = BOSSMan::Search.news("Mac OS", 0, 3)
news.results.each do |result|
  puts "#{result.title} [from #{result.source}]"
end

yahoo finance sample

require 'yahoo_finance'
data = YahooFinance.quotes(['petr4.sa'], [:ask, :last_trade_price, :last_trade_date])
puts data[0].symbol + " => " + data[0].ask
Displaying all 2 Code