Skip to content

Commit e08db0e

Browse files
committed
docs: few improvements
1 parent ce03fa0 commit e08db0e

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

README.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -820,6 +820,7 @@ class YourApi extends Api
820820
{
821821
// set required base url
822822
$this->setBaseUrl('https://api.example.com/v1');
823+
823824
// set options as query defaults (will be included in all requests)
824825
$this->addQueryDefault('language', $this->options['language']);
825826
$this->addQueryDefault('timezone', $this->options['timezone']);
@@ -843,20 +844,15 @@ For the end user, it should look like this:
843844

844845
```php
845846
$api = new YourApi([
846-
'language' => 'pt',
847-
'timezone' => 'Europe/Lisbon'
847+
'language' => 'pt'
848848
]);
849849

850-
// GET https://api.example.com/v1/posts?language=pt&timezone=Europe/Lisbon&page=1
850+
// GET https://api.example.com/v1/posts?language=pt&timezone=UTC&page=1
851851
$posts = $api->getPosts();
852852
```
853853

854854
For all available methods, check the official page documentation [here](https://symfony.com/doc/current/components/options_resolver.html).
855855

856-
## Cookbook
857-
858-
TODO
859-
860856
## Contributing
861857

862858
Any form of contribution to improve this library (including requests) will be welcome and appreciated.

0 commit comments

Comments
 (0)