szymondukla / holiday-api-wrapper
Holiday API is the only service offering it's powerful data completely free of charge.
1.2.0
2021-01-04 13:12 UTC
Requires
- php: ^7.0
- guzzlehttp/guzzle: >5.0
This package is auto-updated.
Last update: 2024-09-04 20:47:41 UTC
README
API Version: 1.1
Documentation https://getfestivo.com/documentation
Table of contents
- Obtaining an API Key
- Supported countries
- Endpoints
- Parameters
- Installation Instructions
- File Tree
- Opening an Issue
API Key
As of 27th of May 2019 we require all users to sign up and generate their API key. We offer a spectrum of different subscription plans, including our Developer plan. Please check your account for more information.
Countries
Full list of countries is available at getfestivo.com.
Endpoints
Currently, only two endpoints are supported:
/v2/holidays
- access holiday data
Parameters
You can filter returned holidays by date and upcoming or past events:
Full list of parameters is available in our Documentation
Installation Instructions
- Download and install package from Composer via
composer require szymondukla/holiday-api-wrapper:"^1.2"
. You can also download an archive and setup it manually usingcomposer install
command. - Include main class into your project and add required
use
declaration, i.e.
<?php use SzymonDukla\HolidayApi\HolidayApi; require_once( __DIR__ . /HolidayApi.php); ...
- Initiate the library with
$handle = new HolidayApi('YOUR API KEY')->makeClient();
- Replace
YOUR API KEY
with API Key generated as per instructions - From now on you can use $handle to access holiday information for a given country using
$handle->getHolidays('PL')
. To return only holidays matching specific conditions, you can pass them as parameters:
YYYY MM DD
$holidays = $handle->getHolidays('US', 2021, 12, 06)
File Tree
holidayapi-wrapper
├── .gitignore
├── README.md
├── HolidayApi.php
└── composer.json
Opening an Issue
Before opening an issue there are a couple of considerations:
- If you did not star this repo We will close the issue immediately without consideration.
- Read the instructions and make sure all steps were followed correctly.
- Check that the issue is not specific to the development environment setup.
- Provide duplication steps.
- Attempt to look into the issue, and if you have a solution, make a pull request.
- Show that you have made an attempt to look into the issue.
- Check to see if the issue you are reporting is a duplicate of a previous reported issue.
- Follow these instructions and show us that you have tried.
- If you have a questions or comments don't hesitate to give us a shout!