Class: Untappd::Brewery

Inherits:
Base
  • Object
show all
Defined in:
lib/untappd/brewery.rb

Class Method Summary collapse

Methods inherited from Base

auth_options, response_to_mash

Class Method Details

.feed(brewery_id, options = {}) ⇒ Object

options:

  • min_id (int, optional) - The numeric ID of the most recent check-in. New results

will only be shown if there are checkins before this ID

  • max_id (int, optional) - The checkin ID that you want the results to start with

  • limit (int, optional) - The number of results to return, max of 50, default is 25



8
9
10
11
# File 'lib/untappd/brewery.rb', line 8

def self.feed(brewery_id, options={})
  options.merge!(auth_options)
  response_to_mash get("/brewery/checkins/#{brewery_id}", :query => options)
end

.info(brewery_id) ⇒ Object



13
14
15
# File 'lib/untappd/brewery.rb', line 13

def self.info(brewery_id)
  response_to_mash get("/brewery/info/#{brewery_id}", :query => auth_options)
end

.search(q) ⇒ Object



17
18
19
20
21
# File 'lib/untappd/brewery.rb', line 17

def self.search(q)
  options = { :q => q }
  options.merge!(auth_options)
  response_to_mash get("/search/brewery", :query => options)
end