diff --git a/README.md b/README.md index 74fd35d..2d84d30 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Php-Holiday-API -An API for php holiday date based in `Google Calendar API` +An API for php holiday date based on `Google Calendar API` composer require san103/php-holiday-api @@ -17,13 +17,52 @@ composer install composer require guzzlehttp/guzzle:^7.0 ``` -#Basic Usage -

Api Key

+# Basic Usage > [!NOTE] > You can provide your own Api key from [Google API](https://developers.google.com/calendar/api/guides/overview). > just enable the Calendar Api and generate key ``` -After Installing the prerequisite +namespace San103/SampleApp + +use San103\Phpholidayapi\HolidayClient; +``` + +``` +$holiday = new HolidayClient(); +``` + +- [ ] Set your Country Code e.g uk for United Kindom, us for United State `default sets to Philippines` +``` +countryCode('uk') +``` + +- [ ] Set Year you want to display the holiday dates , `default is set to current year which is 2023` +``` +year('2022') ``` + +> [!CAUTION] +> > The `result()` must define in last chain. +``` +result(); +``` + +- [x] Code +``` +use San103\Phpholidayapi\HolidayClient; + +public function index(){ + + $api = new HolidayClient(); + return $api + ->countryCode('uk') + ->year('2022') + ->result(); + + } +``` + +> [!IMPORTANT] +> This return json code Thank You!