Abacus Advance Bundle
API to connect easily to Abacus AD gateway API, version v0.9.14, (*1)
This API Gateway allows to:, (*2)
- call easily the Abacus ADvance API
- receive http callbacks made from ADvance in some configurations
External docs
- https://www.abacusemedia.com/advance
Requirements
- guzzlehttp/guzzle: ~6.0
- symfony - various components: Config, OptionsResolver, HttpFoundation, Serializer, HttpKernel, DependencyInjection
Installation
- Install the bundle using composer
- Activate the Abacus\AdvanceBundle\AbacusAdvanceBundle in your Sf app kernel
- Set up the required parameters (see parameters.yml in this bundle)
Using the bundle
Making API calls to ADvance
To make calls to Advance you have to retrieve the abacus.advance.api
as a service, and from it retrieve the specific
service that you need: Gatekeeper Access Allowed, Log web activity, Get products list, etc..., (*3)
Each service can return one or many responses pre-formatted., (*4)
Receiving callbacks
To be documented..., (*5)
Using the local API Stub to emulate ADvance
To be documented..., (*6)
Examples
Gatekeeper Access Allowed
// Get Abacus ADvance api as a service
$advanceApiGateway = $this->get('abacus.advance.api');
// Get GateKeeper service
$gateKeeperService = $advanceApiGateway->getGateKeeper();
// Call API and get response (NB: can throw an exception)
$accessAllowResponse = $gateKeeperService
->accessAllowed(
[
'Url' => 'myUrl',
'CookieID' => 'myAnonymousUserId',
]
);
// Use response methods
$access = $accessAllowResponse->hasAccessGranted(); // true|false
$accessStatus = $accessAllowResponse->getAccessStatus(); // GateKeeper::ACCESS_GRANTED|GateKeeper::ACCESS_DENIED
// Or get response as Abacus returned to us
$rawResponse = $accessAllowResponse->getRawResponse();
// See also getData, getVersion, getStatusCode, getStatusMessages functions
Authors