Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
San103 committed Dec 7, 2023
2 parents ff1fdd4 + 935773f commit a05267a
Showing 1 changed file with 43 additions and 4 deletions.
47 changes: 43 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -17,13 +17,52 @@ composer install
composer require guzzlehttp/guzzle:^7.0
```

#Basic Usage
<h3>Api Key</h3>
# 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!

0 comments on commit a05267a

Please sign in to comment.