Aion API by Les Castors Joyeux

API update : march 18th, 2010 - Documentation update : april 8th, 2010

Content

  1. Introduction
  2. What's new ?
  3. Features
  4. Howto
  5. Examples
  6. Full integration's example
  7. Known bugs
  8. Contact

Introduction

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.

What's new ?

april 27th, 2011

API

june 16th, 2010

API

april 8th, 2010

Documentation

march 23th, 2010

Documentation

march 19th, 2010

API

march 15th, 2010

Documentation

march 13th, 2010

Documentation

march 12th, 2010

API

march 4th, 2010

API

february 24th, 2010

API

february 23th, 2010

Documentation

API

february 22th, 2010

Documentation

Features

Server's list

Here is the available data for servers. The tag is in brackets. Servers are in tag servers :

Example

Here is the european server's list : European servers. Here is the american server's list : American servers

Legion's data

Here is the available data for legion. The tag is in brackets. Legion is in tag legion :

Example

Here is an example of an XML file for the legion Les Castors Joyeux : XML file of Les Castors Joyeux

Character's data

Here is the available data for character. The tag is in brackets. Character is in tag character :

Example

Here is an example of XML file of my main character Androctonus : XML file of Androctonus

Smart character's search

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 :

Example

Here is an example of a partial search on my character : Search for "Andr".

Howto

All you have to do is to call this url : http://aionapi.castorsjoyeux.fr/en/aionAPI.php with the right parameters.

Optional parameters :

Server's list

Mandatory parameters :

Legion's data

Mandatory parameters :

Character's data

Mandatory parameters :

Smart character's search

Mandatory parameters :

Examples

Get legion's name using PHP :


<?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;
	}
?>

Get member's list of a legion using PHP :


<?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";
		}
	}
?>

Get the name and the level of a character in PHP :


<?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;
	}
?>

Full integration's example

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 :

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 ;)

Known bugs

Contact

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 :)