yelpify 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.
- checksums.yaml +7 -0
- data/.gitignore +17 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +84 -0
- data/Rakefile +3 -0
- data/lib/yelpify/authorization.rb +24 -0
- data/lib/yelpify/business.rb +15 -0
- data/lib/yelpify/client.rb +29 -0
- data/lib/yelpify/errors/invalid_credentials.rb +4 -0
- data/lib/yelpify/search.rb +9 -0
- data/lib/yelpify/utils.rb +22 -0
- data/lib/yelpify/version.rb +3 -0
- data/lib/yelpify.rb +27 -0
- data/rspec.rake +3 -0
- data/spec/fixtures/vcr_cassettes/business.yml +80 -0
- data/spec/fixtures/vcr_cassettes/search.yml +429 -0
- data/spec/spec_helper.rb +8 -0
- data/spec/yelpify/authorization_spec.rb +33 -0
- data/spec/yelpify/business_spec.rb +18 -0
- data/spec/yelpify/client_spec.rb +47 -0
- data/spec/yelpify/search_spec.rb +21 -0
- data/spec/yelpify/utils_spec.rb +16 -0
- data/yelpify.gemspec +30 -0
- metadata +187 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 7e7b919e2eaa62bcdddec53c98fc79759401e29b
|
4
|
+
data.tar.gz: fa413831f9f007f7cb7dcda7e155006d2cfa283c
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 126b6c7263f1eb548546d659cedb16cea6dbb093e8d9e033507a7d735b45292f4b13dceaab605447d6817bd9c1048da461b88f5be1bf4e10661292e3e706766f
|
7
|
+
data.tar.gz: fa5a0385cf05eddbea462a05a2d6569e173500f76acde3e202fe8f8f0209670c97c3b3aa05f2e45da94ff64803361aa719d9e9c0505c0c5887c712a07931393e
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2014 Yelpify
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,84 @@
|
|
1
|
+
# Yelpify
|
2
|
+
|
3
|
+
Yelpify is a Ruby gem that facilitates the use of the Yelp API's business and search functions for collecting data on local businesses.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'yelpify'
|
11
|
+
```
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
$ bundle
|
16
|
+
|
17
|
+
Or install it yourself as:
|
18
|
+
|
19
|
+
$ gem install yelpify
|
20
|
+
|
21
|
+
## Usage
|
22
|
+
|
23
|
+
### Setup
|
24
|
+
|
25
|
+
To begin use of Yelpify, you must first instantiate a new client by passing in a hash of the API keys acquired from Yelp (http://www.yelp.com/developers).
|
26
|
+
|
27
|
+
oauth_creds = {
|
28
|
+
consumer_key: <YELP KEY>,
|
29
|
+
consumer_secret: <YELP SECRET>,
|
30
|
+
token: <YELP TOKEN>,
|
31
|
+
token_secret: <YELP TOKEN SECRET>
|
32
|
+
}
|
33
|
+
client = Yelpify.new_client(oauth_creds)
|
34
|
+
|
35
|
+
Your new client is equipped with both search and business functionality.
|
36
|
+
|
37
|
+
## Queries
|
38
|
+
|
39
|
+
### Search
|
40
|
+
|
41
|
+
All search requests can be made simply by using the #search method available through the Yelpify module and passing in a hash of search parameters:
|
42
|
+
|
43
|
+
search_params = {
|
44
|
+
location: 'austin',
|
45
|
+
category_filter: 'bars',
|
46
|
+
radius: 1610
|
47
|
+
}
|
48
|
+
client.search(search_params)
|
49
|
+
|
50
|
+
### Business
|
51
|
+
|
52
|
+
All business requests can also be made using the #business method available through Yelpify by passing in a business ID and optional search parameters:
|
53
|
+
|
54
|
+
client.business('firehouse-lounge-austin-3')
|
55
|
+
|
56
|
+
### RESPONSES
|
57
|
+
|
58
|
+
All query responses are parsed and returned as an OpenStruct. The information within that OpenStruct is accessable to you through dot-notation. Using the example query from earlier:
|
59
|
+
|
60
|
+
search_params = {
|
61
|
+
location: 'austin',
|
62
|
+
category_filter: 'bars',
|
63
|
+
radius: 1610
|
64
|
+
}
|
65
|
+
response = client.search(search_params)
|
66
|
+
|
67
|
+
response.businesses[0].name
|
68
|
+
# "Firehouse Lounge"
|
69
|
+
|
70
|
+
And an example using our previous business query:
|
71
|
+
|
72
|
+
client.business('firehouse-lounge-austin-3')
|
73
|
+
|
74
|
+
response.name
|
75
|
+
# "Firehouse Lounge"
|
76
|
+
|
77
|
+
|
78
|
+
## Contributing
|
79
|
+
|
80
|
+
1. Fork it ( https://github.com/[my-github-username]/yelpify/fork )
|
81
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
82
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
83
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
84
|
+
5. Create a new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'pry-byebug'
|
2
|
+
module Yelpify
|
3
|
+
class Authorization
|
4
|
+
attr_reader :credentials, :access_token
|
5
|
+
|
6
|
+
def initialize(oauth_creds)
|
7
|
+
@credentials = oauth_creds
|
8
|
+
|
9
|
+
consumer_key = oauth_creds[:consumer_key]
|
10
|
+
consumer_secret = oauth_creds[:consumer_secret]
|
11
|
+
token = oauth_creds[:token]
|
12
|
+
token_secret = oauth_creds[:token_secret]
|
13
|
+
api_site = {:site => "http://api.yelp.com"}
|
14
|
+
|
15
|
+
if oauth_creds.values.any? {|v| v.empty? }
|
16
|
+
raise InvalidCredentials.new, "That was wrong"
|
17
|
+
else
|
18
|
+
consumer = OAuth::Consumer.new(consumer_key, consumer_secret, api_site)
|
19
|
+
@access_token = OAuth::AccessToken.new(consumer, token, token_secret)
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'uri'
|
2
|
+
|
3
|
+
module Yelpify
|
4
|
+
class Business
|
5
|
+
def build_url(biz_id, search_data=nil)
|
6
|
+
base = "http://api.yelp.com/v2/business/#{biz_id}?"
|
7
|
+
if search_data
|
8
|
+
custom = URI.encode_www_form(search_data)
|
9
|
+
path = base + custom
|
10
|
+
else
|
11
|
+
path = base
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module Yelpify
|
2
|
+
class Client
|
3
|
+
attr_reader :access_token
|
4
|
+
|
5
|
+
def initialize(access_token, search, business)
|
6
|
+
@search = search
|
7
|
+
@business = business
|
8
|
+
@access_token = access_token
|
9
|
+
end
|
10
|
+
|
11
|
+
def search(data)
|
12
|
+
url = @search.build_url(data)
|
13
|
+
get(url)
|
14
|
+
end
|
15
|
+
|
16
|
+
def business(id, data=nil)
|
17
|
+
url = @business.build_url(id, data)
|
18
|
+
get(url)
|
19
|
+
end
|
20
|
+
|
21
|
+
private
|
22
|
+
|
23
|
+
def get(url)
|
24
|
+
response = JSON.parse(access_token.get(url).body)
|
25
|
+
Yelpify::Utils.convert_to_ostruct(response)
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module Yelpify
|
2
|
+
class Utils
|
3
|
+
|
4
|
+
def self.convert_to_ostruct(val)
|
5
|
+
if val.class == Hash
|
6
|
+
new_val = {}
|
7
|
+
val.each do |key, value|
|
8
|
+
new_val[key] = convert_to_ostruct(value)
|
9
|
+
end
|
10
|
+
OpenStruct.new(new_val)
|
11
|
+
elsif val.class == Array
|
12
|
+
new_val = []
|
13
|
+
val.each do |x|
|
14
|
+
new_val << convert_to_ostruct(x)
|
15
|
+
end
|
16
|
+
new_val
|
17
|
+
else
|
18
|
+
val
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
data/lib/yelpify.rb
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
require "oauth"
|
2
|
+
require "json"
|
3
|
+
require "uri"
|
4
|
+
require "dotenv"
|
5
|
+
require "ostruct"
|
6
|
+
|
7
|
+
require "yelpify/client"
|
8
|
+
require "yelpify/search"
|
9
|
+
require "yelpify/business"
|
10
|
+
require "yelpify/authorization"
|
11
|
+
require "yelpify/version"
|
12
|
+
require "yelpify/errors/invalid_credentials"
|
13
|
+
require "yelpify/utils"
|
14
|
+
|
15
|
+
Dotenv.load
|
16
|
+
|
17
|
+
module Yelpify
|
18
|
+
def self.create_new(oauth_data={})
|
19
|
+
raise "No OAuth data!" if oauth_data.empty?
|
20
|
+
|
21
|
+
search = Yelpify::Search.new
|
22
|
+
business = Yelpify::Business.new
|
23
|
+
token = Yelpify::Authorization.new(oauth_data)
|
24
|
+
|
25
|
+
Yelpify::Client.new(token.access_token, search, business)
|
26
|
+
end
|
27
|
+
end
|
data/rspec.rake
ADDED
@@ -0,0 +1,80 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://api.yelp.com/v2/business/yelp-san-francisco
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- '*/*'
|
14
|
+
User-Agent:
|
15
|
+
- OAuth gem v0.4.7
|
16
|
+
Authorization:
|
17
|
+
- OAuth oauth_consumer_key="<%= ENV['YELP_KEY'] %>", oauth_nonce="GrkqN8H2KPsKx1VhqupD7VUn7sCRUHWApXTQLgFE6O0",
|
18
|
+
oauth_signature="e8l1ppFo8GGR7Wg6x2nWI%2BKxOvA%3D", oauth_signature_method="HMAC-SHA1",
|
19
|
+
oauth_timestamp="1415210952", oauth_token="<%= ENV['YELP_TOKEN'] %>",
|
20
|
+
oauth_version="1.0"
|
21
|
+
response:
|
22
|
+
status:
|
23
|
+
code: 200
|
24
|
+
message: OK
|
25
|
+
headers:
|
26
|
+
Date:
|
27
|
+
- Wed, 05 Nov 2014 18:12:39 GMT
|
28
|
+
Server:
|
29
|
+
- Apache
|
30
|
+
X-Node:
|
31
|
+
- web10-r2-sfo2, api_com
|
32
|
+
Cache-Control:
|
33
|
+
- private
|
34
|
+
Set-Cookie:
|
35
|
+
- bse=30a17e0be5deeecee0db36c310d68ba0; Domain=.yelp.com; Path=/; HttpOnly
|
36
|
+
- yuv=F3FfcUDUJw_XsJdNZW97ACciV6W6CsWpuCN7gMP71ZWKCbGb2puNQLSJIBaTc9-z4HjCwuWWTLRe94Q9vvlfs1m8EzUpCY4N;
|
37
|
+
Domain=.yelp.com; Max-Age=630720000; Path=/; expires=Tue, 31-Oct-2034 18:12:39
|
38
|
+
GMT
|
39
|
+
Content-Length:
|
40
|
+
- '2320'
|
41
|
+
Vary:
|
42
|
+
- User-Agent
|
43
|
+
Content-Type:
|
44
|
+
- application/json; charset=UTF-8
|
45
|
+
X-Mode:
|
46
|
+
- rw
|
47
|
+
X-Proxied:
|
48
|
+
- extlb1-r4-sfo2
|
49
|
+
- lb2
|
50
|
+
body:
|
51
|
+
encoding: UTF-8
|
52
|
+
string: '{"is_claimed": true, "rating": 2.5, "mobile_url": "http://m.yelp.com/biz/yelp-san-francisco",
|
53
|
+
"rating_img_url": "http://s3-media4.fl.yelpcdn.com/assets/2/www/img/c7fb9aff59f9/ico/stars/v1/stars_2_half.png",
|
54
|
+
"review_count": 6487, "name": "Yelp", "snippet_image_url": "http://s3-media2.fl.yelpcdn.com/photo/HzYt0-Kfk7EOJGGJNPgz0A/ms.jpg",
|
55
|
+
"rating_img_url_small": "http://s3-media4.fl.yelpcdn.com/assets/2/www/img/8e8633e5f8f0/ico/stars/v1/stars_small_2_half.png",
|
56
|
+
"url": "http://www.yelp.com/biz/yelp-san-francisco", "reviews": [{"rating":
|
57
|
+
5, "excerpt": "Wow another year has gone by and another year of Yelping. I
|
58
|
+
have used Yelp in every capacity I can. I love the App when I am out of town
|
59
|
+
and finding some...", "time_created": 1415143053, "rating_image_url": "http://s3-media1.fl.yelpcdn.com/assets/2/www/img/f1def11e4e79/ico/stars/v1/stars_5.png",
|
60
|
+
"rating_image_small_url": "http://s3-media1.fl.yelpcdn.com/assets/2/www/img/c7623205d5cd/ico/stars/v1/stars_small_5.png",
|
61
|
+
"user": {"image_url": "http://s3-media2.fl.yelpcdn.com/photo/rQbdbYPq5LTH702QqZqlNg/ms.jpg",
|
62
|
+
"id": "BnBQ0UU9uSiI_0cbCZ4lsw", "name": "Paul K."}, "rating_image_large_url":
|
63
|
+
"http://s3-media3.fl.yelpcdn.com/assets/2/www/img/22affc4e6c38/ico/stars/v1/stars_large_5.png",
|
64
|
+
"id": "xQB2x1Qncg0d4DichM23Tw"}], "phone": "4159083801", "snippet_text": "Yelp
|
65
|
+
is the shiznit :\n\nYelp 2010\n\nI came across Yelp about four years ago,
|
66
|
+
when I saw a buddy of mine check in at a store. So I signed up to see what''s...",
|
67
|
+
"image_url": "http://s3-media2.fl.yelpcdn.com/bphoto/EHCfkEpZraIfPl8gvCo1tg/ms.jpg",
|
68
|
+
"categories": [["Local Flavor", "localflavor"], ["Local Services", "localservices"],
|
69
|
+
["Mass Media", "massmedia"]], "display_phone": "+1-415-908-3801", "rating_img_url_large":
|
70
|
+
"http://s3-media2.fl.yelpcdn.com/assets/2/www/img/d63e3add9901/ico/stars/v1/stars_large_2_half.png",
|
71
|
+
"id": "yelp-san-francisco", "is_closed": false, "location": {"cross_streets":
|
72
|
+
"Natoma St \u0026 Minna St", "city": "San Francisco", "display_address": ["140
|
73
|
+
New Montgomery St", "Financial District", "San Francisco, CA 94105"], "geo_accuracy":
|
74
|
+
9.5, "neighborhoods": ["Financial District", "SoMa"], "postal_code": "94105",
|
75
|
+
"country_code": "US", "address": ["140 New Montgomery St"], "coordinate":
|
76
|
+
{"latitude": 37.786770336292903, "longitude": -122.39995837211499}, "state_code":
|
77
|
+
"CA"}}'
|
78
|
+
http_version:
|
79
|
+
recorded_at: Wed, 05 Nov 2014 18:09:17 GMT
|
80
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,429 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://api.yelp.com/v2/search?category_filter=active,arts&location=austin,%20texas
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept-Encoding:
|
11
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
|
+
Accept:
|
13
|
+
- '*/*'
|
14
|
+
User-Agent:
|
15
|
+
- OAuth gem v0.4.7
|
16
|
+
Authorization:
|
17
|
+
- OAuth oauth_consumer_key="<%= ENV['YELP_KEY'] %>", oauth_nonce="6SGqgEESnrikGwy30LFr75ssCy2KEjRUSk8Rmpib8",
|
18
|
+
oauth_signature="cGgnF0z%2FTuB%2FfvO9n13zInRrblk%3D", oauth_signature_method="HMAC-SHA1",
|
19
|
+
oauth_timestamp="1415210128", oauth_token="<%= ENV['YELP_TOKEN'] %>",
|
20
|
+
oauth_version="1.0"
|
21
|
+
response:
|
22
|
+
status:
|
23
|
+
code: 200
|
24
|
+
message: OK
|
25
|
+
headers:
|
26
|
+
Date:
|
27
|
+
- Wed, 05 Nov 2014 17:58:56 GMT
|
28
|
+
Server:
|
29
|
+
- Apache
|
30
|
+
X-Node:
|
31
|
+
- web6-r1-sfo2, api_com
|
32
|
+
Cache-Control:
|
33
|
+
- private
|
34
|
+
Set-Cookie:
|
35
|
+
- bse=a2f5fac2937900fa69814ad804eb2caf; Domain=.yelp.com; Path=/; HttpOnly
|
36
|
+
- yuv=bue9Fv4RVqGyjLyVQyUpTp2jIn5BLOj_0l7hbkzup44JHz19-2XnQuqZyRrh04y7kx2F3NOxseeB_C4uu36EStn_YAKeBxLc;
|
37
|
+
Domain=.yelp.com; Max-Age=630720000; Path=/; expires=Tue, 31-Oct-2034 17:58:56
|
38
|
+
GMT
|
39
|
+
Content-Length:
|
40
|
+
- '33942'
|
41
|
+
Vary:
|
42
|
+
- User-Agent
|
43
|
+
Content-Type:
|
44
|
+
- application/json; charset=UTF-8
|
45
|
+
X-Mode:
|
46
|
+
- rw
|
47
|
+
X-Proxied:
|
48
|
+
- extlb1-r4-sfo2
|
49
|
+
- lb1
|
50
|
+
body:
|
51
|
+
encoding: UTF-8
|
52
|
+
string: '{"region": {"span": {"latitude_delta": 0.10454674999999725, "longitude_delta":
|
53
|
+
0.11186010000000124}, "center": {"latitude": 30.28013825, "longitude": -97.74308529999999}},
|
54
|
+
"total": 2131, "businesses": [{"is_claimed": false, "rating": 5.0, "mobile_url":
|
55
|
+
"http://m.yelp.com/biz/town-lake-metropolitan-parks-austin", "rating_img_url":
|
56
|
+
"http://s3-media1.fl.yelpcdn.com/assets/2/www/img/f1def11e4e79/ico/stars/v1/stars_5.png",
|
57
|
+
"review_count": 145, "name": "Town Lake Metropolitan Parks", "snippet_image_url":
|
58
|
+
"http://s3-media4.fl.yelpcdn.com/photo/tQv317c4v2iBLsizYbSZJg/ms.jpg", "rating_img_url_small":
|
59
|
+
"http://s3-media1.fl.yelpcdn.com/assets/2/www/img/c7623205d5cd/ico/stars/v1/stars_small_5.png",
|
60
|
+
"url": "http://www.yelp.com/biz/town-lake-metropolitan-parks-austin", "snippet_text":
|
61
|
+
"This is my favorite place in Austin to go. It''s a good place to clear your
|
62
|
+
mind and exercise or just hang out. Sometimes I walk/run the trail and I have...",
|
63
|
+
"image_url": "http://s3-media4.fl.yelpcdn.com/bphoto/buw3l9qMGsAD1RECpaOiqg/ms.jpg",
|
64
|
+
"categories": [["Parks", "parks"]], "rating_img_url_large": "http://s3-media3.fl.yelpcdn.com/assets/2/www/img/22affc4e6c38/ico/stars/v1/stars_large_5.png",
|
65
|
+
"id": "town-lake-metropolitan-parks-austin", "is_closed": false, "location":
|
66
|
+
{"city": "Austin", "display_address": ["Town Lake", "Austin, TX 78701"], "geo_accuracy":
|
67
|
+
9.5, "neighborhoods": ["Town Lake"], "postal_code": "78701", "country_code":
|
68
|
+
"US", "address": [], "coordinate": {"latitude": 30.270894725696699, "longitude":
|
69
|
+
-97.764859918551593}, "state_code": "TX"}}, {"is_claimed": false, "rating":
|
70
|
+
5.0, "mobile_url": "http://m.yelp.com/biz/barton-creek-greenbelt-austin",
|
71
|
+
"rating_img_url": "http://s3-media1.fl.yelpcdn.com/assets/2/www/img/f1def11e4e79/ico/stars/v1/stars_5.png",
|
72
|
+
"review_count": 153, "name": "Barton Creek Greenbelt", "snippet_image_url":
|
73
|
+
"http://s3-media2.fl.yelpcdn.com/photo/fXVwiiUITlrEUwZNPebeRQ/ms.jpg", "rating_img_url_small":
|
74
|
+
"http://s3-media1.fl.yelpcdn.com/assets/2/www/img/c7623205d5cd/ico/stars/v1/stars_small_5.png",
|
75
|
+
"url": "http://www.yelp.com/biz/barton-creek-greenbelt-austin", "snippet_text":
|
76
|
+
"I just went to the greenbelt today, Aug. 16, 2014, with my family and we
|
77
|
+
had such an amazing time! We came early, around 10:30am, and there was plenty
|
78
|
+
of...", "image_url": "http://s3-media2.fl.yelpcdn.com/bphoto/Tqt6bN7KzH2UNcaDIxa0fA/ms.jpg",
|
79
|
+
"categories": [["Parks", "parks"]], "rating_img_url_large": "http://s3-media3.fl.yelpcdn.com/assets/2/www/img/22affc4e6c38/ico/stars/v1/stars_large_5.png",
|
80
|
+
"id": "barton-creek-greenbelt-austin", "is_closed": false, "location": {"city":
|
81
|
+
"Austin", "display_address": ["2201 Barton Springs Rd", "Barton Hills", "Austin,
|
82
|
+
TX 78746"], "geo_accuracy": 8.0, "neighborhoods": ["Barton Hills", "78704
|
83
|
+
(South Austin)"], "postal_code": "78746", "country_code": "US", "address":
|
84
|
+
["2201 Barton Springs Rd"], "coordinate": {"latitude": 30.265920600000001,
|
85
|
+
"longitude": -97.768638600000003}, "state_code": "TX"}}, {"is_claimed": true,
|
86
|
+
"rating": 5.0, "mobile_url": "http://m.yelp.com/biz/eastside-yoga-austin",
|
87
|
+
"rating_img_url": "http://s3-media1.fl.yelpcdn.com/assets/2/www/img/f1def11e4e79/ico/stars/v1/stars_5.png",
|
88
|
+
"review_count": 46, "name": "Eastside Yoga", "snippet_image_url": "http://s3-media4.fl.yelpcdn.com/assets/2/www/img/cc4afe21892e/default_avatars/user_medium_square.png",
|
89
|
+
"rating_img_url_small": "http://s3-media1.fl.yelpcdn.com/assets/2/www/img/c7623205d5cd/ico/stars/v1/stars_small_5.png",
|
90
|
+
"url": "http://www.yelp.com/biz/eastside-yoga-austin", "menu_date_updated":
|
91
|
+
1387665983, "phone": "5127798543", "snippet_text": "This review is mainly
|
92
|
+
for Elsa''s classes, although the other classes I went to were wonderful as
|
93
|
+
well. \n\nI have been recovering from a knee injury and upon...", "image_url":
|
94
|
+
"http://s3-media2.fl.yelpcdn.com/bphoto/WcI9BYAV0fMoQ9VAdArQQw/ms.jpg", "categories":
|
95
|
+
[["Yoga", "yoga"]], "display_phone": "+1-512-779-8543", "rating_img_url_large":
|
96
|
+
"http://s3-media3.fl.yelpcdn.com/assets/2/www/img/22affc4e6c38/ico/stars/v1/stars_large_5.png",
|
97
|
+
"menu_provider": "single_platform", "id": "eastside-yoga-austin", "is_closed":
|
98
|
+
false, "location": {"city": "Austin", "display_address": ["1050 E 11th St",
|
99
|
+
"Ste 150", "East Austin", "Austin, TX 78702"], "geo_accuracy": 8.0, "neighborhoods":
|
100
|
+
["East Austin"], "postal_code": "78702", "country_code": "US", "address":
|
101
|
+
["1050 E 11th St", "Ste 150"], "coordinate": {"latitude": 30.2692795, "longitude":
|
102
|
+
-97.728988599999994}, "state_code": "TX"}}, {"is_claimed": true, "rating":
|
103
|
+
5.0, "mobile_url": "http://m.yelp.com/biz/toddpilates-fitness-austin-2", "rating_img_url":
|
104
|
+
"http://s3-media1.fl.yelpcdn.com/assets/2/www/img/f1def11e4e79/ico/stars/v1/stars_5.png",
|
105
|
+
"review_count": 65, "name": "ToddPilates Fitness", "snippet_image_url": "http://s3-media3.fl.yelpcdn.com/photo/j-BQWGIH_0Xe4S90FFYvMA/ms.jpg",
|
106
|
+
"rating_img_url_small": "http://s3-media1.fl.yelpcdn.com/assets/2/www/img/c7623205d5cd/ico/stars/v1/stars_small_5.png",
|
107
|
+
"url": "http://www.yelp.com/biz/toddpilates-fitness-austin-2", "phone": "5126596740",
|
108
|
+
"snippet_text": "I''ve been coming here off and on since December 2013. The
|
109
|
+
staff is always extremely friendly and never pretentious. I love Barre class
|
110
|
+
but find most studios...", "image_url": "http://s3-media3.fl.yelpcdn.com/bphoto/FgHVeggy7tm1_1MAwgtCJA/ms.jpg",
|
111
|
+
"categories": [["Pilates", "pilates"]], "display_phone": "+1-512-659-6740",
|
112
|
+
"rating_img_url_large": "http://s3-media3.fl.yelpcdn.com/assets/2/www/img/22affc4e6c38/ico/stars/v1/stars_large_5.png",
|
113
|
+
"id": "toddpilates-fitness-austin-2", "is_closed": false, "location": {"city":
|
114
|
+
"Austin", "display_address": ["4032 S Lamar Blvd", "Ste 700", "Austin, TX
|
115
|
+
78704"], "geo_accuracy": 8.0, "postal_code": "78704", "country_code": "US",
|
116
|
+
"address": ["4032 S Lamar Blvd", "Ste 700"], "coordinate": {"latitude": 30.236459700000001,
|
117
|
+
"longitude": -97.793510400000002}, "state_code": "TX"}}, {"is_claimed": true,
|
118
|
+
"rating": 4.5, "mobile_url": "http://m.yelp.com/biz/barton-springs-pool-austin",
|
119
|
+
"rating_img_url": "http://s3-media2.fl.yelpcdn.com/assets/2/www/img/99493c12711e/ico/stars/v1/stars_4_half.png",
|
120
|
+
"review_count": 433, "name": "Barton Springs Pool", "snippet_image_url": "http://s3-media4.fl.yelpcdn.com/photo/Ptkw_-xRSBsuBCbHDhaxiQ/ms.jpg",
|
121
|
+
"rating_img_url_small": "http://s3-media2.fl.yelpcdn.com/assets/2/www/img/a5221e66bc70/ico/stars/v1/stars_small_4_half.png",
|
122
|
+
"url": "http://www.yelp.com/biz/barton-springs-pool-austin", "phone": "5124769044",
|
123
|
+
"snippet_text": "As a out of towner I''m super jealous I don''t have access
|
124
|
+
to Barton Springs everyday.\nMy friends and I were visiting for a wedding
|
125
|
+
and we went three days in...", "image_url": "http://s3-media2.fl.yelpcdn.com/bphoto/4XZO67N5Ufi5OSgIulpQBA/ms.jpg",
|
126
|
+
"categories": [["Swimming Pools", "swimmingpools"], ["Parks", "parks"], ["Recreation
|
127
|
+
Centers", "recreation"]], "display_phone": "+1-512-476-9044", "rating_img_url_large":
|
128
|
+
"http://s3-media4.fl.yelpcdn.com/assets/2/www/img/9f83790ff7f6/ico/stars/v1/stars_large_4_half.png",
|
129
|
+
"id": "barton-springs-pool-austin", "is_closed": false, "location": {"city":
|
130
|
+
"Austin", "display_address": ["2201 Barton Springs Rd", "Barton Hills", "Austin,
|
131
|
+
TX 78704"], "geo_accuracy": 8.0, "neighborhoods": ["Barton Hills", "78704
|
132
|
+
(South Austin)"], "postal_code": "78704", "country_code": "US", "address":
|
133
|
+
["2201 Barton Springs Rd"], "coordinate": {"latitude": 30.265920600000001,
|
134
|
+
"longitude": -97.768638600000003}, "state_code": "TX"}}, {"is_claimed": true,
|
135
|
+
"rating": 5.0, "mobile_url": "http://m.yelp.com/biz/rocket-electrics-electric-bicycle-rentals-tours-and-sales-austin",
|
136
|
+
"rating_img_url": "http://s3-media1.fl.yelpcdn.com/assets/2/www/img/f1def11e4e79/ico/stars/v1/stars_5.png",
|
137
|
+
"review_count": 61, "name": "Rocket Electrics Electric Bicycle Rentals, Tours,
|
138
|
+
and Sales", "snippet_image_url": "http://s3-media1.fl.yelpcdn.com/photo/qc8h1PnaPcGQLOqYp0AuyQ/ms.jpg",
|
139
|
+
"rating_img_url_small": "http://s3-media1.fl.yelpcdn.com/assets/2/www/img/c7623205d5cd/ico/stars/v1/stars_small_5.png",
|
140
|
+
"url": "http://www.yelp.com/biz/rocket-electrics-electric-bicycle-rentals-tours-and-sales-austin",
|
141
|
+
"phone": "5124422453", "snippet_text": "A definite out of town visitor must,
|
142
|
+
a great way to see the sights, and sample some of the flavor Austin has to
|
143
|
+
offer. \n\nI was skeptical at first if Rocket...", "image_url": "http://s3-media3.fl.yelpcdn.com/bphoto/P9D2-YvoE2a8ORVIIvC_BQ/ms.jpg",
|
144
|
+
"categories": [["Bike Rentals", "bikerentals"], ["Bikes", "bikes"], ["Bike
|
145
|
+
Repair/Maintenance", "bike_repair_maintenance"]], "display_phone": "+1-512-442-2453",
|
146
|
+
"rating_img_url_large": "http://s3-media3.fl.yelpcdn.com/assets/2/www/img/22affc4e6c38/ico/stars/v1/stars_large_5.png",
|
147
|
+
"id": "rocket-electrics-electric-bicycle-rentals-tours-and-sales-austin",
|
148
|
+
"is_closed": false, "location": {"city": "Austin", "display_address": ["1608
|
149
|
+
E Riverside Dr", "Austin, TX 78741"], "geo_accuracy": 9.5, "postal_code":
|
150
|
+
"78741", "country_code": "US", "address": ["1608 E Riverside Dr"], "coordinate":
|
151
|
+
{"latitude": 30.245638266018101, "longitude": -97.7305233478546}, "state_code":
|
152
|
+
"TX"}}, {"is_claimed": false, "rating": 5.0, "mobile_url": "http://m.yelp.com/biz/broadway-in-austin-at-texas-performing-arts-austin",
|
153
|
+
"rating_img_url": "http://s3-media1.fl.yelpcdn.com/assets/2/www/img/f1def11e4e79/ico/stars/v1/stars_5.png",
|
154
|
+
"review_count": 95, "name": "Broadway in Austin at Texas Performing Arts",
|
155
|
+
"snippet_image_url": "http://s3-media2.fl.yelpcdn.com/photo/-icnYBivF3oVh3tpWF_VLQ/ms.jpg",
|
156
|
+
"rating_img_url_small": "http://s3-media1.fl.yelpcdn.com/assets/2/www/img/c7623205d5cd/ico/stars/v1/stars_small_5.png",
|
157
|
+
"url": "http://www.yelp.com/biz/broadway-in-austin-at-texas-performing-arts-austin",
|
158
|
+
"phone": "8007317469", "snippet_text": "I love the theater! Many of my childhood
|
159
|
+
memories with my grandparents are going to the theater. So take me there as
|
160
|
+
much as you can!\n\nThe shows at Broadway...", "image_url": "http://s3-media4.fl.yelpcdn.com/bphoto/mQSaEQGLGQYxCo7sn-WRdg/ms.jpg",
|
161
|
+
"categories": [["Performing Arts", "theater"]], "display_phone": "+1-800-731-7469",
|
162
|
+
"rating_img_url_large": "http://s3-media3.fl.yelpcdn.com/assets/2/www/img/22affc4e6c38/ico/stars/v1/stars_large_5.png",
|
163
|
+
"id": "broadway-in-austin-at-texas-performing-arts-austin", "is_closed": false,
|
164
|
+
"location": {"city": "Austin", "display_address": ["23rd St and Robert Dedman
|
165
|
+
Dr", "University of Texas", "Austin, TX 78712"], "geo_accuracy": 9.5, "neighborhoods":
|
166
|
+
["University of Texas"], "postal_code": "78712", "country_code": "US", "address":
|
167
|
+
["23rd St and Robert Dedman Dr"], "coordinate": {"latitude": 30.284477299999999,
|
168
|
+
"longitude": -97.730847600000004}, "state_code": "TX"}}, {"is_claimed": true,
|
169
|
+
"rating": 5.0, "mobile_url": "http://m.yelp.com/biz/dancers-shape-barre-fitness-austin",
|
170
|
+
"rating_img_url": "http://s3-media1.fl.yelpcdn.com/assets/2/www/img/f1def11e4e79/ico/stars/v1/stars_5.png",
|
171
|
+
"review_count": 64, "name": "Dancers Shape - Barre Fitness", "snippet_image_url":
|
172
|
+
"http://s3-media1.fl.yelpcdn.com/photo/7jG6U-tHsiz-D0VbDPuzWw/ms.jpg", "rating_img_url_small":
|
173
|
+
"http://s3-media1.fl.yelpcdn.com/assets/2/www/img/c7623205d5cd/ico/stars/v1/stars_small_5.png",
|
174
|
+
"url": "http://www.yelp.com/biz/dancers-shape-barre-fitness-austin", "phone":
|
175
|
+
"5123829150", "snippet_text": "I''ve been working out at Dancers Shape for
|
176
|
+
almost two months now and I can''t get enough. Not only are the classes amazing
|
177
|
+
but the staff is exceptional....", "image_url": "http://s3-media3.fl.yelpcdn.com/bphoto/gqrP5FxPpThp6yNJCKXEvA/ms.jpg",
|
178
|
+
"categories": [["Yoga", "yoga"], ["Pilates", "pilates"], ["Barre Classes",
|
179
|
+
"barreclasses"]], "display_phone": "+1-512-382-9150", "rating_img_url_large":
|
180
|
+
"http://s3-media3.fl.yelpcdn.com/assets/2/www/img/22affc4e6c38/ico/stars/v1/stars_large_5.png",
|
181
|
+
"id": "dancers-shape-barre-fitness-austin", "is_closed": false, "location":
|
182
|
+
{"city": "Austin", "display_address": ["5350 Burnet Rd", "Ste 7", "Allandale",
|
183
|
+
"Austin, TX 78756"], "geo_accuracy": 8.0, "neighborhoods": ["Allandale"],
|
184
|
+
"postal_code": "78756", "country_code": "US", "address": ["5350 Burnet Rd",
|
185
|
+
"Ste 7"], "coordinate": {"latitude": 30.327590900000001, "longitude": -97.740386999999998},
|
186
|
+
"state_code": "TX"}}, {"is_claimed": true, "rating": 5.0, "mobile_url": "http://m.yelp.com/biz/live-love-paddle-austin-2",
|
187
|
+
"rating_img_url": "http://s3-media1.fl.yelpcdn.com/assets/2/www/img/f1def11e4e79/ico/stars/v1/stars_5.png",
|
188
|
+
"review_count": 61, "name": "Live Love Paddle", "snippet_image_url": "http://s3-media4.fl.yelpcdn.com/photo/R258rOFXOxVRD-jtPfgIfQ/ms.jpg",
|
189
|
+
"rating_img_url_small": "http://s3-media1.fl.yelpcdn.com/assets/2/www/img/c7623205d5cd/ico/stars/v1/stars_small_5.png",
|
190
|
+
"url": "http://www.yelp.com/biz/live-love-paddle-austin-2", "phone": "5128042122",
|
191
|
+
"snippet_text": "Came here to go kayaking while visiting a friend in Austin,
|
192
|
+
TX. Luckily he lives right behind the boardwalk and it was walking distance
|
193
|
+
to Live Love Paddle....", "image_url": "http://s3-media2.fl.yelpcdn.com/bphoto/dFL4IMQBkC4UfGMjRy5Ciw/ms.jpg",
|
194
|
+
"categories": [["Rafting/Kayaking", "rafting"], ["Paddleboarding", "paddleboarding"],
|
195
|
+
["Tours", "tours"]], "display_phone": "+1-512-804-2122", "rating_img_url_large":
|
196
|
+
"http://s3-media3.fl.yelpcdn.com/assets/2/www/img/22affc4e6c38/ico/stars/v1/stars_large_5.png",
|
197
|
+
"id": "live-love-paddle-austin-2", "is_closed": false, "location": {"city":
|
198
|
+
"Austin", "display_address": ["1602 E Riverside Dr", "Austin, TX 78741"],
|
199
|
+
"geo_accuracy": 9.5, "postal_code": "78741", "country_code": "US", "address":
|
200
|
+
["1602 E Riverside Dr"], "coordinate": {"latitude": 30.246060700000001, "longitude":
|
201
|
+
-97.731545100000005}, "state_code": "TX"}}, {"is_claimed": true, "rating":
|
202
|
+
4.5, "mobile_url": "http://m.yelp.com/biz/esthers-follies-austin-2", "rating_img_url":
|
203
|
+
"http://s3-media2.fl.yelpcdn.com/assets/2/www/img/99493c12711e/ico/stars/v1/stars_4_half.png",
|
204
|
+
"review_count": 234, "name": "Esther''s Follies", "snippet_image_url": "http://s3-media3.fl.yelpcdn.com/photo/K7UU-5DETISmZn6J-yjmLA/ms.jpg",
|
205
|
+
"rating_img_url_small": "http://s3-media2.fl.yelpcdn.com/assets/2/www/img/a5221e66bc70/ico/stars/v1/stars_small_4_half.png",
|
206
|
+
"url": "http://www.yelp.com/biz/esthers-follies-austin-2", "phone": "5123200553",
|
207
|
+
"snippet_text": "If you have not been to Esther''s Follies, I demand that
|
208
|
+
you go! \n\n\nGet your tickets.\n\n\nNow.", "image_url": "http://s3-media3.fl.yelpcdn.com/bphoto/8ISHNGXxPr26FOG_BSg9Tg/ms.jpg",
|
209
|
+
"categories": [["Performing Arts", "theater"], ["Comedy Clubs", "comedyclubs"]],
|
210
|
+
"display_phone": "+1-512-320-0553", "rating_img_url_large": "http://s3-media4.fl.yelpcdn.com/assets/2/www/img/9f83790ff7f6/ico/stars/v1/stars_large_4_half.png",
|
211
|
+
"id": "esthers-follies-austin-2", "is_closed": false, "location": {"city":
|
212
|
+
"Austin", "display_address": ["525 E 6th St", "Downtown", "Austin, TX 78701"],
|
213
|
+
"geo_accuracy": 8.0, "neighborhoods": ["Downtown", "Sixth Street District"],
|
214
|
+
"postal_code": "78701", "country_code": "US", "address": ["525 E 6th St"],
|
215
|
+
"coordinate": {"latitude": 30.2663498, "longitude": -97.737533600000006},
|
216
|
+
"state_code": "TX"}}, {"is_claimed": true, "rating": 4.5, "mobile_url": "http://m.yelp.com/biz/rogue-running-austin",
|
217
|
+
"rating_img_url": "http://s3-media2.fl.yelpcdn.com/assets/2/www/img/99493c12711e/ico/stars/v1/stars_4_half.png",
|
218
|
+
"review_count": 74, "name": "Rogue Running", "snippet_image_url": "http://s3-media2.fl.yelpcdn.com/photo/65PLGh4uqSzsaSW-rYHXgg/ms.jpg",
|
219
|
+
"rating_img_url_small": "http://s3-media2.fl.yelpcdn.com/assets/2/www/img/a5221e66bc70/ico/stars/v1/stars_small_4_half.png",
|
220
|
+
"url": "http://www.yelp.com/biz/rogue-running-austin", "phone": "5124930920",
|
221
|
+
"snippet_text": "I went here about 3 weeks before they moved to downtown.
|
222
|
+
\n\nIt was December 27, and I decided to buy myself some new running shoes
|
223
|
+
with my Christmas money....", "image_url": "http://s3-media1.fl.yelpcdn.com/bphoto/O9HcKCTt5ix2fQptoDm_TA/ms.jpg",
|
224
|
+
"categories": [["Trainers", "healthtrainers"], ["Sports Wear", "sportswear"]],
|
225
|
+
"display_phone": "+1-512-493-0920", "rating_img_url_large": "http://s3-media4.fl.yelpcdn.com/assets/2/www/img/9f83790ff7f6/ico/stars/v1/stars_large_4_half.png",
|
226
|
+
"id": "rogue-running-austin", "is_closed": true, "location": {"city": "Austin",
|
227
|
+
"display_address": ["500 San Marcos St", "East Austin", "Austin, TX 78702"],
|
228
|
+
"geo_accuracy": 9.5, "neighborhoods": ["East Austin"], "postal_code": "78702",
|
229
|
+
"country_code": "US", "address": ["500 San Marcos St"], "coordinate": {"latitude":
|
230
|
+
30.264553899999999, "longitude": -97.732868800000006}, "state_code": "TX"}},
|
231
|
+
{"is_claimed": true, "rating": 4.5, "mobile_url": "http://m.yelp.com/biz/alamo-drafthouse-cinema-austin-6",
|
232
|
+
"rating_img_url": "http://s3-media2.fl.yelpcdn.com/assets/2/www/img/99493c12711e/ico/stars/v1/stars_4_half.png",
|
233
|
+
"review_count": 428, "name": "Alamo Drafthouse Cinema", "snippet_image_url":
|
234
|
+
"http://s3-media2.fl.yelpcdn.com/photo/ROU3EFSBfEbw9G6TGhHYKw/ms.jpg", "rating_img_url_small":
|
235
|
+
"http://s3-media2.fl.yelpcdn.com/assets/2/www/img/a5221e66bc70/ico/stars/v1/stars_small_4_half.png",
|
236
|
+
"url": "http://www.yelp.com/biz/alamo-drafthouse-cinema-austin-6", "phone":
|
237
|
+
"5124761320", "snippet_text": "I love the Alamo in general, but had never
|
238
|
+
been to the downtown location. The whole place has the cool old move house
|
239
|
+
feel--when they were called houses and...", "image_url": "http://s3-media1.fl.yelpcdn.com/bphoto/HnHfxdKoFEu2zJONyGzNjA/ms.jpg",
|
240
|
+
"categories": [["Cinema", "movietheaters"]], "display_phone": "+1-512-476-1320",
|
241
|
+
"rating_img_url_large": "http://s3-media4.fl.yelpcdn.com/assets/2/www/img/9f83790ff7f6/ico/stars/v1/stars_large_4_half.png",
|
242
|
+
"id": "alamo-drafthouse-cinema-austin-6", "is_closed": false, "location":
|
243
|
+
{"city": "Austin", "display_address": ["320 E 6th Street", "Downtown", "Austin,
|
244
|
+
TX 78701"], "geo_accuracy": 8.0, "neighborhoods": ["Downtown", "Sixth Street
|
245
|
+
District"], "postal_code": "78701", "country_code": "US", "address": ["320
|
246
|
+
E 6th Street"], "coordinate": {"latitude": 30.267447000000001, "longitude":
|
247
|
+
-97.739509999999996}, "state_code": "TX"}}, {"is_claimed": false, "rating":
|
248
|
+
5.0, "mobile_url": "http://m.yelp.com/biz/bijou-studio-austin", "rating_img_url":
|
249
|
+
"http://s3-media1.fl.yelpcdn.com/assets/2/www/img/f1def11e4e79/ico/stars/v1/stars_5.png",
|
250
|
+
"review_count": 25, "name": "Bijou Studio", "snippet_image_url": "http://s3-media3.fl.yelpcdn.com/photo/pa2ezf8oVd15MIwLwRFHhg/ms.jpg",
|
251
|
+
"rating_img_url_small": "http://s3-media1.fl.yelpcdn.com/assets/2/www/img/c7623205d5cd/ico/stars/v1/stars_small_5.png",
|
252
|
+
"url": "http://www.yelp.com/biz/bijou-studio-austin", "phone": "5124741975",
|
253
|
+
"snippet_text": "Megan is absolutely amazing. She just finished my second
|
254
|
+
tattoo and my boyfriend''s entire sleeve. Not only is she extremely talented
|
255
|
+
as an artist but she is...", "image_url": "http://s3-media4.fl.yelpcdn.com/bphoto/6hYlFFhwbnhdZ-S0U2M9IQ/ms.jpg",
|
256
|
+
"categories": [["Art Galleries", "galleries"], ["Tattoo", "tattoo"]], "display_phone":
|
257
|
+
"+1-512-474-1975", "rating_img_url_large": "http://s3-media3.fl.yelpcdn.com/assets/2/www/img/22affc4e6c38/ico/stars/v1/stars_large_5.png",
|
258
|
+
"id": "bijou-studio-austin", "is_closed": false, "location": {"city": "Austin",
|
259
|
+
"display_address": ["1618 E 6th St", "East Austin", "Austin, TX 78702"], "geo_accuracy":
|
260
|
+
8.0, "neighborhoods": ["East Austin"], "postal_code": "78702", "country_code":
|
261
|
+
"US", "address": ["1618 E 6th St"], "coordinate": {"latitude": 30.262829,
|
262
|
+
"longitude": -97.725043999999997}, "state_code": "TX"}}, {"is_claimed": true,
|
263
|
+
"rating": 5.0, "mobile_url": "http://m.yelp.com/biz/sherpa-fitness-austin",
|
264
|
+
"rating_img_url": "http://s3-media1.fl.yelpcdn.com/assets/2/www/img/f1def11e4e79/ico/stars/v1/stars_5.png",
|
265
|
+
"review_count": 28, "name": "Sherpa Fitness", "snippet_image_url": "http://s3-media1.fl.yelpcdn.com/photo/ICd8_FVmAInkw--kq3d4HQ/ms.jpg",
|
266
|
+
"rating_img_url_small": "http://s3-media1.fl.yelpcdn.com/assets/2/www/img/c7623205d5cd/ico/stars/v1/stars_small_5.png",
|
267
|
+
"url": "http://www.yelp.com/biz/sherpa-fitness-austin", "deals": [{"is_popular":
|
268
|
+
true, "what_you_get": "You get a voucher redeemable for $130 at Sherpa Fitness.\nPrint
|
269
|
+
out your voucher, or redeem on your phone with the \u003ca href=\"http://www.yelp.com/yelpmobile\"\u003eYelp
|
270
|
+
app\u003c/a\u003e.", "time_start": 1330442095, "title": "$65 for $130", "url":
|
271
|
+
"http://www.yelp.com/deals/sherpa-fitness-austin", "additional_restrictions":
|
272
|
+
"Promotion lasts for 1 year from date of purchase. After that period, your
|
273
|
+
voucher is redeemable for the amount you paid, less any value you may have
|
274
|
+
received. Not valid with other vouchers, certificates, or offers. Voucher
|
275
|
+
can only be used for services, not retail products. Only 1 voucher(s) can
|
276
|
+
be purchased and redeemed per person. Up to 2 can be purchased as gifts for
|
277
|
+
others. Subject to the \u003ca target=\"_blank\" href=\"http://www.yelp.com/tos/general_b2c_us_20120911\"\u003eGeneral
|
278
|
+
Terms\u003c/a\u003e.", "options": [{"original_price": 13000, "title": "$65
|
279
|
+
for $130", "price": 6500, "purchase_url": "https://www.yelp.com/checkout/deal/EVnELcQqLn-yI3daw6enuA",
|
280
|
+
"formatted_original_price": "$130", "formatted_price": "$65", "is_quantity_limited":
|
281
|
+
false}], "image_url": "http://s3-media4.fl.yelpcdn.com/dphoto/S8psyv0vjFH1-r0-keYYoA/m.jpg",
|
282
|
+
"id": "WbpTGHFXjJi-AYiudDAr5g", "currency_code": "USD"}], "phone": "5127094029",
|
283
|
+
"snippet_text": "If you enjoy a challenging workout and being outside, Sherpa
|
284
|
+
Fitness is the class for you. It''s by far the best class I''ve ever been
|
285
|
+
to!\n\nI''ve been going...", "image_url": "http://s3-media2.fl.yelpcdn.com/bphoto/kObarW01Y2gQF7-ZJF9wxw/ms.jpg",
|
286
|
+
"categories": [["Trainers", "healthtrainers"], ["Gyms", "gyms"]], "display_phone":
|
287
|
+
"+1-512-709-4029", "rating_img_url_large": "http://s3-media3.fl.yelpcdn.com/assets/2/www/img/22affc4e6c38/ico/stars/v1/stars_large_5.png",
|
288
|
+
"id": "sherpa-fitness-austin", "is_closed": false, "location": {"city": "Austin",
|
289
|
+
"display_address": ["511 S Park Dr", "So-Fi (S. 1st St. District)", "Austin,
|
290
|
+
TX 78704"], "geo_accuracy": 8.0, "neighborhoods": ["So-Fi (S. 1st St. District)",
|
291
|
+
"78704 (South Austin)"], "postal_code": "78704", "country_code": "US", "address":
|
292
|
+
["511 S Park Dr"], "coordinate": {"latitude": 30.232614999999999, "longitude":
|
293
|
+
-97.764754999999994}, "state_code": "TX"}}, {"is_claimed": true, "rating":
|
294
|
+
4.5, "mobile_url": "http://m.yelp.com/biz/dharma-yoga-and-dharma-yoga-east-side-austin-2",
|
295
|
+
"rating_img_url": "http://s3-media2.fl.yelpcdn.com/assets/2/www/img/99493c12711e/ico/stars/v1/stars_4_half.png",
|
296
|
+
"review_count": 63, "name": "Dharma Yoga \u0026 Dharma Yoga East Side", "snippet_image_url":
|
297
|
+
"http://s3-media3.fl.yelpcdn.com/photo/gfUPVjHQ9RcR7e0DFzt7cA/ms.jpg", "rating_img_url_small":
|
298
|
+
"http://s3-media2.fl.yelpcdn.com/assets/2/www/img/a5221e66bc70/ico/stars/v1/stars_small_4_half.png",
|
299
|
+
"url": "http://www.yelp.com/biz/dharma-yoga-and-dharma-yoga-east-side-austin-2",
|
300
|
+
"menu_date_updated": 1387643299, "deals": [{"is_popular": true, "what_you_get":
|
301
|
+
"You get a voucher redeemable for $100 at Dharma Yoga \u0026 Dharma Yoga East
|
302
|
+
Side.\nPrint out your voucher, or redeem on your phone with the \u003ca href=\"http://www.yelp.com/yelpmobile\"\u003eYelp
|
303
|
+
app\u003c/a\u003e.", "time_start": 1338348911, "title": "$49 for $100", "url":
|
304
|
+
"http://www.yelp.com/deals/dharma-yoga-austin-2", "additional_restrictions":
|
305
|
+
"Promotion lasts for 1 year from date of purchase. After that period, your
|
306
|
+
voucher is redeemable for the amount you paid, less any value you may have
|
307
|
+
received. Only 1 voucher(s) can be purchased and redeemed per person. Up to
|
308
|
+
3 can be purchased as gifts for others. Subject to the \u003ca target=\"_blank\"
|
309
|
+
href=\"http://www.yelp.com/tos/general_b2c_us_20120911\"\u003eGeneral Terms\u003c/a\u003e.",
|
310
|
+
"options": [{"original_price": 10000, "title": "$49 for $100", "price": 4900,
|
311
|
+
"purchase_url": "https://www.yelp.com/checkout/deal/oe8DMZO5Qlqnk_MnLoqTrg",
|
312
|
+
"formatted_original_price": "$100", "formatted_price": "$49", "is_quantity_limited":
|
313
|
+
false}], "important_restrictions": "New customers only.", "image_url": "http://s3-media3.fl.yelpcdn.com/dphoto/sXFAhLomxcSwllU6VkzzYQ/m.jpg",
|
314
|
+
"id": "4Fons2f2CLKhC_x0QyeUqw", "currency_code": "USD"}], "phone": "5124200009",
|
315
|
+
"snippet_text": "Dharma Yoga is so much more than the usual Right Foot Blue/Left
|
316
|
+
Hand Yellow twister-like approach to yoga that I''ve seen at so many other
|
317
|
+
studios. The...", "image_url": "http://s3-media3.fl.yelpcdn.com/bphoto/f3IcuWPrFt-SdoNMnCWYYA/ms.jpg",
|
318
|
+
"categories": [["Yoga", "yoga"]], "display_phone": "+1-512-420-0009", "rating_img_url_large":
|
319
|
+
"http://s3-media4.fl.yelpcdn.com/assets/2/www/img/9f83790ff7f6/ico/stars/v1/stars_large_4_half.png",
|
320
|
+
"menu_provider": "single_platform", "id": "dharma-yoga-and-dharma-yoga-east-side-austin-2",
|
321
|
+
"is_closed": false, "location": {"city": "Austin", "display_address": ["3110
|
322
|
+
Guadalupe St", "University of Texas", "Austin, TX 78705"], "geo_accuracy":
|
323
|
+
9.5, "neighborhoods": ["University of Texas"], "postal_code": "78705", "country_code":
|
324
|
+
"US", "address": ["3110 Guadalupe St"], "coordinate": {"latitude": 30.2984452,
|
325
|
+
"longitude": -97.741250800000003}, "state_code": "TX"}}, {"is_claimed": true,
|
326
|
+
"rating": 5.0, "mobile_url": "http://m.yelp.com/biz/congress-avenue-kayaks-austin",
|
327
|
+
"rating_img_url": "http://s3-media1.fl.yelpcdn.com/assets/2/www/img/f1def11e4e79/ico/stars/v1/stars_5.png",
|
328
|
+
"review_count": 25, "name": "Congress Avenue Kayaks", "snippet_image_url":
|
329
|
+
"http://s3-media3.fl.yelpcdn.com/photo/InL1VmPEPFnSZDoRp7fayQ/ms.jpg", "rating_img_url_small":
|
330
|
+
"http://s3-media1.fl.yelpcdn.com/assets/2/www/img/c7623205d5cd/ico/stars/v1/stars_small_5.png",
|
331
|
+
"url": "http://www.yelp.com/biz/congress-avenue-kayaks-austin", "phone": "5128098916",
|
332
|
+
"snippet_text": "I can''t believe I got convinced into doing SUP, stand up
|
333
|
+
paddleboarding. I have no balance on land let alone water. However, the
|
334
|
+
things a guy will do for...", "image_url": "http://s3-media4.fl.yelpcdn.com/bphoto/KcaUSUY1x2m2ikgRloqhTw/ms.jpg",
|
335
|
+
"categories": [["Rafting/Kayaking", "rafting"], ["Paddleboarding", "paddleboarding"]],
|
336
|
+
"display_phone": "+1-512-809-8916", "rating_img_url_large": "http://s3-media3.fl.yelpcdn.com/assets/2/www/img/22affc4e6c38/ico/stars/v1/stars_large_5.png",
|
337
|
+
"id": "congress-avenue-kayaks-austin", "is_closed": false, "location": {"city":
|
338
|
+
"Austin", "display_address": ["74 Trinity St", "Austin, TX 78701"], "geo_accuracy":
|
339
|
+
8.0, "postal_code": "78701", "country_code": "US", "address": ["74 Trinity
|
340
|
+
St"], "coordinate": {"latitude": 30.261161999999999, "longitude": -97.741485999999995},
|
341
|
+
"state_code": "TX"}}, {"is_claimed": true, "rating": 4.5, "mobile_url": "http://m.yelp.com/biz/sister-temperance-tarot-austin",
|
342
|
+
"rating_img_url": "http://s3-media2.fl.yelpcdn.com/assets/2/www/img/99493c12711e/ico/stars/v1/stars_4_half.png",
|
343
|
+
"review_count": 35, "name": "Sister Temperance Tarot", "snippet_image_url":
|
344
|
+
"http://s3-media4.fl.yelpcdn.com/photo/jP5K0L7GTJtvjC1sVUHiKg/ms.jpg", "rating_img_url_small":
|
345
|
+
"http://s3-media2.fl.yelpcdn.com/assets/2/www/img/a5221e66bc70/ico/stars/v1/stars_small_4_half.png",
|
346
|
+
"url": "http://www.yelp.com/biz/sister-temperance-tarot-austin", "phone":
|
347
|
+
"5124665124", "snippet_text": "Before I even begin this review, I want to
|
348
|
+
say one thing: it doesn''t matter if you''re a cynic or a first timer, your
|
349
|
+
hour with Angeliska will be one of the...", "image_url": "http://s3-media1.fl.yelpcdn.com/bphoto/xP-JHcDkBySl0_HuerFl7Q/ms.jpg",
|
350
|
+
"categories": [["Psychics \u0026 Astrologers", "psychic_astrology"]], "display_phone":
|
351
|
+
"+1-512-466-5124", "rating_img_url_large": "http://s3-media4.fl.yelpcdn.com/assets/2/www/img/9f83790ff7f6/ico/stars/v1/stars_large_4_half.png",
|
352
|
+
"id": "sister-temperance-tarot-austin", "is_closed": false, "location": {"city":
|
353
|
+
"Austin", "display_address": ["1051 Springdale Rd", "East Austin", "Austin,
|
354
|
+
TX 78721"], "geo_accuracy": 8.0, "neighborhoods": ["East Austin"], "postal_code":
|
355
|
+
"78721", "country_code": "US", "address": ["1051 Springdale Rd"], "coordinate":
|
356
|
+
{"latitude": 30.270799398422199, "longitude": -97.692148312926307}, "state_code":
|
357
|
+
"TX"}}, {"is_claimed": true, "rating": 5.0, "mobile_url": "http://m.yelp.com/biz/austin-simply-fit-austin-2",
|
358
|
+
"rating_img_url": "http://s3-media1.fl.yelpcdn.com/assets/2/www/img/f1def11e4e79/ico/stars/v1/stars_5.png",
|
359
|
+
"review_count": 28, "name": "Austin Simply Fit", "snippet_image_url": "http://s3-media3.fl.yelpcdn.com/photo/VXDvhrX54PKptcm8ceQOsQ/ms.jpg",
|
360
|
+
"rating_img_url_small": "http://s3-media1.fl.yelpcdn.com/assets/2/www/img/c7623205d5cd/ico/stars/v1/stars_small_5.png",
|
361
|
+
"url": "http://www.yelp.com/biz/austin-simply-fit-austin-2", "deals": [{"is_popular":
|
362
|
+
true, "what_you_get": "You get a voucher redeemable for $75 at Austin Simply
|
363
|
+
Fit.\nPrint out your voucher, or redeem on your phone with the \u003ca href=\"http://www.yelp.com/yelpmobile\"\u003eYelp
|
364
|
+
app\u003c/a\u003e.", "time_start": 1320956374, "title": "$50 for $75", "url":
|
365
|
+
"http://www.yelp.com/deals/austin-simply-fit-austin-2", "additional_restrictions":
|
366
|
+
"Promotion lasts for 1 year from date of purchase. After that period, your
|
367
|
+
voucher is redeemable for the amount you paid, less any value you may have
|
368
|
+
received. Not valid with other vouchers, certificates, or offers. Only 1 voucher(s)
|
369
|
+
can be purchased and redeemed per person. Up to 3 can be purchased as gifts
|
370
|
+
for others. Subject to the \u003ca target=\"_blank\" href=\"http://www.yelp.com/tos/general_b2c_us_20120911\"\u003eGeneral
|
371
|
+
Terms\u003c/a\u003e.", "options": [{"original_price": 7500, "title": "$50
|
372
|
+
for $75", "price": 5000, "purchase_url": "https://www.yelp.com/checkout/deal/1Qy_zrEFBb2i-BMMqRFRNw",
|
373
|
+
"formatted_original_price": "$75", "formatted_price": "$50", "is_quantity_limited":
|
374
|
+
false}], "image_url": "http://s3-media2.fl.yelpcdn.com/dphoto/dJ7qTALUPWtxvL6JKQCeJQ/m.jpg",
|
375
|
+
"id": "8lFGTBTnhsCI-ZBIvDC1Iw", "currency_code": "USD"}], "phone": "5125025032",
|
376
|
+
"snippet_text": "Austin Simply Fit is the bomb!\nNikki, my trainer there has
|
377
|
+
helped me transform my body over the last 6 months. \nI came in at my highest
|
378
|
+
weight feeling...", "image_url": "http://s3-media1.fl.yelpcdn.com/bphoto/WtsGTQI3aoHLgY11voKXyw/ms.jpg",
|
379
|
+
"categories": [["Gyms", "gyms"], ["Trainers", "healthtrainers"], ["Boot Camps",
|
380
|
+
"bootcamps"]], "display_phone": "+1-512-502-5032", "gift_certificates": [{"url":
|
381
|
+
"http://www.yelp.com/gift-certificates/austin-simply-fit-austin-2", "unused_balances":
|
382
|
+
"CASH", "options": [{"price": 2500, "formatted_price": "$25"}, {"price": 5000,
|
383
|
+
"formatted_price": "$50"}, {"price": 7500, "formatted_price": "$75"}, {"price":
|
384
|
+
10000, "formatted_price": "$100"}, {"price": 15000, "formatted_price": "$150"}],
|
385
|
+
"image_url": "http://s3-media1.fl.yelpcdn.com/bphoto/IpHpxUXY0A6jAZqiFQ2iCA/m.jpg",
|
386
|
+
"id": "pcrn86C9_5RWFi9SM5LAEw", "currency_code": "USD"}], "rating_img_url_large":
|
387
|
+
"http://s3-media3.fl.yelpcdn.com/assets/2/www/img/22affc4e6c38/ico/stars/v1/stars_large_5.png",
|
388
|
+
"id": "austin-simply-fit-austin-2", "is_closed": false, "location": {"city":
|
389
|
+
"Austin", "display_address": ["5134 Burnet Rd", "Rosedale", "Austin, TX 78756"],
|
390
|
+
"geo_accuracy": 8.0, "neighborhoods": ["Rosedale", "Allandale"], "postal_code":
|
391
|
+
"78756", "country_code": "US", "address": ["5134 Burnet Rd"], "coordinate":
|
392
|
+
{"latitude": 30.3234806, "longitude": -97.7397232}, "state_code": "TX"}},
|
393
|
+
{"is_claimed": true, "rating": 5.0, "mobile_url": "http://m.yelp.com/biz/barton-springs-bike-rentals-austin",
|
394
|
+
"rating_img_url": "http://s3-media1.fl.yelpcdn.com/assets/2/www/img/f1def11e4e79/ico/stars/v1/stars_5.png",
|
395
|
+
"review_count": 60, "name": "Barton Springs Bike Rentals", "snippet_image_url":
|
396
|
+
"http://s3-media3.fl.yelpcdn.com/photo/N_88KKbOa2efFFPStOUCkg/ms.jpg", "rating_img_url_small":
|
397
|
+
"http://s3-media1.fl.yelpcdn.com/assets/2/www/img/c7623205d5cd/ico/stars/v1/stars_small_5.png",
|
398
|
+
"url": "http://www.yelp.com/biz/barton-springs-bike-rentals-austin", "phone":
|
399
|
+
"5124800200", "snippet_text": "Awesome customer service! I forgot the name
|
400
|
+
of the older gentleman that works here but he was super friendly and helpful!
|
401
|
+
The cost of the bikes range from...", "image_url": "http://s3-media3.fl.yelpcdn.com/bphoto/FYyRp33cJvwojzY-TITzSA/ms.jpg",
|
402
|
+
"categories": [["Bike Rentals", "bikerentals"], ["Tours", "tours"]], "display_phone":
|
403
|
+
"+1-512-480-0200", "rating_img_url_large": "http://s3-media3.fl.yelpcdn.com/assets/2/www/img/22affc4e6c38/ico/stars/v1/stars_large_5.png",
|
404
|
+
"id": "barton-springs-bike-rentals-austin", "is_closed": false, "location":
|
405
|
+
{"city": "Austin", "display_address": ["1707 Barton Springs Rd", "78704 (South
|
406
|
+
Austin)", "Austin, TX 78704"], "geo_accuracy": 8.0, "neighborhoods": ["78704
|
407
|
+
(South Austin)"], "postal_code": "78704", "country_code": "US", "address":
|
408
|
+
["1707 Barton Springs Rd"], "coordinate": {"latitude": 30.2629108, "longitude":
|
409
|
+
-97.7629929}, "state_code": "TX"}}, {"is_claimed": true, "rating": 4.5, "mobile_url":
|
410
|
+
"http://m.yelp.com/biz/zilker-park-boat-rentals-austin", "rating_img_url":
|
411
|
+
"http://s3-media2.fl.yelpcdn.com/assets/2/www/img/99493c12711e/ico/stars/v1/stars_4_half.png",
|
412
|
+
"review_count": 92, "name": "Zilker Park Boat Rentals", "snippet_image_url":
|
413
|
+
"http://s3-media1.fl.yelpcdn.com/photo/ayrfnFeWbk7bD_s4gYqU1w/ms.jpg", "rating_img_url_small":
|
414
|
+
"http://s3-media2.fl.yelpcdn.com/assets/2/www/img/a5221e66bc70/ico/stars/v1/stars_small_4_half.png",
|
415
|
+
"url": "http://www.yelp.com/biz/zilker-park-boat-rentals-austin", "phone":
|
416
|
+
"5124783852", "snippet_text": "One of the best ways to enjoy Austin. This
|
417
|
+
is the best canoe/kayak rental in Austin! It''s the most scenic launch area,
|
418
|
+
the most laid back staff and the best...", "image_url": "http://s3-media3.fl.yelpcdn.com/bphoto/6K994oJVY89nQmU-EQgOCQ/ms.jpg",
|
419
|
+
"categories": [["Boating", "boating"], ["Rafting/Kayaking", "rafting"]], "display_phone":
|
420
|
+
"+1-512-478-3852", "rating_img_url_large": "http://s3-media4.fl.yelpcdn.com/assets/2/www/img/9f83790ff7f6/ico/stars/v1/stars_large_4_half.png",
|
421
|
+
"id": "zilker-park-boat-rentals-austin", "is_closed": false, "location": {"city":
|
422
|
+
"Austin", "display_address": ["2101 Andrew Zilker Rd", "Barton Hills", "Austin,
|
423
|
+
TX 78746"], "geo_accuracy": 9.5, "neighborhoods": ["Barton Hills", "78704
|
424
|
+
(South Austin)"], "postal_code": "78746", "country_code": "US", "address":
|
425
|
+
["2101 Andrew Zilker Rd"], "coordinate": {"latitude": 30.264324283169898,
|
426
|
+
"longitude": -97.767498730410793}, "state_code": "TX"}}]}'
|
427
|
+
http_version:
|
428
|
+
recorded_at: Wed, 05 Nov 2014 17:55:35 GMT
|
429
|
+
recorded_with: VCR 2.9.3
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Yelpify::Authorization do
|
4
|
+
before(:all) do
|
5
|
+
@creds = {
|
6
|
+
:consumer_key => "abc123",
|
7
|
+
:consumer_secret => "def456",
|
8
|
+
:token => "ghi789",
|
9
|
+
:token_secret => "jkl000"
|
10
|
+
}
|
11
|
+
|
12
|
+
@bad_creds = {
|
13
|
+
:consumer_key => "",
|
14
|
+
:consumer_secret => "",
|
15
|
+
:token => "",
|
16
|
+
:token_secret => ""
|
17
|
+
}
|
18
|
+
end
|
19
|
+
|
20
|
+
describe '#initialize' do
|
21
|
+
it "sets credentials and access_token" do
|
22
|
+
auth = Yelpify::Authorization.new(@creds)
|
23
|
+
expect(auth.credentials).to eq(@creds)
|
24
|
+
expect(auth.access_token).to_not be_nil
|
25
|
+
end
|
26
|
+
|
27
|
+
it "throws an error if the credentials are invalid" do
|
28
|
+
expect {
|
29
|
+
Yelpify::Authorization.new(@bad_creds)
|
30
|
+
}.to raise_error(Yelpify::InvalidCredentials)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Yelpify::Business do
|
4
|
+
before(:all) do
|
5
|
+
@search_data = {}
|
6
|
+
@id = "yelp-san-francisco"
|
7
|
+
end
|
8
|
+
|
9
|
+
describe '#build_url' do
|
10
|
+
it 'generates search path' do
|
11
|
+
client = Yelpify::Business.new
|
12
|
+
url = client.build_url(@id, @search_data)
|
13
|
+
expected_url = "http://api.yelp.com/v2/business/yelp-san-francisco?"
|
14
|
+
|
15
|
+
expect(url).to eq(expected_url)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Yelpify::Client do
|
4
|
+
before(:all) do
|
5
|
+
@creds = {
|
6
|
+
:consumer_key => ENV['YELP_KEY'],
|
7
|
+
:consumer_secret => ENV['YELP_SECRET'],
|
8
|
+
:token => ENV['YELP_TOKEN'],
|
9
|
+
:token_secret => ENV['YELP_TOKEN_SECRET']
|
10
|
+
}
|
11
|
+
@client = Yelpify.new_client(@creds)
|
12
|
+
end
|
13
|
+
|
14
|
+
describe '#initialize' do
|
15
|
+
it 'initializes with access_token, search instance and business instance' do
|
16
|
+
access_token = @client.access_token
|
17
|
+
|
18
|
+
expect(access_token).to be_a(OAuth::AccessToken)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
describe '#search' do
|
23
|
+
it "makes a search request" do
|
24
|
+
search_data = {
|
25
|
+
"location" => "austin, texas",
|
26
|
+
"category_filter" => "active,arts"
|
27
|
+
}
|
28
|
+
|
29
|
+
VCR.use_cassette('search') do
|
30
|
+
response = @client.search(search_data)
|
31
|
+
expect(response).to be_a(OpenStruct)
|
32
|
+
expect(response.businesses[0].name).to be_a(String)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
describe '#business' do
|
38
|
+
it "makes a business request" do
|
39
|
+
id = "yelp-san-francisco"
|
40
|
+
|
41
|
+
VCR.use_cassette('business') do
|
42
|
+
response = @client.business(id)
|
43
|
+
expect(response).to be_a(OpenStruct)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Yelpify::Search do
|
4
|
+
before(:all) do
|
5
|
+
@search_data = {
|
6
|
+
"location" => "austin, texas",
|
7
|
+
"category_filter" => "active,arts"
|
8
|
+
}
|
9
|
+
end
|
10
|
+
|
11
|
+
describe '#build_url' do
|
12
|
+
it 'generates search path' do
|
13
|
+
client = Yelpify::Search.new
|
14
|
+
url = client.build_url(@search_data)
|
15
|
+
expected_url = "http://api.yelp.com/v2/search?location=austin%2C+texas&category_filter=active%2Carts"
|
16
|
+
|
17
|
+
expect(url).to eq(expected_url)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Yelpify::Utils do
|
4
|
+
|
5
|
+
describe '#convert_to_ostruct' do
|
6
|
+
it "converts a hash to ostruct" do
|
7
|
+
hash = {:a=>10, :b=>[100, 200, {n: 30}], :c=>{:x=>44, :y=>{:i=>11}}}
|
8
|
+
|
9
|
+
ostruct = Yelpify::Utils.convert_to_ostruct(hash)
|
10
|
+
|
11
|
+
expect(ostruct.c.y.i).to eq(11)
|
12
|
+
expect(ostruct.b[2].n).to eq(30)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
data/yelpify.gemspec
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'yelpify/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "yelpify"
|
8
|
+
spec.version = Yelpify::VERSION
|
9
|
+
spec.authors = ["Lili Serfaty"]
|
10
|
+
spec.email = ["lili.serfaty@gmail.com"]
|
11
|
+
spec.summary = %q{Facilitate the use of the yelp API.}
|
12
|
+
spec.description = %q{Facilitate the use of the yelp API.}
|
13
|
+
spec.homepage = ""
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_runtime_dependency "oauth", "~> 0.4.7"
|
22
|
+
spec.add_runtime_dependency "dotenv", "~> 1.0.2"
|
23
|
+
|
24
|
+
spec.add_development_dependency "bundler", "~> 1.7"
|
25
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
26
|
+
spec.add_development_dependency "rspec", "~> 3.1.0"
|
27
|
+
spec.add_development_dependency "pry-byebug", "~> 0.10.1"
|
28
|
+
spec.add_development_dependency "vcr", "~> 2.9.3"
|
29
|
+
spec.add_development_dependency "webmock", "~> 1.20.2"
|
30
|
+
end
|
metadata
ADDED
@@ -0,0 +1,187 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: yelpify
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Lili Serfaty
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-11-10 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: oauth
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.4.7
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.4.7
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: dotenv
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 1.0.2
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 1.0.2
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ~>
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.7'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ~>
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.7'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '10.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ~>
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '10.0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ~>
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 3.1.0
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ~>
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 3.1.0
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: pry-byebug
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ~>
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 0.10.1
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ~>
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 0.10.1
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: vcr
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ~>
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 2.9.3
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ~>
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 2.9.3
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: webmock
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ~>
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: 1.20.2
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ~>
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: 1.20.2
|
125
|
+
description: Facilitate the use of the yelp API.
|
126
|
+
email:
|
127
|
+
- lili.serfaty@gmail.com
|
128
|
+
executables: []
|
129
|
+
extensions: []
|
130
|
+
extra_rdoc_files: []
|
131
|
+
files:
|
132
|
+
- .gitignore
|
133
|
+
- Gemfile
|
134
|
+
- LICENSE.txt
|
135
|
+
- README.md
|
136
|
+
- Rakefile
|
137
|
+
- lib/yelpify.rb
|
138
|
+
- lib/yelpify/authorization.rb
|
139
|
+
- lib/yelpify/business.rb
|
140
|
+
- lib/yelpify/client.rb
|
141
|
+
- lib/yelpify/errors/invalid_credentials.rb
|
142
|
+
- lib/yelpify/search.rb
|
143
|
+
- lib/yelpify/utils.rb
|
144
|
+
- lib/yelpify/version.rb
|
145
|
+
- rspec.rake
|
146
|
+
- spec/fixtures/vcr_cassettes/business.yml
|
147
|
+
- spec/fixtures/vcr_cassettes/search.yml
|
148
|
+
- spec/spec_helper.rb
|
149
|
+
- spec/yelpify/authorization_spec.rb
|
150
|
+
- spec/yelpify/business_spec.rb
|
151
|
+
- spec/yelpify/client_spec.rb
|
152
|
+
- spec/yelpify/search_spec.rb
|
153
|
+
- spec/yelpify/utils_spec.rb
|
154
|
+
- yelpify.gemspec
|
155
|
+
homepage: ''
|
156
|
+
licenses:
|
157
|
+
- MIT
|
158
|
+
metadata: {}
|
159
|
+
post_install_message:
|
160
|
+
rdoc_options: []
|
161
|
+
require_paths:
|
162
|
+
- lib
|
163
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
164
|
+
requirements:
|
165
|
+
- - '>='
|
166
|
+
- !ruby/object:Gem::Version
|
167
|
+
version: '0'
|
168
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
169
|
+
requirements:
|
170
|
+
- - '>='
|
171
|
+
- !ruby/object:Gem::Version
|
172
|
+
version: '0'
|
173
|
+
requirements: []
|
174
|
+
rubyforge_project:
|
175
|
+
rubygems_version: 2.0.14
|
176
|
+
signing_key:
|
177
|
+
specification_version: 4
|
178
|
+
summary: Facilitate the use of the yelp API.
|
179
|
+
test_files:
|
180
|
+
- spec/fixtures/vcr_cassettes/business.yml
|
181
|
+
- spec/fixtures/vcr_cassettes/search.yml
|
182
|
+
- spec/spec_helper.rb
|
183
|
+
- spec/yelpify/authorization_spec.rb
|
184
|
+
- spec/yelpify/business_spec.rb
|
185
|
+
- spec/yelpify/client_spec.rb
|
186
|
+
- spec/yelpify/search_spec.rb
|
187
|
+
- spec/yelpify/utils_spec.rb
|