https://github.com/halloverden/symfony-brreg-http-client
Provides a Symfony http client for the brreg (Brønnøysundregistrene) api
https://github.com/halloverden/symfony-brreg-http-client
api brreg client http register rest
Last synced: about 2 hours ago
JSON representation
Provides a Symfony http client for the brreg (Brønnøysundregistrene) api
- Host: GitHub
- URL: https://github.com/halloverden/symfony-brreg-http-client
- Owner: halloverden
- License: mit
- Created: 2021-02-23T13:52:44.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2025-03-21T10:55:03.000Z (over 1 year ago)
- Last Synced: 2026-05-30T19:23:36.213Z (29 days ago)
- Topics: api, brreg, client, http, register, rest
- Language: PHP
- Homepage:
- Size: 104 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Symfony Brreg Http Client
Symfony [Http Client](https://symfony.com/doc/current/http_client.html) for the Open Brreg REST Api for the [Organization Registry](https://www.brreg.no/produkter-og-tjenester/apne-data/beskrivelse-av-tjenesten-data-fra-enhetsregisteret/).
## Installation
Via composer:
```console
$ composer require halloverden/symfony-brreg-http-client
```
## Usage
In your `services.yaml`, set
```yaml
HalloVerden\BrregHttpClient\BrregEntityClientInterface:
class: HalloVerden\BrregHttpClient\BrregEntityClient
```
In your class, inject the `BrregEntityClientInterface` interface:
```injectablephp
readonly final class TestService {
public function __construct(private BrregEntityClientInterface $client) {
}
public function test(string $organizationNumber): BrregEntity {
return $this->client->fetchEntityByOrganizationNumber($organizationNumber);
}
}
```
## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
## License
[MIT](https://choosealicense.com/licenses/mit/)