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:
Josh Sherman 2020-02-11 18:00:37 -06:00
parent 0f45ca781a
commit 054eab9c02
5 changed files with 88 additions and 30 deletions

View file

@ -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([