ckrupa / hubic-api-bundle
a symfony2 service wrapper which simplifies api calls to hubic.com
Installs: 12
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- hwi/oauth-bundle: 0.3.*
- sensio/buzz-bundle: ~1.0
- symfony/symfony: >=2.6
This package is not auto-updated.
Last update: 2025-03-15 19:51:51 UTC
README
This Bundle provides a simple integration of the hubiC-API (https://api.hubic.com/) for Symfony2. The API wrapper is not the "official" hubic.com library for PHP/Symfony2!
Usage
<?php
$hubic_api = $this->container->get('ckrupa_hubic_api');
if(!$hubic_api->isLoggedIn())
{
die('invalid oauth token!');
}
$result = $hubic_api->send('/account/credentials');
Installation
Step 1: Composer require
$ php composer.phar require "ckrupa/hubic-api-bundle":"dev-master"
Step 2: Enable the bundle in the kernel
<?php
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
// ...
new HWI\Bundle\OAuthBundle\HWIOAuthBundle(),
new Sensio\Bundle\BuzzBundle\SensioBuzzBundle(),
new Ckrupa\HubicApiBundle\CkrupaHubicApiBundle(),
// ...
);
}
Step 3: Setup oAuth
oAuth is done by HWIOAuthBundle so checkout the documentation.
Sample configuration
here is an sample config for hwi 0.3