Git Product home page Git Product logo

beeradvocate-api's Introduction

Beeradvocate API

Unofficial JavaScript library for working with Beer Advocate data. This was originally forked from the unmaintained Beer Advocate API JavaScript library by Charlie Hield.

Getting started

Beeradvocate API can be installed via NPM. Make sure you’re in your projects directory, and run the following:

$ npm install beeradvocate-api

Including the library

Next, make sure to include Beeradvocate API in your project.

var ba = require('beeradvocate-api');

Documentation

Beers

Search

Search for a beer

ba.beerSearch("Buffalo Sweat", function(beers) {
    console.log(beers);
});

Output

[
  {
    "beer_name": "Tallgrass Buffalo Sweat",
    "beer_url": "\/beer\/profile\/16333\/54413\/",
    "brewery_name": "Tallgrass Brewing Company",
    "brewery_location": "Manhattan, Kansas",
    "brewery_url": "\/beer\/profile\/16333\/",
    "retired": false
  },
  {
    "beer_name": "Tallgrass Vanilla Bean Buffalo Sweat",
    "beer_url": "\/beer\/profile\/16333\/88933\/",
    "brewery_name": "Tallgrass Brewing Company",
    "brewery_location": "Manhattan, Kansas",
    "brewery_url": "\/beer\/profile\/16333\/",
    "retired": false
  },
  {
    "beer_name": "Bourbon Barrel Buffalo Sweat",
    "beer_url": "\/beer\/profile\/16333\/179467\/",
    "brewery_name": "Tallgrass Brewing Company",
    "brewery_location": "Manhattan, Kansas",
    "brewery_url": "\/beer\/profile\/16333\/",
    "retired": false
  }
]

Beer page

Get a specific beer page

ba.beerPage("/beer/profile/16333/54413/", function(beer) {
    console.log(beer);
});

Output

[
  {
    "beer_name":"Tallgrass Buffalo Sweat",
    "beer_style":"Milk / Sweet Stout",
    "beer_abv":"5.00%",
    "brewery_name":"Tallgrass Brewing Company",
    "brewery_state":"Kansas",
    "brewery_country":"United States",
    "ba_score":"86",
    "ba_rating":"very good",
    "bros_score":"91",
    "bros_rating":"outstanding",
    "ratings":"1,389",
    "reviews":"366",
    "avg":"3.83",
    "pDev":"11.49%"
  }
]

Acknowledgements

Beeradvocate API is not associated with beeradvocate.com. Their website is a great resource for all of us, to show thanks you should subscribe to their awesome magazine.

Beeradvocate API was originally forked from Beer Advocate API by Charlie Hield.

beeradvocate-api's People

Contributors

billism1 avatar brycejohnston avatar stursby avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.