symfony-bundle xerobundle
Symfony2 Bundle that creates an Guzzle client for Xero
blackoptic/xerobundle
Symfony2 Bundle that creates an Guzzle client for Xero
- Wednesday, October 7, 2015
- by james75
- Repository
- 2 Watchers
- 4 Stars
- 431 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 4 Forks
- 4 Open issues
- 1 Versions
- 0 % Grown
XeroBundle
XeroBundle
makes it easy to communicate with the Xero api using the Guzzle library, (*1)
How to get started
-
Add the following to your composer.json
file, (*2)
"require": {
...
"blackoptic/xerobundle": "*"
...
}
-
Run php composer.phar update "blackoptic/xerobundle"
, (*3)
-
Register the bundle in your app/AppKernel.php
:, (*4)
php
<?php
...
public function registerBundles()
{
$bundles = array(
...
new BlackOptic\Bundle\XeroBundle\BlackOpticXeroBundle(),
...
);
...
, (*5)
-
Add the config for your account details:, (*6)
yaml
black_optic_xero:
consumer_key: <Your Consumer Key>
consumer_secret: <Your Consumer Secret>
private_key: <Path to you private key>
, (*7)
-
Request and use the service:
php
$xeroClient = $this->get('blackoptic.xero.client');
$response = $xeroClient->get('Invoices')->send();
, (*8)