Difference between revisions of "Ryzom API/Guilds"
From EncyclopAtys
m (typo) |
|||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
− | <noinclude>__TOC__</noinclude> | + | <noinclude>{{Trad|DE=Ryzom API/Gilden|EN=Ryzom API/Guilds|palette=api |H=1}}__TOC__</noinclude> |
Displays the list of all guilds. | Displays the list of all guilds. | ||
Latest revision as of 10:43, 27 May 2023
Displays the list of all guilds.
Usage
<base URL>/guilds.php
Cache Duration
Returned XML has <cache> element with attributes created and expire (utc timestamp)
XML structure
<guilds> <cache created="1387371064" expire="1387374664"/> <shard>atys</shard> <guild> <gid>105906182</gid> <name>Atrium</name> <race>Fyros</race> <icon>575080624687965565</icon> <creation_date>131736955</creation_date> <description>Here you are the Keeper, your destiny is to make the rules to be respected</description> </guild> <guild> .... </guild> </guilds>
PHP interface
ryzom_guildlist_api()
Function returns SimpleXMLElement object on success or boolean false on error.
<?php require_once "ryzomapi_lite.php"; $guilds = ryzom_guildlist_api(); if ($guilds !== false) { echo '<pre>'; foreach($guilds->guild as $guild) { $gid = (int)$guild->gid; $name = htmlspecialchars($guild->name); echo "{$gid} {$name}\n"; } echo '</pre>'; } else { echo "API failure";