binwise

0.1.11 • Public • Published

binwise

Build Status NPM version

Simple BinWise API wrapper.

Installation

$ npm install binwise

Usage

var BinWise = require('binwise');
var binwise = new BinWise(APP_ID, [options]);

binwise.getRestaurants({ pageSize: 100 }, function (err, data, raw) {
  if (err) return console.error(err);
  console.log(data);
});

binwise.getPublishedLists('abcd123', function (err, data, raw) {
  if (err) return console.error(err);
  console.log(data);
});

binwise.getWineList('abcd123', function (err, data, raw) {
  if (err) return console.error(err);
  console.log(data);
});

// err => Error object
// data => formated return data
// raw => unformated raw data from BinWise

API

BinWise(appId, [options])

appId and authToken are required.

Options are:

  • host: Api host.

getRestaurants([options], fn)

Returns the list of restaurants that you have access to and their IDs.

getPublishedLists(restaurantId, fn)

Returns a list of wine lists published for a specific restaurants.

getWineList(listId, fn)

Returns the data for a particular wine list for a particular restaurant.

Run tests

$ npm install
$ make test

License

(The MIT License)

Copyright (c) 2016 Jonathan Brumley <cayasso@gmail.com>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.1.110latest

Version History

VersionDownloads (Last 7 Days)Published
0.1.110
0.1.100
0.1.90
0.1.80
0.1.70
0.1.60
0.1.50
0.1.40
0.1.30
0.1.20

Package Sidebar

Install

npm i binwise

Weekly Downloads

0

Version

0.1.11

License

MIT

Last publish

Collaborators

  • cayasso