BizRatr

This gem pulls in business data from a variety of sources and synthesizes a singular view of the business. Right now Facebook, Yelp, Factual, Google Places, and Foursquare are used as sources. Bizratr will collapse all of the matching sources into a singular view of each matching business.

>> require 'bizratr'
>> config = { 
     :foursquare => { :client_id => 'anid', :client_secret => 'asecret' },
     :yelp => { :consumer_key => 'akey', :consumer_secret => 'asecret', :token => 'atoken', :token_secret => 'atokensecret' },
     :google_places => { :key => "akey" },
     :factual => { :key => 'akey', :secret => 'asecret' },
     :facebook => { :key => 'akey', :secret => 'asecret' }
   }
>> finder = BizRatr::UberClient.new(config)
>> matches = finder.search_location([40.729401, -73.996061], 'third rail coffee')
>> puts matches.first.rating 
 => 4.55
>> matches = finder.search_location("240 Sullivan St., New York, NY 10012", 'third rail coffee')
>> puts matches.first.rating
 => 4.55
>> puts matches.first.website_likes
 => {"share_count"=>75, "like_count"=>10, "comment_count"=>9, "click_count"=>6}

In this example, the average of the ratings from any of the sources (normalized to a 5 point scale) is used as the rating. Each result has address information, rating information, “like” information, and other relevant info.

You only need to specify the config options for the services you actually want to query. You can sign up for each at the following locations:

See findingscience.com/bizratr for more information.

License

The bizratr code is distributed under the GPLv3.