@repetere/node-holidayapi

2.0.0 • Public • Published

node-holidayapi

Coverage Status Build Status

Node.js library for Holiday API

Installation

npm install --save @repetere/node-holidayapi

Usage

const HolidayAPI = require('node-holidayapi');
const hapi = new HolidayAPI('_YOUR_API_KEY_').v1;

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

hapi.holidays(parameters)
  .then(data=>{
    // Insert awesome code here...
  })
  .catch(error=>{
    //handle errors
  });

Development

Make sure you have grunt installed

$ npm i -g grunt-cli jsdoc-to-markdown

For generating documentation

$ grunt doc
$ jsdoc2md index.js  > docs/api.md

Testing

$ npm i
$ grunt test

Contributing

Fork, write tests and create a pull request!

Notes

Check out https://github.com/repetere/node-holidayapi/blob/master/docs/api.md for the full node holiday api Documentation

Package Sidebar

Install

npm i @repetere/node-holidayapi

Weekly Downloads

2

Version

2.0.0

License

MIT

Unpacked Size

1.05 MB

Total Files

39

Last publish

Collaborators

  • dcrescim
  • janbialostok
  • repetere_user
  • yawetse