Skip to content

Instantly share code, notes, and snippets.

@pauldix
Created February 23, 2009 21:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pauldix/69186 to your computer and use it in GitHub Desktop.
Save pauldix/69186 to your computer and use it in GitHub Desktop.
class YahooBOSS < HTTPMachine::Remote
API_ID = "..."
remote_server "http://boss.yahooapis.com"
remote_method :web_search, {
:resource => "ysearch/web/v1",
:method => :get,
:params => {:appid => API_ID, :format => "xml", :view => "keyterms", :abstract => "long", :count => 100},
:response_handler => :parse }
result_scope :get_pages, lambda { |result|
Page.get(result)
}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment