canaltp/fenrir-api-client-bundle

Symfony bundle to integrate Fenrir Api client in a Symfony application.

1.0.1 2016-05-13 10:19 UTC

This package is not auto-updated.

Last update: 2020-11-27 22:11:41 UTC


README

Symfony bundle to integrate Fenrir Api client in a Symfony application.

Composer

Install via composer:

{
    "require": {
        "canaltp/fenrir-api-client-bundle": "~1.0"
    }
}

Register the bundle in your AppKernel:

            new CanalTP\FenrirApiClientBundle\CanalTPFenrirApiClientBundle(),

Add Fenrir Api base url in your configuration and parameters:

app/config/config.yml:

canal_tp_fenrir_api_client:
    uri: %fenrir_api_uri%

app/config/parameters.yml, and also parameters.yml.dist:

    fenrir_api_uri: http://fenrir-api.local/api/

Usage

A Fenrir client is available in your container, then:

$fenrirApi = $container->get('canal_tp_fenrir.api');

$fenrirApi->getUser(2);

License

This project is under GPL-3.0 License.