Note
Disclaimer: If you have a suggestion for a better name for a route, feel free to send your proposal via email to [email protected] or create a pull request.
In the root of your project execute the following:
composer require exbil/24fire-php-api
or add this to your composer.json
file:
{
"require": {
"exbil/24fire-php-api": "^1.0"
}
}
Then perform the installation:
$ composer install --no-dev
Search for the official API Documentation here.
You need an API Key for that.
<?php
// Require the autoloader
require_once 'vendor/autoload.php';
// Use the library namespace
use FireAPI\FireAPI;
// Your API token
$token = getenv('24FIRE_API_KEY');
// Create the API client with the sandbox option
$client = new FireAPI($token, true); // 'true' activates the sandbox environment
// Request to the server in the sandbox environment
var_dump($client->rootServer()->getAll());
?>