API update : march 18th, 2010 - Documentation update : april 8th, 2010
Aion API is an API with which you can fetch data from legion or character. The output data is in XML format.
You can see this API in action on Castors Joyeux website.
If you use this API, please put a tiny link on your webpage (something like <a href="http://aionapi.castorsjoyeux.fr/en>Powered by Aion API</a>) in order to make this API more popular.
Here is the available data for servers. The tag is in brackets. Servers are in tag servers :
server) : Server's information name) : Server's nameid) : Numerical identifierHere is the european server's list : European servers. Here is the american server's list : American servers
Here is the available data for legion. The tag is in brackets. Legion is in tag legion :
name) : Full name of the legion.server) : The server where the legion is.level) : Legion's level (1, 2, 3).rank) : Legion's rank in TOP 100.race) : Race of the legion (Elyos/Asmodians).members_count) : Members count of the legion (max depends on legion's level).contrib) : Total of abyssal points accumulated by the legion.members) : displays the list of the members name) : Nickname of the member.grade) : The grade of the member (Brigade general, Centurion, Legionary).level) : member's level (1-50).class) : the class of the character (Cleric, Templar, Sorcerer, etc.).grade_img) : URL of the official grade's picture.class_img) : URL of the official class's picture.detail) : URL of the official member sheet.Here is an example of an XML file for the legion Les Castors Joyeux : XML file of Les Castors Joyeux
Here is the available data for character. The tag is in brackets. Character is in tag character :
name) : name of the character.level) : level of the character (1-50).title) : character's title. Reflects gender of the character for languages who care.race) : character's race (Elyos/Asmodians).class) : character's class (Cleric, Sorcerer, Ranger, etc.).abyss_pts) : actual abyssal points total of the character.victims) : total of the character's victims.gender) : character\s gender (M/F).rank) : abyssal rank of the character.kills_day) : count of the daily's victim of the character.kills_week) : count of the weekly's victim of the character.pts_day) : abyssal points of the day.pts_week) : abyssal points of the week.hp) : total amount of health of the character.mp) : total amount of mana of the character.attack) : physical attack stat.critical) : critical stat.accuracy) : accuracy stat.magic_boost) : magic boost stat.resist_magic) : resist magic stat.attack_speed) : attack speed stat.physical_def) : physical defense statparry) : parry stat.magic_acc) : magical accuracy stat.evasion) : evasion stat.move_speed) : movement speed stat.shield_def) : shield defense stat.stigmas) : stigmas' list
name) : name of the stigma.Here is an example of XML file of my main character Androctonus : XML file of Androctonus
It is now possible to do a partial search on a character's name. It's usefull when you are not really sure of the spelling or if the name is too strange (many repeated letters, etc.). The proposal list is limited to 10 suggestions. The list is in tag characters :
character) : Proposal for this character name) : Character's nameHere is an example of a partial search on my character : Search for "Andr".
All you have to do is to call this url : http://aionapi.castorsjoyeux.fr/en/aionAPI.php with the right parameters.
Optional parameters :
lang (fr by default) : the language in which you want data. Actually you can obtain data from european servers (fr, de, uk) or american server (na).Mandatory parameters :
serverInfo : la seule présence de la variable suffit à obtenir la liste des serveurs. Préciser un nom ou ID donnera uniquement le détail du serveur en question.Mandatory parameters :
serverID : server's ID. To get it you need to go to the official website and look at the URL : http://uk.aiononline.com/livestatus/character-legion/search?serverID=34&guildID=9618. ID server is the number which follows serverID (34 in this example).legionID : legion's ID. Still in URL, there is guildID, it's the following number (9618 in this example).Mandatory parameters :
serverID : name of the server (eg. Perento). One day it might be possible to give the ID instead.charID : name of character (eg. Androctonus). One day it might be possible to give the ID instead.Mandatory parameters :
serverID : name of the server (eg. Perento). One day it might be possible to give the ID instead.charID : name of character (eg. Androctonus). One day it might be possible to give the ID instead.suggest : la seule présence de la variable suffit à entrer en mode suggestion.
<?php
$xmlDoc = new DOMDocument();
$xmlDocLoaded = $xmlDoc->load('http://aionapi.castorsjoyeux.fr/aionAPI.php?serverID=34&legionID=9618&lang=fr');
if ($xmlDocLoaded) {
$legionName = $xmlDoc->getElementsByTagName("name")->item(0)->nodeValue;
echo "Nom de la légion : ".$legionName;
}
?>
<?php
$xmlDoc = new DOMDocument();
$xmlDocLoaded = $xmlDoc->load('http://aionapi.castorsjoyeux.fr/aionAPI.php?serverID=34&legionID=9618&lang=fr');
if ($xmlDocLoaded) {
foreach ($xmlDoc->getElementsByTagName("member") as $member) {
echo $member->getElementsByTagName("name")->item(0)->nodeValue."\n";
}
}
?>
<?php
$xmlDoc = new DOMDocument();
$xmlDocLoaded = $xmlDoc->load('http://aionapi.castorsjoyeux.fr/aionAPI.php?serverID=Perento&charID=Androctonus&lang=fr');
if ($xmlDocLoaded) {
$name = $xmlDoc->getElementsByTagName("name")->item(0)->nodeValue;
$level = $xmlDoc->getElementsByTagName("level")->item(0)->nodeValue;
echo $name.'.'.$level;
}
?>
Download example package : fullExample.zip
I wish to make the use of this API easier for you. That's why I created this simple example, based on what I've done for Castors Joyeux website. To test it with your legion, just modify :
$serverName with the name of your legion's server. Do the same with your legion's ID in $legionID. You can also change the language ($language) to fit your language. If you want to use this example as the base for you real integration, search for TODOs (in title and summary) and replace them with what best fits.That's all. Normally, if you upload the modified package to your server you should see a simple table with your legion's data inside. Now, just modify the css to fit your website's design. If you could keep the tiny link to my API (as in the example), it would grateful. It will help my API to be more popular and will improve my SEO ;)
This API was created first for Castors Joyeux website and is free for all. I have many ideas of features but as nobody else uses it, I will certainly not develop them for the moment. However if you want to give me ideas, any suggestions or congratulate me (will never happen :D), you can send me mail : androctonus@castorsjoyeux.fr. Besides I would like to apologize for my bad english. If someone is so shocked that he wants to help me by offering better translation, it would be great :)