Coder Social home page Coder Social logo

beer-advocate-api's Introduction

Beer Advocate API

Bitdeli Badge

Unofficial library for working with Beer Advocate data.

Installation

via NPM

$ npm install beer-advocate-api --save-dev

Example

var ba = require('beer-advocate-api');

// Search for a beer
// http://beeradvocate.com/search/?q=Anchor+Steam&qt=beer
ba.beerSearch("Anchor Steam", function(beers) {

    console.log(beers);

});

// Get a specific beer page
// http://beeradvocate.com/beer/profile/29223/84343/
ba.beerPage("/beer/profile/29223/84343/", function(beer) {

    console.log(beer);

});

// Get a specific beer's reviews from top reviewers
// http://beeradvocate.com/beer/profile/29223/84343/?view=beer&sort=topr&start=0
ba.beerTopReviews("/beer/profile/29223/84343/", 1, function(reviews) {

    console.log(reviews);

});

Output

// Search for a beer
[ { beer_name: 'Anchor Steam Beer',
    beer_url: '/beer/profile/28/63/',
    brewery_name: 'Anchor Brewing Company',
    brewery_location: 'San Francisco, California',
    brewery_url: '/beer/profile/28/',
    retired: false },
  { beer_name: 'Drop Anchor Steam Beer',
    beer_url: '/beer/profile/952/9899/',
    brewery_name: 'Great Dane Pub & Brewing Company (Downtown)',
    brewery_location: 'Madison, Wisconsin',
    brewery_url: '/beer/profile/952/',
    retired: true } ]

// Get a specific beer page
[ { beer_name: 'Day Tripper',
    beer_style: 'American Pale Ale (APA)',
    beer_abv: '5.40%',
    brewery_name: 'Indeed Brewing Company',
    brewery_state: 'Minnesota',
    brewery_country: 'United States',
    ba_score: '90',
    ba_rating: 'outstanding',
    bros_score: 'N/A',
    bros_rating: '',
    ratings: '264',
    reviews: '65',
    rAvg: '4.04',
    pDev: '10.4%' } ]
	
// Get a specific beer's reviews from top reviewers
[{
    reviewer: 'Sammy',
    reviewer_url: '/community/members/sammy.3853/',
    rating: '3.95',
    rating_max: '5',
    attributes: {
        look: '4',
        smell: '4',
        taste: '4',
        feel: '3.5',
        overall: '4'
    },
    review_text: 'Very fresh and good can obtained by John. Citrus hop aroma, 
				yet well tamed. Cloudy orange and lacey. A big IBU and yet a 
				very good ornage, tangerine, grapefruit taste and drinkability. 
				A good examle of a pale that used tobe called an IPA(if not a 
				DIPA by some) .Recommended.',
    serving_type: 'can',
    date: '11-28-2012 04:40:39'
}]

License

Beer Advocate API is licensed MIT


Copyright (c) 2014 Charlie Hield

beer-advocate-api's People

Contributors

kevlened 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.