exbil/24fire-php-api

A full-featured implementation of the 24Fire API Client

v1.0.0 2025-03-25 18:25 UTC

This package is auto-updated.

Last update: 2025-03-26 22:29:42 UTC


README

visitors

Latest Stable Version Total Downloads Latest Unstable Version License PHP Version Require

Note

Disclaimer: If you have a suggestion for a better name for a route, feel free to send your proposal via email to composer@exbil.net or create a pull request.

Getting Started

Requirements

⚒️ Install

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

📑 Usage

Search for the official API Documentation here.
You need an API Key for that.

🗃️ Basic

<?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());
?>