BrewDog is a brewery, started in 2005 in Aberdeen, Scotland, who now operates dozens of beer bars around the world. They recently broke into the U.S. market with a brewery in my hometown of Columbus, Ohio. They produce great beers and make the recipes for past brews available through the DIY Dog website.
Their API is accessible via HTTPS and is CORS-enabled, meaning it will work for client-side requests with JS.
By itself the API is straightforward. There are 3 endpoints
- returning a specific beer, a list of beers based on filter options and a random beer. It would be relatively easy to implement the API in most apps.
bower component or regular JS library. This should be flexible enough for nearly any implementation from vanilla JS to Webpack and Node.
There are 3 ways to install it.
Clone the repo from Github into your project
Once the wrapper is installed it can be implemented as a library (by adding the
Once installed there are 3 methods available to retrieve beers:
All 3 return a Promise so a callback function can be called.
Here's a quick example:
More info and examples available on the README.