Giter Club home page Giter Club logo

easi's Introduction

THIS LIBRARY IS NO LONGER MAINTAINED

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->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

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.

easi's People

Contributors

azak1r avatar nullx27 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

rmatulis azak1r

easi's Issues

Class 'nullx27\ESI\Configuration' not found

After updating to the latest version i keep getting a lot of errors when calling easi
did some digging and it appears that the issue is caused by the namespacing in your ESI package

Symfony\Component\Debug\Exception\FatalThrowableError thrown with message "Class 'nullx27\ESI\Configuration' not found"

Stacktrace:
#0 Symfony\Component\Debug\Exception\FatalThrowableError in xxx\vendor\nullx27\easi\src\Configuration.php:56
final private function __construct()
    {
        $this->apiClientConfig = \nullx27\ESI\Configuration::getDefaultConfiguration();
        $this->setUseragent('nullx27/easi');
        $this->setCache(new SimpleCacheBridge(new ArrayCachePool()));
        $this->setLogger(new NullLogger());
    }

Class 'nullx27\ESI\Configuration' not found

Try to you basic code and get this error:
$easi = new \nullx27\Easi\Easi(); $alliance = $easi->alliance->getAllianceById(99006112); print $alliance->allianceName;

Class 'nullx27\ESI\Configuration' not found

Using laravel 5.5

invalid datasource: en-us

whenever i try to get a name for a item type it throws
$easi->universe->getType($ship_id);
invalid datasource: en-us

This is caused by datasource and language parameters being in the wrong places. create a pull request with the fix

#3

filtering market prices

when you pull in the market prices the response is in a array. but the way it is sorted is kind of strange.

$easi = new Easi();
        $easi->getConfig()->setCache($simpleCache);
        $market = $easi->market->getPrices();

        dd($market->data['34']);

i thought it would output the prices for tritanium which has the typeid of 34
instead it returns:

GetMarketsPrices200Ok {#11656 ▼
  #container: array:3 [▼
    "adjustedPrice" => 0.0
    "averagePrice" => null
    "typeId" => 32824
  ]
}

which is the price for Unrefined Caesarium Cadmide which is no where close. any idea on how to propperly sort the response?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.