Aineko Macx
331
|
Posted - 2015.02.26 18:01:58 -
[1] - Quote
I present iveeCrest, a PHP library for EVE Online's CREST API.
Purpose and target audience
The goal of this project is to provide its users with a simple but powerful library to access EVE's CREST API. By hiding the complexities and some of the quirks of CREST, iveeCrest helps developers to quickly prototype scripts or develop full blown (web) applications. iveeCrest will likely be most useful for developers with at least basic PHP knowledge.
FEATURES
This is a beta release. Both CREST and this library are unfinished, so significant changes should be expected with time.
- Object oriented design with high power-to-weight ratio
- Authenticated CREST based
- Methods for all endpoints reachable from CREST root are available, plus a few deeper endpoints. Easily expanded to support more (pull requests welcome!)
- Gathering of multipage responses
- Supports parallel GET requests with high performance asynchronous processing
- Multilayer cache design, supporting Memcached or Redis as caching backend
- The index-less collections returned by CREST are properly re-indexed by IDs
- Extensible via configurable subclassing
- A well documented and mostly PSR compliant codebase
- Includes a self-contained web-script to retrieve a refresh token
Released as open source under the LGPL.
USAGE
Basic usage is shown with some examples:
//initialize iveeCrest. Adapt path as required. require_once('/path/to/iveeCrest/iveeCrestInit.php');
//instantiate the CREST client, passing the configured options $client = new iveeCrest\Client( iveeCrest\Config::getCrestBaseUrl(), iveeCrest\Config::getClientId(), iveeCrest\Config::getClientSecret(), iveeCrest\Config::getUserAgent(), iveeCrest\Config::getClientRefreshToken() ); //instantiate an endpoint handler $handler = new iveeCrest\EndpointHandler($client);
//show response data from verifyAccessToken call print_r($handler->verifyAccessToken());
//get regions endpoint print_r($handler->getRegions());
//get specific region endpoint print_r($handler->getRegion(10000002));
//gather all item groups (multipage response is gathered automatically) print_r($handler->getItemGroups());
//get all market orders for Tritanium in The Forge print_r($handler->getMarketOrders(34, 10000002));
DOWNLOAD The repository and full readme can be found here: https://github.com/aineko-m/iveeCrest
Feedback welcome!
iveeCore: The PHP library for industrial activities
|
Drachiel
Mercury LLC
37
|
Posted - 2015.03.11 19:53:34 -
[3] - Quote
Pulled in just the refresh token maker, and it seems to not work properly, in that Chrome gives a white screen upon redirect, and IE gives an HTTP 500. That's immediately after character select and the authorize button. IE's address bar still show's CCP's domain, while Chrome's shows the server's. Double checked callback, client, secret, checked for spaces at beginning/end of any, etc. |