canaltp / tyr-bundle
Symfony2 bundle which provides a Tyr service.
Installs: 2 295
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 33
Forks: 2
Type:symfony-bundle
Requires
- php: >=5.2
- canaltp/tyr-component: ~1.2
- symfony/dependency-injection: ~2.3
- symfony/http-kernel: ~2.3
This package is not auto-updated.
Last update: 2025-01-04 20:25:52 UTC
README
Symfony2 bundle which provide a concrete AbstractTyrService.
The bundle uses the TyrComponent.
Installation
Install via composer
{ "require": { "canaltp/tyr-bundle": "1.1.x" } }
Updating AppKernel.php:
public function registerBundles() { $bundles = array( // ... new CanalTP\TyrBundle\CanalTPTyrBundle(), ); }
Updating app/config.yml:
# Tyr api configuration canal_tp_tyr: url: %tyr_url% end_point_id: 2 # Optional, can also be set with setEndPointId
Add parameters in parameters.yml:
parameters: tyr_url: http://tyr.dev.canaltp.fr/v0/
Usage
// Accessing service $tyrApi = $container->get('canal_tp_tyr.api'); $tyrApi->setEndPointId(1); // If not set in configuration // Call api $user = $tyrApi->getUserByEmail('...');
License
This project is under GPL-3.0 License.