it-bens / deqar-api-client-bundle
Bundle that provides the deqar-api-client package via Symfony services.
Installs: 4
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 1
Type:symfony-bundle
Requires
- php: ^8.0
- it-bens/deqar-api-client: ^0.1
- symfony/config: ^4.4|^5.0
- symfony/dependency-injection: ^4.4|^5.0
- symfony/http-kernel: ^4.4|^5.0
Requires (Dev)
- captainhook/plugin-composer: ^5.3
- phpstan/phpstan: ^1.0
- phpunit/phpunit: ^9.5
- roave/security-advisories: dev-latest
- symfony/yaml: ^4.4|^5.3
This package is auto-updated.
Last update: 2024-11-15 11:16:11 UTC
README
How to install the bundle?
The package can be installed via Composer:
composer require it-bens/it-bens/deqar-api-client-bundle
If you're using Symfony Flex, the bundle will be automatically enabled. For older apps, enable it in your Kernel class.
How to use the DEQAR API Client(s) Bundle?
With this bundle, an SubmissionApiClientInterface
and an WebApiClientInterface
implementation is configured for auto-wiring.
Both clients have to be configured via symfony configuration:
itb_deqar_api_client: web_api_client: deqar_username: '%env(string:DEQAR_API_USERNAME)%' deqar_password: '%env(string:DEQAR_API_PASSWORD)%' cache: 'itb_deqar_api_client.test_cache' submission_api_client: deqar_username: '%env(string:DEQAR_API_USERNAME)%' deqar_password: '%env(string:DEQAR_API_PASSWORD)%' test: true
The WebApiClient can be used without the SubmissionApi Client, but it's not possible to use the SubmissionApi client without the WebApi client. The latter one requires WebApi access to check the provided agencies, activities and institutions.
If no cache
key is provided, the uncached WebApi client will be used (also for the SubmissionApi client).
The cached WebApi client requires a valid and registered cache pool, provided with its id.
The usage of the clients is described here: GitHub - DEQAR API Client(s).
Contributing
I am really happy that the software developer community loves Open Source, like I do! ♥
That's why I appreciate every issue that is opened (preferably constructive) and every pull request that provides other or even better code to this package.
You are all breathtaking!
Special Thanks
This project is financed by the European Quality Assurance Register (EQAR) and the European Union, which I am very thankful for!