bizratr 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.rdoc ADDED
@@ -0,0 +1,30 @@
1
+ = BizRatr
2
+ This gem pulls in business data from a variety of sources and synthesizes a singular view of the business. Right now Yelp, Google Places, and Foursquare are used as sources. Bizratr will collapse all of the matching sources into a singular view of each matching business.
3
+
4
+ >> require 'bizratr'
5
+ >> config = {
6
+ :foursquare => { :client_id => 'anid', :client_secret => 'asecret' },
7
+ :yelp => { :consumer_key => 'akey', :consumer_secret => 'asecret', :token => 'atoken', :token_secret => 'atokensecret' },
8
+ :google_places => { :key => "akey" }
9
+ }
10
+ >> finder = BizRatr::Finder.new(config)
11
+ >> matches = finder.search_location([40.729401, -73.996061], 'third rail coffee')
12
+ >> puts matches.first.rating
13
+ => 4.55
14
+ >> matches = finder.search_location("240 Sullivan St., New York, NY 10012", 'third rail coffee')
15
+ >> puts matches.first.rating
16
+ => 4.55
17
+
18
+
19
+ In this example, the avgerage 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.
20
+
21
+ 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:
22
+
23
+ * Yelp: http://www.yelp.com/developers/getting_started
24
+ * Google places: https://code.google.com/apis/console/b/0/
25
+ * Foursquare: https://foursquare.com/oauth/
26
+
27
+
28
+ = Licenses
29
+ The bizratr code is distributed under the GPLv3.
30
+
data/Rakefile ADDED
@@ -0,0 +1,14 @@
1
+ require 'rubygems'
2
+ require 'bundler'
3
+ require 'rake/testtask'
4
+ require 'rdoc/task'
5
+
6
+ Bundler::GemHelper.install_tasks
7
+
8
+ desc "Create documentation"
9
+ RDoc::Task.new("doc") { |rdoc|
10
+ rdoc.title = "BizRatr - Synthesized business information from many sources"
11
+ rdoc.rdoc_dir = 'docs'
12
+ rdoc.rdoc_files.include('README.rdoc')
13
+ rdoc.rdoc_files.include('lib/**/*.rb')
14
+ }