From 089e696b426cce49073c55622357ad6695b37033 Mon Sep 17 00:00:00 2001 From: Will Rossiter Date: Thu, 16 Sep 2021 11:07:41 +1200 Subject: [PATCH] Fix up docs --- README.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/README.md b/README.md index e69de29..c410801 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,37 @@ +# silverstripe-xero + +## Maintainer Contact + +* Will Rossiter + +## Installation + +> composer require "fullscreeninteractive/silverstripe-xero" + +## Documentation + +Provides a lightweight wrapper around `calcinai/xero-php` with additional +Silverstripe support for authenication and connecting applications via oauth. + +To setup register a Xero Application and define your clientId and clientSecret +as environment variables. + +``` +XERO_CLIENT_ID='123' +XERO_CLIENT_SECRET='123' +``` + +Once those API keys are available, a new tab under the `Settings` admin will +appear for connecting to Xero. Follow the prompts to link the selected account +to your Silverstripe website. + +## Interacting with the API + +``` +/** @var \XeroPHP\Application **/ +$app = XeroFactory::singleton()->getApplication(); +``` + +Integrating with the API is done via https://github.com/calcinai/xero-php. +Consult that page for further information for creating invoices etc. +