Skip to content

Commit

Permalink
Update README.md and CHANGELOG.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Art4 committed Mar 6, 2024
1 parent b2b1a33 commit 2952006
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- New method `Art4\Wegliphant\Client::authenticate()` to set your API key for authorized API requests.
- New class `Art4\Wegliphant\Exception\UnexpectedResponseException` that will be thrown if an error happens while processing the response.

### Changed
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ $client = \Art4\Wegliphant\Client::create(
);
```

Optionally, you can use `authenticate()` to set an API key. Some areas of the weg.li API require an API key.
Without the API key, all requests are sent without authorization.
You can find your API key [here](https://www.weg.li/user/edit).

```php
$client->authenticate($apiKey);
```

### List all districts

```php
Expand Down

0 comments on commit 2952006

Please sign in to comment.