rmatulis / easi

⚛ Easi - A Eve Online ESI Api wrapper

Home Page:https://nullx27.github.io/easi/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Easi - A Eve Online ESI Api wrapper

StyleCI

Requirements

PHP 7.0 or later

Installation

Use composer to install:

composer require nullx27/easi

Getting started

<?php
   
require_once(__DIR__ . '/vendor/autoload.php');

$easi = new \nullx27\Easi\Easi();
$alliance = $easi->alliance->getAlliance(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

Configuration

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'); 

Bug repots

Please use Github Issues for bug reports.

About

⚛ Easi - A Eve Online ESI Api wrapper

https://nullx27.github.io/easi/


Languages

Language:PHP 100.0%