mirror of
https://github.com/holidayapi/holidayapi-node.git
synced 2025-06-21 04:26: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
|
# node-holidayapi
|
||||||
Official Node.js library for [Holiday API](https://holidayapi.com)
|
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...
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "node-holidayapi",
|
"name": "node-holidayapi",
|
||||||
"version": "0.0.0",
|
"version": "1.0.0",
|
||||||
"description": "Official Node.js library for Holiday API",
|
"description": "Official Node.js library for Holiday API",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue