killerwolf / jcdecauxcyclocity-bundle
this bundle provides easy integration of the Cyclocity OpenData Rest API provided by JCDecaux
Installs: 28
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/killerwolf/jcdecauxcyclocity-bundle
Requires
This package is not auto-updated.
Last update: 2025-10-07 12:27:02 UTC
README
This is a simple bundle to use the JCDecaux Cyclocity OpenData Rest API in a Symfony2 project
Install
Install with composer and enable the bundle in the kernel.
Usage
First, Add your API KEY (from jcdecaux developers portal) in app/conf/config.yml
killerwolf_jc_decaux_cyclocity: api_key: "YOU_API_KEY"
Finaly use the service into your controller,
<?php namespace Killerwolf\JCDecauxCyclocityBundle\Controller; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Component\HttpFoundation\Request; class DefaultController extends Controller { public function indexAction(Request $request) { $api = $this->get('cyclocity.data'); return $this->render( 'KillerwolfJCDecauxCyclocityBundle:Default:index.html.twig', [ 'stations' => $api->getStationsByContract( 'Paris' ) ] ); } }