Class: Untappd::Beer
Class Method Summary collapse
-
.feed(beer_id, options = {}) ⇒ Object
options: * min_id (int, optional) - The numeric ID of the most recent check-in.
- .info(beer_id, options = {}) ⇒ Object
-
.search(q, options = {}) ⇒ Object
options: * sort (optional): “count” or “name” (default) - This can let you choose if you want the results to be returned in Alphabetical order (name) or by checkin count (count).
- .trending ⇒ Object
Methods inherited from Base
auth_options, response_to_mash
Class Method Details
.feed(beer_id, options = {}) ⇒ Object
options:
-
min_id (int, optional) - The numeric ID of the most recent check-in. This is provided to
you in the next_query attribute.
-
max_id (int, optional) - The checkin ID that you want the results to start with
-
limit (int, optional) - The number of results to return, maximum of 50, default is 25
8 9 10 11 |
# File 'lib/untappd/beer.rb', line 8 def self.feed(beer_id, ={}) .merge!() response = response_to_mash get("/beer/checkins/#{beer_id}", :query => ) end |
.info(beer_id, options = {}) ⇒ Object
13 14 15 16 |
# File 'lib/untappd/beer.rb', line 13 def self.info(beer_id, ={}) .merge!() response_to_mash get("/beer/info/#{beer_id}", :query => ) end |
.search(q, options = {}) ⇒ Object
options:
-
sort (optional): “count” or “name” (default) - This can let you choose if you want the
results to be returned in Alphabetical order (name) or by checkin count (count). By default the search returns all values in Alphabetical order.
22 23 24 25 26 |
# File 'lib/untappd/beer.rb', line 22 def self.search(q, ={}) .merge!() .merge!({ :q => q }) response_to_mash get("/search/beer/", :query => ) end |
.trending ⇒ Object
28 29 30 |
# File 'lib/untappd/beer.rb', line 28 def self.trending response_to_mash get("/beer/trending", :query => ) end |