EVEAPI

From EVEDev
Jump to: navigation, search
Api.pngAPI Resources - Category Home - API Libraries - API Usage Examples - API Method Reference
EVEAPI
Maintainer: xb95
Stable release: 0.02
Development release:
OS: Platform independent, Perl required
License: Perl
Website: http://www.xb95.com/svn/eveapi/

Contents

Description

This is the original EVE API client written by the original author of the EVE API. It is designed to have minimal knowledge of the actual methods and content the API provides, to make it somewhat future-proof. It has only required small cosmetic improvements over the whole lifetime of the EVE API.

Installation

Copy the EVEAPI.pm into any directory your perl interpreter checks for modules.

Documentation

There is some basic documentation in the module (POD format), and there is a test script which demonstrates how to use it included in the distribution.

Example

Brief:

 
perl -MEVEAPI -e 'printf("sysID:%s\040staID:%s\040\"%s\"\n",$_->solarSystemID,$_->stationID,$_->stationName)for@{EVEAPI->new(userID=>123,apiKey=>"abc",version=>2)->eve->ConquerableStationList->load->outposts}'
 

Verbose:

 
# build an API object for this user
my $api = EVEAPI->new( userID => 123, apiKey => "abc", version => 2 );
 
# get contents of /account/Characters.xml.aspx with the above credentials
my $characters = $api->account->Characters->load;
 
# iterate over the 'characters' rowset (see the XML)
foreach my $char ( @{ $characters->characters } ) {
    # each row in the rowset contains the four columns listed here
    printf "    %s [%d] in %s [%d]\n",
           $char->name, $char->characterID,
           $char->corporationName, $char->corporationID;
}
 

Output:

Character Name [12345] in Corporation Name [67890]
Character 2 [12346] in Corporation 2 [67891]

Links

Retrieved from "?title=EVEAPI&oldid=3684"
Personal tools