beermapping-api

1.0.5 • Public • Published

Beer Mapping API

Build Status

A node package for using the beermapping api with json responses.

Install

npm install beermapping-api --save

Use

var bm = require('beermapping-api');
 
bm.loccity(YOUR_API_KEY, CITY_NAME).then(function(response) {
  console.log(response);
})

Functions

The current methods each represent a function in the beermapping api reference.

For more information on the structure of the JSON objects returned, see "Response" section.

locquery(API_KEY, LOCATION)

bm.locquery("API_KEY", "vail").then(function(response) {
  console.log(response);
  // [
  //   {
  //     id: "16225",
  //     name: "Vail Fine Wines",
  //     status: "Beer Store",
  //     ...
  //   },
  //   ...
  // ]
});

loccity(API_KEY, CITY)

bm.loccity("API_KEY", "westerly").then(function(response) {
  console.log(response);
  // [
  //   {
  //     id: "16215",
  //     name: "Grey Sail Brewing",
  //     status: "Brewery",
  //     ...
  //   },
  //   ...
  // ]
});

locstate(API_KEY, STATE)

bm.locstate("API_KEY", "ak").then(function(response) {
  console.log(response);
  // [
  //   {
  //     id: "16387",
  //     name: "49th State Brewery",
  //     status: "Brewpub",
  //     ...
  //   },
  //   ...
  // ]
});

locmap(API_KEY, ID)

bm.locmap("API_KEY", "226").then(function(response) {
  console.log(response);
  // [
  //   {
  //     name: "Brooklyn Brewery",
  //     status: "Brewery",
  //     lat: "40.721733",
  //     lng: "-73.958054",
  //     ...
  //   },
  //   ...
  // ]
});

locscore(API_KEY, ID)

bm.locscore("API_KEY", "226").then(function(response) {
  console.log(response);
  // [
  //   {
  //     overall: "89.1667",
  //     selection: "4.625",
  //     service: "4.25",
  //     atmosphere: "4.5",
  //     ...
  //   },
  //   ...
  // ]
});

locimage(API_KEY, ID)

bm.locimage("API_KEY", "226").then(function(response) {
  console.log(response);
  // [
  //   {
  //     imageid: "548",
  //     directurl: "https://beermapping.com/maps/reviews/images.php?img=548",
  //     ...
  //   },
  //   ...
  // ]
});

Readme

Keywords

Package Sidebar

Install

npm i beermapping-api

Weekly Downloads

2

Version

1.0.5

License

ISC

Unpacked Size

9.9 kB

Total Files

6

Last publish

Collaborators

  • pablaber