Official Node.js library for Holiday API https://holidayapi.com
Find a file
Yaw Etse b6ad36a075 allow for the key to be passed as a parameter
this will also use the property `key` on the prototype if it's defined.
2019-06-01 13:54:16 -05:00
.gitignore Initial commit 2016-08-08 23:55:29 -05:00
index.js allow for the key to be passed as a parameter 2019-06-01 13:54:16 -05:00
LICENSE Initial commit 2016-08-08 23:55:29 -05:00
package.json Bumped version 2016-08-30 23:56:39 -05:00
README.md Fixed up README 2016-08-30 23:55:58 -05:00

node-holidayapi

Official Node.js library for Holiday API

Installation

npm install --save node-holidayapi

Usage

var HolidayAPI = 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,
};

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