Skip to content

Commit

Permalink
docs: improve syntax highlighting of code snippets
Browse files Browse the repository at this point in the history
* Seems PHP snippets require the delimiter to function properly.
* Updated a bunch of dependencies.
  • Loading branch information
joshtronic committed May 17, 2020
1 parent 12f1ea6 commit 3ab9ffd
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ composer require holidayapi/holidayapi-php
## Usage

```php
<?php
$key = 'Insert your API key here';
$holiday_api = new \HolidayAPI\Client(['key' => $key]);

Expand Down Expand Up @@ -64,12 +65,14 @@ try {
#### Fetch all supported countries

```php
<?php
$holiday_api->countries();
```

#### Fetch only countries with public holidays

```php
<?php
$holiday_api->countries([
'public' => true,
]);
Expand All @@ -78,6 +81,7 @@ $holiday_api->countries([
#### Fetch a supported country by code

```php
<?php
$holiday_api->countries([
'country' => 'NO',
]);
Expand All @@ -86,6 +90,7 @@ $holiday_api->countries([
#### Search for countries by code or name

```php
<?php
$holiday_api->countries([
'search' => 'united',
]);
Expand All @@ -96,12 +101,14 @@ $holiday_api->countries([
#### Fetch all supported languages

```php
<?php
$holiday_api->languages();
```

#### Fetch a supported language by code

```php
<?php
$holiday_api->languages([
'language' => 'es',
]);
Expand All @@ -110,6 +117,7 @@ $holiday_api->languages([
#### Search for languages by code or name

```php
<?php
$holiday_api->languages([
'search' => 'Chinese',
]);
Expand All @@ -120,6 +128,7 @@ $holiday_api->languages([
#### Fetch holidays for a specific year

```php
<?php
$holiday_api->holidays([
'country' => 'US',
'year' => 2019,
Expand All @@ -129,6 +138,7 @@ $holiday_api->holidays([
#### Fetch holidays for a specific month

```php
<?php
$holiday_api->holidays([
'country' => 'US',
'year' => 2019,
Expand All @@ -139,6 +149,7 @@ $holiday_api->holidays([
#### Fetch holidays for a specific day

```php
<?php
$holiday_api->holidays([
'country' => 'US',
'year' => 2019,
Expand All @@ -150,6 +161,7 @@ $holiday_api->holidays([
#### Fetch upcoming holidays based on a specific date

```php
<?php
$holiday_api->holidays([
'country' => 'US',
'year' => 2019,
Expand All @@ -162,6 +174,7 @@ $holiday_api->holidays([
#### Fetch previous holidays based on a specific date

```php
<?php
$holiday_api->holidays([
'country' => 'US',
'year' => 2019,
Expand All @@ -174,6 +187,7 @@ $holiday_api->holidays([
#### Fetch only public holidays

```php
<?php
$holiday_api->holidays([
'country' => 'US',
'year' => 2019,
Expand All @@ -184,6 +198,7 @@ $holiday_api->holidays([
#### Fetch holidays for a specific subdivision

```php
<?php
$holiday_api->holidays([
'country' => 'GB-ENG',
'year' => 2019,
Expand All @@ -193,6 +208,7 @@ $holiday_api->holidays([
#### Include subdivision holidays with countrywide holidays

```php
<?php
$holiday_api->holidays([
'country' => 'US',
'year' => 2019,
Expand All @@ -203,6 +219,7 @@ $holiday_api->holidays([
#### Search for a holiday by name

```php
<?php
$holiday_api->holidays([
'country' => 'US',
'year' => 2019,
Expand All @@ -213,6 +230,7 @@ $holiday_api->holidays([
#### Translate holidays to another language

```php
<?php
$holiday_api->holidays([
'country' => 'US',
'year' => 2019,
Expand All @@ -223,6 +241,7 @@ $holiday_api->holidays([
#### Fetch holidays for multiple countries

```php
<?php
$holiday_api->holidays([
'country' => 'US,GB,NZ',
'year' => 2019,
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "holidayapi/holidayapi-php",
"description": "Official PHP library for Holiday API",
"version": "2.2.1",
"version": "2.2.2",
"type": "library",
"keywords": [
"calendar",
Expand Down

0 comments on commit 3ab9ffd

Please sign in to comment.