mirror of
https://github.com/holidayapi/holidayapi-php.git
synced 2025-06-21 04:16:31 +00:00
feat: pull country or language by code
* feat: pull country or language by code. This differs from the existing `search` functionality in that it allows you to explicitly pull back a single country or language instead of anything that matches (which could result in more items returned than expected). * docs(readme): update to include examples for new functionality. * test: expand tests to include new parameters. * fix(client): dropped some commented out code that wasn't in use. * docs(license): bump the year of the license.
This commit is contained in:
parent
0f45ca781a
commit
054eab9c02
5 changed files with 88 additions and 30 deletions
20
README.md
20
README.md
|
@ -67,7 +67,15 @@ try {
|
|||
$holiday_api->countries();
|
||||
```
|
||||
|
||||
#### Search for a country by code or name
|
||||
#### Fetch a supported country by code
|
||||
|
||||
```php
|
||||
$holiday_api->countries([
|
||||
'country' => 'NO',
|
||||
]);
|
||||
```
|
||||
|
||||
#### Search for countries by code or name
|
||||
|
||||
```php
|
||||
$holiday_api->countries([
|
||||
|
@ -83,7 +91,15 @@ $holiday_api->countries([
|
|||
$holiday_api->languages();
|
||||
```
|
||||
|
||||
#### Search for a language by code or name
|
||||
#### Fetch a supported language by code
|
||||
|
||||
```php
|
||||
$holiday_api->languages([
|
||||
'language' => 'es',
|
||||
]);
|
||||
```
|
||||
|
||||
#### Search for languages by code or name
|
||||
|
||||
```php
|
||||
$holiday_api->languages([
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue