untappd 4.0.1 → 4.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/lib/untappd/venue.rb +6 -0
- data/lib/untappd/version.rb +1 -1
- data/spec/vcr/Venue/gets_foursquare_lookup.yml +48 -0
- data/spec/venue_spec.rb +8 -3
- metadata +7 -5
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -39,6 +39,7 @@ the API documentation.
|
|
39
39
|
**Venue Object**
|
40
40
|
* Venue Feed - Untappd::Venue.feed(venue_id, options={})
|
41
41
|
* Venue Info - Untappd::Venue.info(venue_id)
|
42
|
+
* Foursquare Venue Lookup - Untappd::Venue.foursquare_lookup(foursquare_id)
|
42
43
|
|
43
44
|
**Brewery Object**
|
44
45
|
* Brewery Checkins - Untappd::Brewery.feed(brewery_id, options={})
|
@@ -62,7 +63,6 @@ the API documentation.
|
|
62
63
|
* Remove Friends - /v4/friend/remove/TARGET_ID
|
63
64
|
* Request Friends - /v4/friend/request/TARGET_ID
|
64
65
|
* Notifications - /v4/notifications
|
65
|
-
* Foursquare Venue Lookup - /v4/venue/foursquare_lookup/VENUE_ID
|
66
66
|
|
67
67
|
## Examples
|
68
68
|
|
data/lib/untappd/venue.rb
CHANGED
@@ -13,5 +13,11 @@ module Untappd
|
|
13
13
|
def self.info(venue_id)
|
14
14
|
response_to_mash get("/venue/info/#{venue_id}", :query => auth_options)
|
15
15
|
end
|
16
|
+
|
17
|
+
def self.foursquare_lookup(foursquare_id)
|
18
|
+
response_to_mash(
|
19
|
+
get("/venue/foursquare_lookup/#{foursquare_id}", :query => auth_options)
|
20
|
+
)
|
21
|
+
end
|
16
22
|
end
|
17
23
|
end
|
data/lib/untappd/version.rb
CHANGED
@@ -0,0 +1,48 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://api.untappd.com/v4/venue/foursquare_lookup/4ccf5fec1ac7a1cd6a5c1392?client_id=<UNTAPPD_CLIENT_ID>&client_secret=<UNTAPPD_CLIENT_SECRET>
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers: {}
|
10
|
+
response:
|
11
|
+
status:
|
12
|
+
code: 200
|
13
|
+
message: OK
|
14
|
+
headers:
|
15
|
+
x-api-version:
|
16
|
+
- '4'
|
17
|
+
server:
|
18
|
+
- Apache/2.2.22 (Ubuntu)
|
19
|
+
vary:
|
20
|
+
- Accept-Encoding
|
21
|
+
content-type:
|
22
|
+
- application/json
|
23
|
+
date:
|
24
|
+
- Tue, 15 Apr 2014 18:35:38 GMT
|
25
|
+
x-ratelimit-limit:
|
26
|
+
- '100'
|
27
|
+
keep-alive:
|
28
|
+
- timeout=5, max=99
|
29
|
+
x-auth-type:
|
30
|
+
- key
|
31
|
+
access-control-allow-origin:
|
32
|
+
- '*'
|
33
|
+
connection:
|
34
|
+
- close
|
35
|
+
x-powered-by:
|
36
|
+
- PHP/5.4.6-1ubuntu1.4
|
37
|
+
x-ratelimit-remaining:
|
38
|
+
- '99'
|
39
|
+
content-length:
|
40
|
+
- '324'
|
41
|
+
body:
|
42
|
+
encoding: UTF-8
|
43
|
+
string: '{"meta":{"code":200,"response_time":{"time":0.012,"measure":"seconds"},"init_time":{"time":0.011,"measure":"seconds"}},"notifications":[],"response":{"venue":{"count":1,"items":[{"venue_name":"Untappd
|
44
|
+
HQ - East","venue_id":1222,"foursquare_id":"4ccf5fec1ac7a1cd6a5c1392","last_updated":"Fri,
|
45
|
+
11 Apr 2014 17:41:14 +0000"}]}}}'
|
46
|
+
http_version: '1.1'
|
47
|
+
recorded_at: Tue, 15 Apr 2014 18:35:47 GMT
|
48
|
+
recorded_with: VCR 2.4.0
|
data/spec/venue_spec.rb
CHANGED
@@ -6,14 +6,19 @@ describe "Venue" do
|
|
6
6
|
end
|
7
7
|
|
8
8
|
it "gets the feed", :vcr do
|
9
|
-
feed = Untappd::Venue.feed(18099)
|
9
|
+
feed = Untappd::Venue.feed(18099)
|
10
10
|
feed.checkins.items.first.beer.beer_name.should == "Pale Ale"
|
11
11
|
feed.checkins.items.first.brewery.brewery_name.should == "Sierra Nevada Brewing Co."
|
12
12
|
end
|
13
13
|
|
14
14
|
it "gets info", :vcr do
|
15
|
-
info = Untappd::Venue.info(18099)
|
15
|
+
info = Untappd::Venue.info(18099)
|
16
16
|
info.venue.venue_name.should == "Mo's Diner"
|
17
17
|
end
|
18
|
-
|
18
|
+
|
19
|
+
it "gets foursquare lookup", :vcr do
|
20
|
+
foursquare = Untappd::Venue.foursquare_lookup('4ccf5fec1ac7a1cd6a5c1392')
|
21
|
+
foursquare.venue.items.first.venue_name.should == "Untappd HQ - East"
|
22
|
+
end
|
23
|
+
|
19
24
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: untappd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2014-04-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httparty
|
@@ -145,6 +145,7 @@ files:
|
|
145
145
|
- spec/vcr/User/get_friends.yml
|
146
146
|
- spec/vcr/User/get_info.yml
|
147
147
|
- spec/vcr/User/get_wish_list.yml
|
148
|
+
- spec/vcr/Venue/gets_foursquare_lookup.yml
|
148
149
|
- spec/vcr/Venue/gets_info.yml
|
149
150
|
- spec/vcr/Venue/gets_the_feed.yml
|
150
151
|
- spec/venue_spec.rb
|
@@ -163,7 +164,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
163
164
|
version: '0'
|
164
165
|
segments:
|
165
166
|
- 0
|
166
|
-
hash: -
|
167
|
+
hash: -3455726710526196103
|
167
168
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
168
169
|
none: false
|
169
170
|
requirements:
|
@@ -172,10 +173,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
172
173
|
version: '0'
|
173
174
|
segments:
|
174
175
|
- 0
|
175
|
-
hash: -
|
176
|
+
hash: -3455726710526196103
|
176
177
|
requirements: []
|
177
178
|
rubyforge_project: untappd
|
178
|
-
rubygems_version: 1.8.23
|
179
|
+
rubygems_version: 1.8.23.2
|
179
180
|
signing_key:
|
180
181
|
specification_version: 3
|
181
182
|
summary: Wrapper around the untappd.com API
|
@@ -209,6 +210,7 @@ test_files:
|
|
209
210
|
- spec/vcr/User/get_friends.yml
|
210
211
|
- spec/vcr/User/get_info.yml
|
211
212
|
- spec/vcr/User/get_wish_list.yml
|
213
|
+
- spec/vcr/Venue/gets_foursquare_lookup.yml
|
212
214
|
- spec/vcr/Venue/gets_info.yml
|
213
215
|
- spec/vcr/Venue/gets_the_feed.yml
|
214
216
|
- spec/venue_spec.rb
|