Time
Version 12 (vl, 05/28/2009 03:42 pm)
| 1 | 9 | vl | h1. Time |
|---|---|---|---|
| 2 | 1 | vl | |
| 3 | 10 | vl | This Ryzom API gets the time in the game servers (shards). |
| 4 | 9 | vl | |
| 5 | 1 | vl | h2. Base URL |
| 6 | 1 | vl | |
| 7 | 9 | vl | * http://atys.ryzom.com/api/time.php |
| 8 | 6 | vl | |
| 9 | 9 | vl | h2. URL Parameters |
| 10 | 1 | vl | |
| 11 | 9 | vl | h3. @shardid@ |
| 12 | 1 | vl | |
| 13 | 9 | vl | The id of the shard. Can be @ani@, @lea@ or @ari@. |
| 14 | 1 | vl | |
| 15 | 9 | vl | h3. @format@ (optional) |
| 16 | 1 | vl | |
| 17 | 9 | vl | Default @format@ is @raw@. |
| 18 | 1 | vl | |
| 19 | 11 | kishan | * @raw@: Returns the tick. The server tick is a 32 bit integer that increases by one every 100 milliseconds ("example":http://atys.ryzom.com/api/time.php?shardid=ani&format=raw). |
| 20 | 11 | kishan | * @txt@: Returns a homine-readable string ("example":http://atys.ryzom.com/api/time.php?shardid=ani&format=txt). |
| 21 | 9 | vl | * @xml@: Returns an xml file that contains all shard time information ("example":http://atys.ryzom.com/api/time.php?shardid=ani&format=xml). |
| 22 | 1 | vl | |
| 23 | 9 | vl | h2. Cache Duration |
| 24 | 1 | vl | |
| 25 | 9 | vl | The data is cached during *1 minute*. |
| 26 | 1 | vl | |
| 27 | 9 | vl | h2. PHP Interface |
| 28 | 1 | vl | |
| 29 | 9 | vl | h3. @ryzom_time_tick($shardid)@ |
| 30 | 9 | vl | |
| 31 | 9 | vl | Returns the tick of the shard identified by @$shardid@. |
| 32 | 9 | vl | |
| 33 | 9 | vl | h3. @ryzom_time_txt($rytime)@ |
| 34 | 9 | vl | |
| 35 | 9 | vl | @$rytime@ is the array returned by @ryzom_time_array@. |
| 36 | 11 | kishan | Returns the time in homine-readable string. |
| 37 | 9 | vl | |
| 38 | 9 | vl | h3. @ryzom_time_xml($rytime)@ |
| 39 | 9 | vl | |
| 40 | 9 | vl | @$rytime@ is the array returned by @ryzom_time_array@. |
| 41 | 9 | vl | Returns the time in an xml format. |
| 42 | 9 | vl | |
| 43 | 9 | vl | h3. @ryzom_time_array($tick, $shardid)@ |
| 44 | 9 | vl | |
| 45 | 9 | vl | Creates and returns an array containing all information about the time. |
| 46 | 9 | vl | |
| 47 | 1 | vl | h2. Real Examples |
| 48 | 1 | vl | |
| 49 | 9 | vl | If you have a website that use this Ryzom API, tell it in the forum and we'll add it. |
| 50 | 12 | vl | |
| 51 | 12 | vl | * Unversal Widget (for windows, netvibes, igoogle,...) http://eco.netvibes.com/widgets/305491/ryzom-time |