canaltp / navitiaio-api-bundle
Symfony2 bundle which provide a NavitiaIoApi service.
Installs: 10
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 35
Forks: 1
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=5.2
- canaltp/navitiaio-api-component: ~1.6
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.