BOSSMan: Yahoo BOSS gem

Yahoo BOSS is an API that allows for use of search results from
Yahoo’s search index with very little restrictions. I’ve put together
a quick gem for handling interaction with it.

There’s sample code included in the gem and full output details in the
README. Feedback on this would be great, thanks!

To install:

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

Sample code:

require ‘rubygems’
require ‘bossman’

include BOSSMan

BOSSMan.application_id = [Your Application ID]

news = BOSSMan::Search.news(“Barack Obama”, 0, 3)

news.results.each do |result|
puts “#{result.title} [from #{result.source}]”
puts “-” * 80
puts “#{result.abstract}”
puts
end

Output:

$ ruby obama.rb
Barack Obama hails ‘patriot’ John McCain, blasts GOP energy plan [from
Boston Herald]

RENO, Nev. - So much for hugging in church. A day after Barack Obama
and John McCain exchanged an embrace during a faith forum at a
California megachurch, Obama called…

Dave ‘Mudcat’ Saunders: Barack Obama’s elitist campaign alienates
South [from Times Online]

The sea of shining, hope-filled faces that routinely flood Barack
Obama’s rallies would be an alien environment for the grizzled
features and tobacco-stained temperament of Dave “Mudcat” Saunders.

Barack Obama Meets With Oil Tycoon Pickens [from Nasdaq]

WASHINGTON (AFP)–Barack Obama met Sunday with oil tycoon turned
alternative energy advocate T. Boone Pickens, who funded devastating
attacks on 2004 Democratic White House pick John Kerry.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs