Character
Version 14 (vl, 07/09/2009 12:12 pm)
| 1 | 1 | vl | h1. Character  | 
|---|---|---|---|
| 2 | 1 | vl | |
| 3 | 11 | vl | Access information from a character.  | 
| 4 | 11 | vl | |
| 5 | 13 | vl | If you create a website that require the use of the API Key, be sure to [[SecureAPIKey|secure the API Key]].  | 
| 6 | 13 | vl | |
| 7 | 1 | vl | h2. Base URL  | 
| 8 | 1 | vl | |
| 9 | 11 | vl | * http://atys.ryzom.com/api/character.php  | 
| 10 | 1 | vl | |
| 11 | 11 | vl | h2. URL Parameters  | 
| 12 | 1 | vl | |
| 13 | 11 | vl | h3. @key@  | 
| 14 | 1 | vl | |
| 15 | 11 | vl | The [[API Key]] of the character (partial or full)  | 
| 16 | 1 | vl | |
| 17 | 11 | vl | h3. @part@ (optional)  | 
| 18 | 1 | vl | |
| 19 | 11 | vl | The part you want to retrieve.  | 
| 20 | 1 | vl | |
| 21 | 11 | vl | Default value depends of the key. If you provide a partial key, @part@ will be @partial@. If you provide a full key, @part@ will be @full@.  | 
| 22 | 12 | kishan | Of course, you can not access the full profile with a partial key.  | 
| 23 | 1 | vl | |
| 24 | 11 | vl | * @partial@: Get basics information (mainly public information, smaller file).  | 
| 25 | 11 | vl | * @full@: Get all information (bigger file, use it only if you really need specific information that exists only in this profile).  | 
| 26 | 11 | vl | * @items@: Get items information related to the character.  | 
| 27 | 10 | vl | |
| 28 | 11 | vl | h2. Cache Duration  | 
| 29 | 10 | vl | |
| 30 | 11 | vl | The profile is cached for *1 hour*.  | 
| 31 | 10 | vl | |
| 32 | 11 | vl | h2. PHP Interface  | 
| 33 | 11 | vl | |
| 34 | 11 | vl | h3. @ryzom_character_simplexml($key, $part='')@  | 
| 35 | 11 | vl | |
| 36 | 11 | vl | Get a @$key@ (partial or full) and a @$part@ and returns a "simplexml":http://fr3.php.net/manual/en/book.simplexml.php object containing the character information.  | 
| 37 | 11 | vl | |
| 38 | 14 | vl | h3. @ryzom_character_xmlgz($key, $part='')@  | 
| 39 | 14 | vl | |
| 40 | 14 | vl | Get a @$key@ (partial or full) and a @$part@ and returns a gzipped xml containing the character information.  | 
| 41 | 14 | vl | |
| 42 | 11 | vl | h3. @ryzom_character_valid_key($key, &$uid, &$slot, &$full)@  | 
| 43 | 11 | vl | |
| 44 | 11 | vl | Returns true if the key seems valid (or false if not). It doesn't do server check, but only basic checks.  | 
| 45 | 11 | vl | |
| 46 | 12 | kishan | This function sets the user id and slot for this key. @$full@ will be @true@ if the key give full access to the character.  | 
| 47 | 11 | vl | |
| 48 | 1 | vl | h2. Real Examples  | 
| 49 | 1 | vl | |
| 50 | 11 | vl | If you have a website that use this Ryzom API, tell it in the forum and we'll add it.  |