Node BreweryDB wrapper
This is a node package (WIP) wrapper for the http://www.brewerydb.com/ service API.
Setup
Install the library.
npm instal https://github.com/DanielOchoa/node-brewery-db
Import the library.
var BreweryDb = ;
Create a new instance by passing an object with the apiKey
.
var client = apiKey: yourApiKey;
How to use
You can access the restful resources from BreweryDB as follows:
For Beers
For the beers endpoint, just call the beers
method and pass in any extra
parameters from the BreweryDB docs.
For example, to get a beer by name:
client;
Or with promises:
return client;
To get a single beer, you need to pass the beer id as follows:
client;
You can also get nested resources for any given resource that allows it, see the BreweryDB docs. For example, beers take a nested resource:
client;
You can also access any other nested resource for a beer, such as adjunt, event and fermentable.
TODO
So far we can access beer/beers, nested resources for beer, styles and brewery/breweries. Work needs to be done to access other resources.