Skip to content

Instantly share code, notes, and snippets.

@carylee
Created December 23, 2011 17:49
Show Gist options
  • Save carylee/1514901 to your computer and use it in GitHub Desktop.
Save carylee/1514901 to your computer and use it in GitHub Desktop.
Script to check if Bing API is working or broken
require 'rbing'
$BINGAPPID = ENV['BINGAPPID']
print "Does bing seem to be working?... "
bing = RBing.new($BINGAPPID)
rsp = bing.web("site:chicagotribune.com budget", :count=>50)
if rsp.web.total == 42
puts "nope."
else
puts "yes! found #{rsp.web.total.to_s} results!"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment