blackoptic/xerobundle

Symfony2 Bundle,用于创建Xero的Guzzle客户端

安装: 465

依赖: 0

建议者: 0

安全: 0

星标: 4

关注者: 3

分支: 4

公开问题: 4

类型:symfony-bundle

dev-master 2015-10-07 10:09 UTC

This package is not auto-updated.

Last update: 2024-09-24 05:56:13 UTC


README

XeroBundle 使用Guzzle库轻松与Xero API通信

如何开始

  1. 将以下内容添加到您的 composer.json 文件中

        "require": {
            ...
            "blackoptic/xerobundle": "*"
            ...
        }
  2. 运行 php composer.phar update "blackoptic/xerobundle"

  3. 在您的 app/AppKernel.php 中注册该bundle

        <?php
        ...
        public function registerBundles()
        {
            $bundles = array(
                ...
                new BlackOptic\Bundle\XeroBundle\BlackOpticXeroBundle(),
                ...
            );
        ...
  4. 添加您的账户详细信息配置

     black_optic_xero:
         consumer_key: <Your Consumer Key>
         consumer_secret: <Your Consumer Secret>
         private_key: <Path to you private key>
  5. 请求和使用服务

        $xeroClient = $this->get('blackoptic.xero.client');
        $response = $xeroClient->get('Invoices')->send();