docs: improve syntax highlighting of code snippets

* Seems PHP snippets require the delimiter to function properly.
* Updated a bunch of dependencies.
This commit is contained in:
Josh Sherman 2020-05-17 14:34:09 -05:00
parent 12f1ea69f8
commit 3ab9ffd19f
No known key found for this signature in database
GPG key ID: 55B058A80530EF22
2 changed files with 20 additions and 1 deletions

View file

@ -35,6 +35,7 @@ composer require holidayapi/holidayapi-php
## Usage ## Usage
```php ```php
<?php
$key = 'Insert your API key here'; $key = 'Insert your API key here';
$holiday_api = new \HolidayAPI\Client(['key' => $key]); $holiday_api = new \HolidayAPI\Client(['key' => $key]);
@ -64,12 +65,14 @@ try {
#### Fetch all supported countries #### Fetch all supported countries
```php ```php
<?php
$holiday_api->countries(); $holiday_api->countries();
``` ```
#### Fetch only countries with public holidays #### Fetch only countries with public holidays
```php ```php
<?php
$holiday_api->countries([ $holiday_api->countries([
'public' => true, 'public' => true,
]); ]);
@ -78,6 +81,7 @@ $holiday_api->countries([
#### Fetch a supported country by code #### Fetch a supported country by code
```php ```php
<?php
$holiday_api->countries([ $holiday_api->countries([
'country' => 'NO', 'country' => 'NO',
]); ]);
@ -86,6 +90,7 @@ $holiday_api->countries([
#### Search for countries by code or name #### Search for countries by code or name
```php ```php
<?php
$holiday_api->countries([ $holiday_api->countries([
'search' => 'united', 'search' => 'united',
]); ]);
@ -96,12 +101,14 @@ $holiday_api->countries([
#### Fetch all supported languages #### Fetch all supported languages
```php ```php
<?php
$holiday_api->languages(); $holiday_api->languages();
``` ```
#### Fetch a supported language by code #### Fetch a supported language by code
```php ```php
<?php
$holiday_api->languages([ $holiday_api->languages([
'language' => 'es', 'language' => 'es',
]); ]);
@ -110,6 +117,7 @@ $holiday_api->languages([
#### Search for languages by code or name #### Search for languages by code or name
```php ```php
<?php
$holiday_api->languages([ $holiday_api->languages([
'search' => 'Chinese', 'search' => 'Chinese',
]); ]);
@ -120,6 +128,7 @@ $holiday_api->languages([
#### Fetch holidays for a specific year #### Fetch holidays for a specific year
```php ```php
<?php
$holiday_api->holidays([ $holiday_api->holidays([
'country' => 'US', 'country' => 'US',
'year' => 2019, 'year' => 2019,
@ -129,6 +138,7 @@ $holiday_api->holidays([
#### Fetch holidays for a specific month #### Fetch holidays for a specific month
```php ```php
<?php
$holiday_api->holidays([ $holiday_api->holidays([
'country' => 'US', 'country' => 'US',
'year' => 2019, 'year' => 2019,
@ -139,6 +149,7 @@ $holiday_api->holidays([
#### Fetch holidays for a specific day #### Fetch holidays for a specific day
```php ```php
<?php
$holiday_api->holidays([ $holiday_api->holidays([
'country' => 'US', 'country' => 'US',
'year' => 2019, 'year' => 2019,
@ -150,6 +161,7 @@ $holiday_api->holidays([
#### Fetch upcoming holidays based on a specific date #### Fetch upcoming holidays based on a specific date
```php ```php
<?php
$holiday_api->holidays([ $holiday_api->holidays([
'country' => 'US', 'country' => 'US',
'year' => 2019, 'year' => 2019,
@ -162,6 +174,7 @@ $holiday_api->holidays([
#### Fetch previous holidays based on a specific date #### Fetch previous holidays based on a specific date
```php ```php
<?php
$holiday_api->holidays([ $holiday_api->holidays([
'country' => 'US', 'country' => 'US',
'year' => 2019, 'year' => 2019,
@ -174,6 +187,7 @@ $holiday_api->holidays([
#### Fetch only public holidays #### Fetch only public holidays
```php ```php
<?php
$holiday_api->holidays([ $holiday_api->holidays([
'country' => 'US', 'country' => 'US',
'year' => 2019, 'year' => 2019,
@ -184,6 +198,7 @@ $holiday_api->holidays([
#### Fetch holidays for a specific subdivision #### Fetch holidays for a specific subdivision
```php ```php
<?php
$holiday_api->holidays([ $holiday_api->holidays([
'country' => 'GB-ENG', 'country' => 'GB-ENG',
'year' => 2019, 'year' => 2019,
@ -193,6 +208,7 @@ $holiday_api->holidays([
#### Include subdivision holidays with countrywide holidays #### Include subdivision holidays with countrywide holidays
```php ```php
<?php
$holiday_api->holidays([ $holiday_api->holidays([
'country' => 'US', 'country' => 'US',
'year' => 2019, 'year' => 2019,
@ -203,6 +219,7 @@ $holiday_api->holidays([
#### Search for a holiday by name #### Search for a holiday by name
```php ```php
<?php
$holiday_api->holidays([ $holiday_api->holidays([
'country' => 'US', 'country' => 'US',
'year' => 2019, 'year' => 2019,
@ -213,6 +230,7 @@ $holiday_api->holidays([
#### Translate holidays to another language #### Translate holidays to another language
```php ```php
<?php
$holiday_api->holidays([ $holiday_api->holidays([
'country' => 'US', 'country' => 'US',
'year' => 2019, 'year' => 2019,
@ -223,6 +241,7 @@ $holiday_api->holidays([
#### Fetch holidays for multiple countries #### Fetch holidays for multiple countries
```php ```php
<?php
$holiday_api->holidays([ $holiday_api->holidays([
'country' => 'US,GB,NZ', 'country' => 'US,GB,NZ',
'year' => 2019, 'year' => 2019,

View file

@ -1,7 +1,7 @@
{ {
"name": "holidayapi/holidayapi-php", "name": "holidayapi/holidayapi-php",
"description": "Official PHP library for Holiday API", "description": "Official PHP library for Holiday API",
"version": "2.2.1", "version": "2.2.2",
"type": "library", "type": "library",
"keywords": [ "keywords": [
"calendar", "calendar",