enm / json-api-client-bundle
Symfony integration for enm/json-api-client
Installs: 3 176
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 6
Forks: 1
Open Issues: 3
Type:symfony-bundle
Requires
- php: >=7.2
- enm/json-api-client: ^4.0
- symfony/framework-bundle: ^5.0
Suggests
- kriswallsmith/buzz: To use buzz as http client
- nyholm/psr7: To use guzzle as http client
This package is auto-updated.
Last update: 2024-10-29 23:06:04 UTC
README
The Symfony integration for enm/json-api-client.
Installation
composer require enm/json-api-client-bundle
It's recommended to install kriswallsmith/buzz
as http-client and nyholm/psr7
for http factories.
composer require kriswallsmith/buzz nyholm/psr7
You can also use any HTTP client which implements PSR-18.
Configuration
<?php // config/bundles.php return [ // ... Enm\Bundle\JsonApi\Client\EnmJsonApiClientBundle::class =>['all'=>true], // ... ];
enm_json_api_client: clients: # requires at least one element, the key will be your client name api: 'http://example.com/api'
Usage
The bundle offers a private service (only used for dependency injection, not for direct calls via service container) for
each configured client. The service name will be enm.json_api_client.YOUR_CLIENT_NAME
.