Skip to content
This repository has been archived by the owner on Sep 20, 2019. It is now read-only.

joshtronic/node-holidayapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The NPM package has also been renamed from node-holidayapi to simply holidayapi

This repository has been archived.


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...
});