Skip to content

Brewry is a gem that lets you communicate with the BreweryDB API.

Notifications You must be signed in to change notification settings

DanielOchoa/brewry

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Brewry

<img src=“https://travis-ci.org/DanyHunter/brewry.svg?branch=master” alt=“Build Status” />

Brewry gives you an API interface to talk to BreweryDB.

  • It retuns everything as a hash so you can just pass it to ActiveRecord

  • It recursively changes the hash to change the ‘id’ keys into ‘guid’ so it doesn’t interfere with your own ActiveRecord Ids. Changing it to whatever you want is on the works.

  • Thanks to metaprogramming we can query any api endpoint for BreweryDB. See examples below.

  • www.brewerydb.com/

Configuration

For Rails:

Create an initializer in config/initializers/brewry.rb

Brewry.configure do |config|
  config.api_key = 'some api key'
end

Examples

Fetch some beers with the name argument:

Brewry.search_beers(name: 'Corona Light')

Fetch some styles without arguments - this will return all beer styles:

Brewry.search_styles

Releases

0.0.1

  • Initialize project

TODO

  • Change class so it can be instantiated.

  • Add tests

  • Allow changing of breweryDB id’s into whatever the user needs.

About

Brewry is a gem that lets you communicate with the BreweryDB API.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages