mglinski / OpenCrest

EVE Online CREST PHP Library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OpenCrest

Latest Stable Version Total Downloads Latest Unstable Version License Documentation Status Code Climate Test Coverage Build Status

EVE Online CREST PHP Library

Open Source PHP Library for using EVE Online CREST API

Shouldn't be used for production just yet, as CREST API lacks data. It's better to use XML API for now.

How to use

use OpenCrest\OpenCrest;
$token = "Access Token you got from OAuth authentication | Required only for Authenticated resources";
OpenCrest::setToken($token);

// Get list of constellations
$constellations = OpenCrest::Constellations->get();

// You can then foreach list to get more details on constellations
foreach ($constellations as $constellation) {
    // This will make show($id) request for every object.
    //Beware, that OpenCrest::[something]->get() can be very long and that making get request on every item 
    // will make alot of reqquests.
    var_dump($constellation->get);

}
// Get specific constellation
$id = 20000002;
$constellation = OpenCrest::Constellations->get($id);

// Same with planets
$id = 40000017;
$planet = OpenCrest::Planets->get($id);

// Or alliances
$id = 99000006;
$alliance = OpenCrest::Alliances->get($id)->description;

// Get list of alliances
$alliances = OpenCrest::Alliances->get();

// Go to specific page
$alliances = OpenCrest::Alliances->page(2);

// Go to next page
// Using allrady recived object to know which page is next.
$alliances = $alliances->nextPage();

// Go to previouse page
// Using allrady recived object to know which page is previous.
$alliances = $alliances->previousPage();

Endpoints Documentation

Documentation

License

The MIT License (MIT). Please see License File for more information.

About

EVE Online CREST PHP Library

License:MIT License


Languages

Language:PHP 100.0%