ckrupa/hubic-api-bundle
Composer 安装命令:
composer require ckrupa/hubic-api-bundle
包简介
a symfony2 service wrapper which simplifies api calls to hubic.com
README 文档
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
统计信息
- 总下载量: 12
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-04-04