The IdeupPachubeBundle offers access to the pachube.com feed API either by using a PHP service or through the CLI for Symfony2. Is on charge of handle all the operations related to pachube feeds via the bundle CRUD interface.
Features include:
- CRUD API for managing feeds
- CLI commands for executing operations
Pachube is an web service provider allowing developers to connect their own data (energy and environment data from objects, devices & buildings) to the Web and to build their own applications on it.
For more information about the service, please visit: https://pachube.com
Add PachubeBundle to your vendor/bundles/ directory.
Add the following lines in your deps
file:
[IdeupPachubeBundle]
git =https://github.com/nass600/IdeupPachubeBundle.git
target=/bundles/Ideup/PachubeBundle
version=master
Run the vendors script:
./bin/vendors install
Add the Ideup namespace to your app/autoload.php
:
// app/autoload.php
$loader->registerNamespaces(array(
// your other namespaces
'Ideup' => __DIR__.'/../vendor/bundles',
);
Add PachubeBundle to your app/AppKernel.php
:
// app/AppKernel.php
public function registerBundles()
{
return array(
// ...
new Ideup\PachubeBundle\IdeupPachubeBundle(),
);
}
As a service:
public function indexAction(Request $request){
$version = 'v2';
$feedId = 34278;
$apiKey = 'hjg34tg73u34grutd78tr34g3rt478qiwhe8923';
$pachube = $this->getContainer()->get('ideup.pachube.manager');
$data = $pachube->readFeed($version, $feedId, $apiKey);
}
As a command:
$ php ./app/console ideup:feed:read version feedId apiKey
This bundle is under de GNU license. See the complete license in::
LICENSE
- Ignacio Velázquez Gómez
The bundle structure is partially based on pachube_php
- Unit testing
- Add config options