Updated readme
This commit is contained in:
parent
75f94aaf53
commit
5bc5cd1322
1 changed files with 28 additions and 0 deletions
28
README.md
28
README.md
|
@ -1,2 +1,30 @@
|
||||||
# php-holidayapi
|
# php-holidayapi
|
||||||
Official PHP library for [Holiday API](https://holidayapi.com)
|
Official PHP library for [Holiday API](https://holidayapi.com)
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
```shell
|
||||||
|
composer require "joshtronic/php-holidayapi:dev-master"
|
||||||
|
```
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
```php
|
||||||
|
$hapi = new HolidayAPI\v1('_YOUR_API_KEY_');
|
||||||
|
|
||||||
|
$parameters = array(
|
||||||
|
// Required
|
||||||
|
'country' => 'US',
|
||||||
|
'year' => 2016,
|
||||||
|
// Optional
|
||||||
|
// 'month' => 7,
|
||||||
|
// 'day' => 4,
|
||||||
|
// 'previous' => true,
|
||||||
|
// 'upcoming' => true,
|
||||||
|
// 'public' => true,
|
||||||
|
// 'pretty' => true,
|
||||||
|
);
|
||||||
|
|
||||||
|
$response = $hapi->holidays($parameters);
|
||||||
|
```
|
||||||
|
|
||||||
|
|
Reference in a new issue