Do you Yahoo? I do, and was recently a little disappointed in the Ruby offerings for the Yahoo Web Services API. So, a little coding and we have ActiveYahoo:
require 'active_yahoo' y = ActiveYahoo::WebSearch.new(‘YOUR_APP_ID’, ‘ruby’, { :results => 2 }) y.result.total_results_returned # => 2 y.result.records[0].title # => "Ruby-lang.org" y.result.records.map { |r| r.url } # => ["http://www.ruby-lang.org/en", # "http://en.wikipedia.org/wiki/Ruby_programming_language"]
A primary objective of ActiveYahoo is to encapsulate Yahoo‘s responses into their own objects. For example, an instance of the WebSearch class will return a WebSearchResult object. Special care is also given to convert response fields into appropriate Ruby data types.
So far, the following Search services have been implemented: Web, News, Images, Audio, and Video. More will follow soon. The essentials are on Rubyforge here: