digikraaft/abokifx-php

PHP Implementation of abokiFX API

v1.0.2 2022-04-01 03:31 UTC

This package is auto-updated.

Last update: 2024-04-29 05:05:40 UTC


README

run-tests Build Status Scrutinizer Code Quality Code Intelligence Status License: MIT

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.