Skip to content

Commit

Permalink
added event, feature, fluidsize, guild, heartbeat, ingredient, locati…
Browse files Browse the repository at this point in the history
…on, and socialsite endpoints
  • Loading branch information
benwoody committed Jun 20, 2012
1 parent ed4b21c commit 9a071cc
Showing 1 changed file with 75 additions and 0 deletions.
75 changes: 75 additions & 0 deletions lib/brewerydb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,81 @@ def self.fluidsize(id, options={})
Hashie::Mash.new(response)['data'] if response.code == 200
end

def self.guilds(options={})
options.merge!({
:key => apikey
})

response = get("/guilds", :query => options)
Hashie::Mash.new(response)['data'] if response.code == 200
end


def self.guild(id, options={})
options.merge!({
:key => apikey
})

response = get("/guild/#{id}", :query => options)
Hashie::Mash.new(response)['data'] if response.code == 200
end

def self.ingredients(options={})
options.merge!({
:key => apikey
})

response = get("/ingredients", :query => options)
Hashie::Mash.new(response)['data'] if response.code == 200
end


def self.ingredient(id, options={})
options.merge!({
:key => apikey
})

response = get("/ingredient/#{id}", :query => options)
Hashie::Mash.new(response)['data'] if response.code == 200
end

def self.locations(options={})
options.merge!({
:key => apikey
})

response = get("/locations", :query => options)
Hashie::Mash.new(response)['data'] if response.code == 200
end


def self.location(id, options={})
options.merge!({
:key => apikey
})

response = get("/location/#{id}", :query => options)
Hashie::Mash.new(response)['data'] if response.code == 200
end

def self.socialsites(options={})
options.merge!({
:key => apikey
})

response = get("/socialsites", :query => options)
Hashie::Mash.new(response)['data'] if response.code == 200
end


def self.socialsite(id, options={})
options.merge!({
:key => apikey
})

response = get("/socialsite/#{id}", :query => options)
Hashie::Mash.new(response)['data'] if response.code == 200
end

def self.apikey
@@apikey
Expand Down

0 comments on commit 9a071cc

Please sign in to comment.