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/Gemfile +4 -0
- data/Gemfile.lock +44 -0
- data/LICENSE +674 -0
- data/README.rdoc +30 -0
- data/Rakefile +14 -0
- data/docs/BizRatr/Business.html +981 -0
- data/docs/BizRatr/Connector.html +283 -0
- data/docs/BizRatr/Finder.html +348 -0
- data/docs/BizRatr/FourSquareConnector.html +294 -0
- data/docs/BizRatr/GooglePlacesConnector.html +293 -0
- data/docs/BizRatr/YelpConnector.html +299 -0
- data/docs/BizRatr.html +186 -0
- data/docs/README_rdoc.html +146 -0
- data/docs/created.rid +6 -0
- data/docs/index.html +128 -0
- data/docs/lib/bizratr/business_rb.html +52 -0
- data/docs/lib/bizratr/connector_rb.html +60 -0
- data/docs/lib/bizratr/version_rb.html +52 -0
- data/docs/lib/bizratr_rb.html +58 -0
- data/docs/rdoc.css +706 -0
- data/lib/bizratr/business.rb +102 -0
- data/lib/bizratr/connector.rb +144 -0
- data/lib/bizratr/version.rb +3 -0
- data/lib/bizratr.rb +4 -0
- metadata +134 -0
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
|
+
}
|