Download the PHP package 3rdpartyeve/phealng without Composer
On this page you can find all versions of the php package 3rdpartyeve/phealng. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download 3rdpartyeve/phealng
More information about 3rdpartyeve/phealng
Files in 3rdpartyeve/phealng
Package phealng
Short Description PHP Eve Api Library, a simple PHP lib to access the EVE Online API
License MIT
Homepage https://github.com/3rdpartyeve/phealng
Informations about the package phealng
DEPRECATED AND ARCHIVED
CCP recently (2018) ended the XML API, thus there isn't really a point in continuing this library. This repository has been archived in case you ever need access to the code again, but if you read this its very likely that this library is not what you have been looking for.
regards, PP
PhealNG
Copyright (C) 2012 - 2018 by Peter Petermann All rights reserved.
PhealNG is a refactoring of Pheal to meet more modern PHP development standards, for example to support namespaces and PSR-0 classloading.
LICENSE
Pheal is licensed under a MIT style license, see LICENSE.txt for further information
FEATURES
- does not need to change when EVE API changes
REQUIREMENTS
- PHP 5.4+
INSTALLATION
composer
PhealNG will be available as package 3rdpartyeve/phealng through packagist on composer http://getcomposer.org, if you don't know composer yet, now is a good time to read up on it.
You can also download it from github, but life is so much easier with composer!
PhealNG Usage
Prequesites
composer.json
In your project root create a file named composer.json, containing the following json data:
Note: replace ~2.0 by what ever version you want to use, you can use dev-master but it will likely be unstable.
Hint: PhealNG follows semantic versioning http://semver.org
composer
Composer is a tool intended to manage dependencies in PHP applications. If you haven't installed composer yet, checkout the composer installation here: http://getcomposer.org/doc/00-intro.md#installation-nix
run composer
Now in your projects root, run the following command, which will download PhealNG for you and update the vendor/autoload.php
the most basic PhealNG Script
this is a very basic example, which should be able to run on its own (with only pheal as dependency) obviously, if you use a framework, some of the steps might look different, for example if you use symfony2, you might already have composer working and already have the autoloading required.
PhealNG basically builds the request by the scope and the method called, in this example the scope used is "server" and the API page requested is ServerStatus.xml.aspx
For more information on the API Pages available, refer to http://wiki.eve-id.net/APIv2_Page_Index
a bit more complex script
most API Pages require an API key with a certain set of rights available, in this example we will request char/CharacterSheet.xml.aspx, which requires a characterID passed as parameter, aswell as an API Key that contains the AccessMask 8.
Configuration Options
In the previous example there is already two configuration options introduced, however there are quite a few more. For more information it is worth reading the contents of the vendor/3rdpartyeve/phealng/lib/Pheal/Core/Config.php file.
Caching
CCP wants you to respect their cache timers, meaning some of the API Pages will return the same data for a specific while, or worse an error. If you use one of the available caching implementations, pheal will do the caching transparently for you. Pheal offers this implementations out of the box:
- NullStorage (no caching!)
- FileStorage
- ForcedFileStorage
- HashedNameFileStorage
- MemcacheStorage
- MemcachedStorage
- RedisStorage
- PdoStorage (database caching)
Please refer to the api docs of the classes for more information.
PdoStorage (database caching)
In order to cache the request in the database you have to create the table first.
for a MySQL DB you can use this snippet as an example:
Logger
Pheal comes with 3 Loggers that can be used, the default one being the Null Logger \Pheal\Log\NullStorage, which will not log anything. Then there is the Legacy Logger \Pheal\Log\FileStorage, which can log into files (see its code for more information). Consider that one deprecated. And then there is the PsrLogger, which is basically a class that can wrap around any existing PSR-3 compatible logger, so Pheal can use your frameworks logger to spit out its logging information.
Usage Example:
Problems / Bugs
if you find any problems with PhealNG, please use githubs issue tracker at https://github.com/3rdpartyeve/phealng/issues
TODO
- more documentation
LINKS
CONTACT
- Peter Petermann [email protected]
Contributors
- Daniel Hoffend (Wollari)
ACKNOWLEDGEMENTS
- PhealNG is based on the now deprecated Pheal
- PhealNG is written in PHP
- Pheal is based on EAAL
- Pheal is build for use of the EVE Online API