mirror of
https://github.com/holidayapi/holidayapi-node.git
synced 2025-06-21 12:36:33 +00:00
Spruced up readme, bumped version
This commit is contained in:
parent
221e1303be
commit
9b9d800ef4
2 changed files with 32 additions and 1 deletions
31
README.md
31
README.md
|
@ -1,2 +1,33 @@
|
|||
# node-holidayapi
|
||||
Official Node.js library for [Holiday API](https://holidayapi.com)
|
||||
|
||||
## Installation
|
||||
|
||||
```shell
|
||||
npm install --save node-holidayapi
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```javascript
|
||||
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...
|
||||
});
|
||||
```
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue