PHP 7.0 or later
Use composer to install:
composer require nullx27/easi
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$easi = new \nullx27\Easi\Easi();
$alliance = $easi->alliance->getAllianceById(99006112);
print $alliance->allianceName; // Friendly Probes
To use authenticated ESI calls please provide a valid access token
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$token = 'valid access token';
$characterId = 123456789;
$easi = new \nullx27\Easi\Easi($token);
$wallet = $easi->wallet->getCharacterWallet($characterId);
print_r($wallet->data);
For a full list of all available endpoints and methods see here
Easi can use any PSR-16 compatible caching libary to stay in line with CCP request guidelines
$easi = new \nullx27\Easi\Easi();
$easi->getConfig()->setCache($yourCacheInstance);
The same works with PSR-3 compatible Loggers:
$easi = new \nullx27\Easi\Easi();
$easi->getConfig()->setLogger($yourLoggerInstance);
You can set a different datasource for your esi requests. The default is 'tranquility'.
$easi = new \nullx27\Easi\Easi();
$easi->getConfig()->setDatasource('singularity');
Please use Github Issues for bug reports.