library aardwarq-php
PHP client for aardwarq.com API
aardwarq/aardwarq-php
PHP client for aardwarq.com API
- Tuesday, September 15, 2015
- by anorgan
- Repository
- 1 Watchers
- 0 Stars
- 6 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 1 Open issues
- 2 Versions
- 0 % Grown
Aardwarq PHP library
, (*1)
This is the PHP API client for Aardwarq.com., (*2)
Install
Via Composer, (*3)
``` bash
$ composer require aardwarq/aardwarq-php, (*4)
## Usage
``` php
// Configure Aardwarq API Client
$provider = new Aardwarq\Api\OAuth2Provider([
'clientId' => 'CLIENT_ID',
'clientSecret' => 'CLIENT_SECRET',
'redirectUri' => 'http://aardwarq.com/'
]);
$token = $provider->getAccessToken('clientCredentials');
$api = new Aardwarq\Api\Client($token->accessToken);
// You can set defaults for every event
\Aardwarq\Api\Event\Event::setDefaults([
'context' => 'CLI', //
'environment' => 'development',
'version' => 'v0.1.1', // Version of your app
]);
// Register exception handler
set_exception_handler(function (\Exception $exception) use ($api) {
echo 'Handling!';
$apiException = new \Aardwarq\Api\Event\Exception();
$apiException
->setMessage($exception->getMessage())
->setStackTrace($exception->getTrace())
;
$result = $api->send($apiException);
});
Credits
License
The MIT License (MIT). Please see License File for more information., (*5)
dev-master
9999999-dev
PHP client for aardwarq.com API
Sources
Download
MIT
The Requires
by
Marin CrnkoviÄ
dev-analysis-zO0DP8
dev-analysis-zO0DP8
PHP client for aardwarq.com API
Sources
Download
MIT
The Requires
by
Marin CrnkoviÄ