blackoptic / xerobundle
Symfony2 Bundle,用于创建Xero的Guzzle客户端
dev-master
2015-10-07 10:09 UTC
Requires
- php: >=5.4.0
- ext-openssl: *
- guzzlehttp/oauth-subscriber: 0.3.*
- symfony/framework-bundle: 2.*
Requires (Dev)
- phpunit/phpunit: 4.8.*
This package is not auto-updated.
Last update: 2024-09-24 05:56:13 UTC
README
XeroBundle
使用Guzzle库轻松与Xero API通信
如何开始
-
将以下内容添加到您的
composer.json
文件中"require": { ... "blackoptic/xerobundle": "*" ... }
-
运行
php composer.phar update "blackoptic/xerobundle"
-
在您的
app/AppKernel.php
中注册该bundle<?php ... public function registerBundles() { $bundles = array( ... new BlackOptic\Bundle\XeroBundle\BlackOpticXeroBundle(), ... ); ...
-
添加您的账户详细信息配置
black_optic_xero: consumer_key: <Your Consumer Key> consumer_secret: <Your Consumer Secret> private_key: <Path to you private key>
-
请求和使用服务
$xeroClient = $this->get('blackoptic.xero.client'); $response = $xeroClient->get('Invoices')->send();