open All Channels
seplocked EVE Technology Lab
blankseplocked ALE Issue: Trying to get character name from ID
This thread is older than 90 days and has been locked due to inactivity.

Author Topic

Celestine Santora
Posted - 2011.04.19 18:49:00 - [1]

I'm new to using ALE. All I want to do here is get a character's name from their ID and store it in a variable. I wrote this:

$char = $this->ale->eve->CharacterName($id);

$id is set to whatever charID I'm trying to resolve (in my testing I'm using 632875585 which is this character's ID). When the script is run I get "Fatal error: Uncaught exception 'AleExceptionEVEUserInput' with message 'Invalid ID found in ID list. Please ensure input is a comma seperated list of valid 32-bit non-negative integers."

I've tried passing it both as a string and as an integer but the result is the same

Maybe I'm missing something but ALE doesn't seem to be documented very well Sad

Biotronics Inc.
The Initiative.
Posted - 2011.04.22 23:41:00 - [2]

ALE is very very simple:

$ale = AleFactory::getEVEOnline();
$ale->setCredentials($account_id, $api_key);

now you are ready. ALE follows the same outlining, the Api uses:

if you want to fetch char/characterSheet.xml.aspx, then use:

$characterSheet = $ale->char->CharacterSheet();

if you want to fetch account/accountStatus.xml.aspx, then use:

$accountStatus = $ale->account->AccountStatus();

Same applies for ALL the results:
ALE returns a simple xml object, which means, you cann access every value just like a class.

compared to the apidoku of CharacterSheet:
you can use:

$characterSheet->result (which will be another object according to the xml outlining)

so you are looking for

and to be "complete" in my quick-docu Cool

if the api result contains a rowset, that rowset will be transformed into an array, containing
objects of the rows:

i.e.: for skills, you can use:

$skills = $characterSheet->result->skills;
foreach ($skills AS $skill){
$typeID = $skill->typeID;
$level = $skill->level;
$sp = $skill->skillpoints;

and so on, and so forth.

Das Orakel
Posted - 2011.04.23 07:18:00 - [3]

$ale = AleFactory::getEvEOnline();
$characterIDs = '1188435724,797400947,632875585';

$params = array('IDs' => $characterIDs);
$char = $ale->eve->CharacterName($params , ALE_AUTH_NONE); //ALE_AUTH_NONE forces library to bypass credentials


This thread is older than 90 days and has been locked due to inactivity.


The new forums are live

Please adjust your bookmarks to

These forums are archived and read-only