digikraaft / abokifx-php
PHP Implementation of abokiFX API
Requires
- php: ^7.4|^8.0|^8.1
- ext-json: *
- guzzlehttp/guzzle: ^7.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.16
- mockery/mockery: ^1.4
- phpunit/phpunit: ^9.0
README
This package provides an expressive and convenient way to interact with the abokiFX API.
Installation
You can install the package via composer:
composer require digikraaft/abokifx-php
Usage
All APIs documented in abokiFX's API Reference are currently supported by this package.
Authentication
Before using any of the endpoints, you will have to obtain your API token by contacting the abokiFX marketing team via marketing@abokifx.com
Usage
use Digikraaft\Abokifx\Abokifx; use Digikraaft\Abokifx\Rate; //set API token Abokifx::setApiToken('apitokenfromabokifx'); $response = Rate::current();
Available Methods
A list of the available methods are documented below:
Abokifx
getApiToken() : string
setApiToken(string $apiToken) : void
Rate
current(): Array|Object
otherParallel(): Array|Object
previous(): Array|Object
withDate(array params) : Array|Object
This package returns the exact response from the abokiFX API but as the stdClass
type or array
. The package returns the response as array
by default. If you want to return the response as object
, simple set the response type before calling the endpoint like this:
use Digikraaft\Abokifx\Abokifx; Abokifx::setResponseType(Abokifx::OBJECT_RESPONSE);
Testing
composer test
More Good Stuff
Check here for more awesome free stuff!
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Contributions are welcome! Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email hello@digikraaft.ng instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.