Difference between revisions of "Ryzom API/Guild icon"

From EncyclopAtys

Jump to: navigation, search
(Created page with "<noinclude>__TOC__</noinclude> Retrieves a guild icon === Usage === <base URL>/guild_icon.php?icon=:icon&size=:size ==== URL Parameters ==== ;icon : :It's a raw 64bit numb...")
 
m (typo)
Line 26: Line 26:
 
$url = ryzom_guild_icon_url("4505559206514131", 'b');
 
$url = ryzom_guild_icon_url("4505559206514131", 'b');
 
echo "<img src=\"$url\" alt=\"\">";</syntaxhighlight>
 
echo "<img src=\"$url\" alt=\"\">";</syntaxhighlight>
<noinclude>[[Category:Ryzom API|{{subst:SUBPAGENAME}] ]]</noinclude>
+
<noinclude>[[Category:Ryzom API|Guild icon]]</noinclude>

Revision as of 08:52, 23 July 2020

Retrieves a guild icon

Usage

<base URL>/guild_icon.php?icon=:icon&size=:size

URL Parameters

icon 
It's a raw 64bit number from Character xml or Guild list xml file
size (optional)
s (default) Small guild icon (32x32 pixels)
b Big guild icon (64x64 pixels)

Cache Duration

It's cached for ever. Since the icon is unique and never changes. For a specific icon, it'll always return the same image.

PHP interface

ryzom_guild_icon_url($icon, $size)

Returns a string that contains the url to display a guild icon.

<?php
require_once "ryzomapi_lite.php";

$url = ryzom_guild_icon_url("4505559206514131", 'b');
echo "<img src=\"$url\" alt=\"\">";