Project

Brewry

0.0
No commit activity in last 3 years
No release in over 3 years
Brewry provides an interface to the BreweryDB API. Instead of returning a struct or some other Brewry instance, it returns a hash that can quickly be inserted into ActiveRecord. It also allows you to replace the keys for certain results such as key so you can keep track of them with your own id's.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 3.0
~> 2.9
~> 1.18

Runtime

~> 0.13
 Project Readme

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.