Skip to content

Exbil/24fire-php-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

💾 PHP API Client

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 [email protected] 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());
?>