holidayapi-node/README.md
2016-08-20 13:46:16 -05:00

563 B

node-holidayapi

Official Node.js library for Holiday API

Installation

npm install --save node-holidayapi

Usage

var hapi = require('node-holidayapi');
var Hapi = new HolidayAPI('_YOUR_API_KEY').v1;

var parameters = {
  // Required
  country: 'US',
  year:    2016,
  // Optional
  // month:    7,
  // day:      4,
  // previous  true,
  // upcoming  true,
  // public:   true,
  // pretty:   true,
};

var Hapi.holidays(parameters, function (err, data) {
  // Insert awesome code here...
});