canaltp/navitiaio-api-bundle

This package is abandoned and no longer maintained. No replacement package was suggested.

Symfony2 bundle which provide a NavitiaIoApi service.

1.4.0 2015-10-27 14:59 UTC

This package is not auto-updated.

Last update: 2022-01-26 06:22:04 UTC


README

Symfony2 bundle which provide a NavitiaIoApiService.

The bundle uses the NavitiaIoApiComponent.

Installation

Install via composer

{
    "require": {
        "canaltp/navitiaio-api-bundle": "1.x"
    }
}

Updating AppKernel.php:

    public function registerBundles()
    {
        $bundles = array(
            // ...
            new CanalTP\NavitiaIoApiBundle\CanalTPNavitiaIoApiBundle(),
        );
    }

Add parameters in parameters.yml:

parameters:
    canal_tp_navitia_io_api.customers:
        navio:
            host: navitia
            url: http://navitia.local
            username: admin
            password: admin
        sncf:
            host: api.sncf.com
            url: http://another.examle
            username: USERNAME_ADMIN
            password: USERNAME_ADMIN

Usage

// Accessing service
$navitiaIoApi = $container->get('canal_tp_navitia_io.api');

// Call api
$user = $navitiaIoApi->getUsers();

License

This project is under GPL-3.0 License.