PHP code example of nicolaskion / eve

1. Go to this page and download the library: Download nicolaskion/eve library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

nicolaskion / eve example snippets


use NicolasKion\Esi\Facades\Esi;

$result = Esi::getStatus();

if ($result->wasSuccessful()) {
    $result->data->players; // e.g. 24_512
}

$alliance = Esi::getAlliance(434243723)->data;
$history = Esi::getMarketHistory(region_id: 10000002, type_id: 44992)->data;

// IDs to names
$names = Esi::getNames([95465499, 30000142])->data;

// Names to IDs, grouped by category
$ids = Esi::getIds(['CCP Bartender', 'Jita'])->data;
$ids->characters[0]->id; // 95465499
$ids->systems[0]->id;    // 30000142

$assets = Esi::getAssets($character)->data;
$contacts = Esi::getCharacterContacts($character)->data;

Esi::setWaypoint($character, destination_id: 30000142);

$result = Esi::getCharacter(95465499);

if ($result->failed()) {
    $result->error->code; // e.g. 404
    $result->error->body;
}
bash
php artisan vendor:publish --tag="esi-config"