« Previous - 
    Version 17/18
    (diff) - 
    Next » - 
    Current version
    
    nimetu, 12/18/2013 01:50 pm 
    
    
Character¶
Access character information.
Base URL¶
- http://api.ryzom.com/character.php?apikey=key
 - http://api.ryzom.com/character.php?apikey[]=key1&apikey[]=key2
 
URL Parameters¶
apikey¶
	Character API key.
Cache Duration¶
<character> xml element has attributes created and cached_until (utc timestamp)
PHP Interface¶
ryzom_character_api($apikey)¶
	$apikey can be either string (single key) or array of strings.
On success, function returns associative array of SimpleXMLElement with $apikey as array index.
On failure, function returns boolean false.
XML structure¶
API is able to return information about multiple characters at once and so each <character> element is child of <ryzomapi> root element<ryzomapi>
<character apikey="key1" created="1387369332" modules="C01:P01" cached_until="1387369632">
....
</character>
<character apikey="key2" created="1387369332" modules="P01" cached_until="1387369632">
....
</character>
</ryzomapi>
Invalid key error¶
When provided key is invalid, then xml contains <error> element with code attribute.<character apikey="key1" created="1387369873">
<error code="404">invalid key</error>
</character>
Possible error codes are listed on API error codes.