<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://secrets.warcraftwatch.com/w/index.php?action=history&amp;feed=atom&amp;title=Template%3AApi%2Fdoc</id>
	<title>Template:Api/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://secrets.warcraftwatch.com/w/index.php?action=history&amp;feed=atom&amp;title=Template%3AApi%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://secrets.warcraftwatch.com/w/index.php?title=Template:Api/doc&amp;action=history"/>
	<updated>2026-05-06T20:13:23Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://secrets.warcraftwatch.com/w/index.php?title=Template:Api/doc&amp;diff=291&amp;oldid=prev</id>
		<title>imported&gt;Ddcorkum: A more sensible example</title>
		<link rel="alternate" type="text/html" href="https://secrets.warcraftwatch.com/w/index.php?title=Template:Api/doc&amp;diff=291&amp;oldid=prev"/>
		<updated>2021-08-11T23:43:48Z</updated>

		<summary type="html">&lt;p&gt;A more sensible example&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Creates a link to a specific API function or event page with the appropriate label.&lt;br /&gt;
&lt;br /&gt;
;t&lt;br /&gt;
: One of the following:&lt;br /&gt;
:* &amp;lt;code&amp;gt;t=a&amp;lt;/code&amp;gt; Global &amp;#039;&amp;#039;&amp;#039;A&amp;#039;&amp;#039;&amp;#039;PI function&lt;br /&gt;
:* &amp;lt;code&amp;gt;t=c&amp;lt;/code&amp;gt; &amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039;Var&lt;br /&gt;
:* &amp;lt;code&amp;gt;t=e&amp;lt;/code&amp;gt; &amp;#039;&amp;#039;&amp;#039;E&amp;#039;&amp;#039;&amp;#039;vent&lt;br /&gt;
:* &amp;lt;code&amp;gt;t=t&amp;lt;/code&amp;gt; API &amp;#039;&amp;#039;&amp;#039;T&amp;#039;&amp;#039;&amp;#039;ype&lt;br /&gt;
:* &amp;lt;code&amp;gt;t=o&amp;lt;/code&amp;gt; Widget (or UI&amp;#039;&amp;#039;&amp;#039;O&amp;#039;&amp;#039;&amp;#039;bject)&lt;br /&gt;
:* &amp;lt;code&amp;gt;t=w&amp;lt;/code&amp;gt; &amp;#039;&amp;#039;&amp;#039;W&amp;#039;&amp;#039;&amp;#039;idget method (or &amp;lt;code&amp;gt;t=wm&amp;lt;/code&amp;gt;)&lt;br /&gt;
:* &amp;lt;code&amp;gt;t=wh&amp;lt;/code&amp;gt; &amp;#039;&amp;#039;&amp;#039;W&amp;#039;&amp;#039;&amp;#039;idget scripts (or &amp;#039;&amp;#039;&amp;#039;h&amp;#039;&amp;#039;&amp;#039;andler)&lt;br /&gt;
:* &amp;lt;code&amp;gt;t=x&amp;lt;/code&amp;gt; &amp;#039;&amp;#039;&amp;#039;X&amp;#039;&amp;#039;&amp;#039;ML element&lt;br /&gt;
:* &amp;lt;code&amp;gt;t=m&amp;lt;/code&amp;gt; &amp;#039;&amp;#039;&amp;#039;M&amp;#039;&amp;#039;&amp;#039;acro command&lt;br /&gt;
:* Other advanced combinations exist using &amp;lt;code&amp;gt;?&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; in certain ways... see the examples below.&lt;br /&gt;
; First unnamed parameter&lt;br /&gt;
: A properly formatted name such as UnitAura, or UIObject:GetName or PLAYER_LOGIN plus optionally the following:&lt;br /&gt;
:* For function/method arguments, arguments as &amp;lt;code&amp;gt;(arg [, optArg])&amp;lt;/code&amp;gt;&lt;br /&gt;
:* For widget scripts other than events, arguments as &amp;lt;code&amp;gt;(self, ...)&amp;lt;/code&amp;gt;&lt;br /&gt;
:* For event payloads, payload as &amp;lt;code&amp;gt;: payload1 payload2 payload3&amp;lt;/code&amp;gt; with a colon at the start and space before each one&lt;br /&gt;
:* For XML attributes, &amp;lt;code&amp;gt; attr1. attr2. attr3.val3&amp;lt;/code&amp;gt; using a single space before each attribute and decimal after, and optionally specifying a value right after the decimal&lt;br /&gt;
; Second unnamed parameter&lt;br /&gt;
: Text to appear in lieu of the actual function/event/object name (but any parameters will still appear if they were defined)&lt;br /&gt;
&lt;br /&gt;
== Runtime API ==&lt;br /&gt;
{{seealso|API|Widget API}}&lt;br /&gt;
&lt;br /&gt;
;Functions (a or default)&lt;br /&gt;
:Truncates &amp;lt;code&amp;gt;API&amp;lt;/code&amp;gt; from the title, colours arguments&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{api|UnitAura(unit, index [, filter])}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
:{{api|UnitAura(unit, index [, filter])}}&lt;br /&gt;
&lt;br /&gt;
;Events (e)&lt;br /&gt;
:Colours the payload&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{api|PLAYER_ENTERING_WORLD: isInitialLogin, isReloadingUi|t=e}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
:{{api|PLAYER_ENTERING_WORLD: isInitialLogin, isReloadingUi|t=e}}&lt;br /&gt;
&lt;br /&gt;
;CVars (c)&lt;br /&gt;
:Links to the CVar page&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{api|farclip|t=c}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
:{{api|farclip|t=c}}&lt;br /&gt;
&lt;br /&gt;
;Widgets (o or o?)&lt;br /&gt;
:Links to the UIOBJECT page&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{api|Frame|t=o}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
:{{api|Frame|t=o}}&lt;br /&gt;
&lt;br /&gt;
;Widget methods (w or wm)&lt;br /&gt;
:Truncates &amp;lt;code&amp;gt;API&amp;lt;/code&amp;gt; from the title, reformats &amp;lt;code&amp;gt;:&amp;lt;/code&amp;gt;, colours arguments&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{api|Texture:SetTexture(&amp;quot;filename&amp;quot; or fileID[, &amp;quot;horizWrap&amp;quot;[, &amp;quot;vertWrap&amp;quot;[, &amp;quot;filterMode&amp;quot;]]])|t=w}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
:{{api|Texture:SetTexture(&amp;quot;filename&amp;quot; or fileID[, &amp;quot;horizWrap&amp;quot;[, &amp;quot;vertWrap&amp;quot;[, &amp;quot;filterMode&amp;quot;]]])|t=w}}&lt;br /&gt;
&lt;br /&gt;
;Widget handlers (wh)&lt;br /&gt;
:Links to the UIHANDLER page&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{api|OnClick(self, button, down)|t=wh}}, {{api|OnShow|t=wh}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
:{{api|OnClick(self, button, down)|t=wh}}, {{api|OnShow|t=wh}}&lt;br /&gt;
&lt;br /&gt;
== XML elements ==&lt;br /&gt;
{{seealso|XML}}&lt;br /&gt;
&lt;br /&gt;
;Start tag (x)&lt;br /&gt;
:Wraps the tag with &amp;lt;code&amp;gt;&amp;lt; &amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{api|Frame hidden.true frameStrata.LOW|t=x}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
:{{api|Frame hidden.true frameStrata.LOW|t=x}}&lt;br /&gt;
&lt;br /&gt;
;End tag (/x)&lt;br /&gt;
:Wraps the tag with &amp;lt;code&amp;gt;&amp;lt;/ &amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{api|EditBox|t=/x}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
:{{api|EditBox|t=/x}}&lt;br /&gt;
&lt;br /&gt;
;No children (x/)&lt;br /&gt;
:Wraps the tag with &amp;lt;code&amp;gt;&amp;lt; /&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{api|Button name.$parentButton text.|t=x/}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
:{{api|Button name.$parentButton text.|t=x/}}&lt;br /&gt;
&lt;br /&gt;
== API Types ==&lt;br /&gt;
{{seealso|API types|Template:Expand/API}}&lt;br /&gt;
&lt;br /&gt;
;Basic types (t or t?)&lt;br /&gt;
:Coloured orange, but &amp;#039;&amp;#039;not&amp;#039;&amp;#039; a hyperlink, and use t? to add optional/nilable question mark and tooltip&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{api|nil|t=t}}, {{api|Boolean|t=t}}, {{api|numBER|t=t}}, {{api|STRING|t=t}}, etc.&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
:{{api|nil|t=t}}, {{api|Boolean|t=t}}, {{api|numBER|t=t?}}, {{api|STRING|t=t?}}, etc.&lt;br /&gt;
&lt;br /&gt;
;Complex types (t or t?)&lt;br /&gt;
:Shortens the name for Constants, Enumerations and Structs, but otherwise makes an ordinary blue or red hyperlink to the page&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{api|Enum Club.ClubType|t=t}}, {{api|itemLink|t=t?}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
:{{api|Enum Club.ClubType|t=t}}, {{api|itemLink|t=t?}}&lt;br /&gt;
&lt;br /&gt;
; Inline Complex Type (i and i?)&lt;br /&gt;
: Alternate to a link, when an API type is defined &amp;#039;inline&amp;#039; on the same page.  (Such as an enum or struct used only by a single function.)&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{api|Enum QuestSession.QuestSessionPlayerDetails|t=i?|nil=Returns nil if there is no pending request from another party member.}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
: {{api|Enum QuestSession.QuestSessionPlayerDetails|t=i?|nil=Returns nil if there is no pending request from another party member.}}&lt;br /&gt;
&lt;br /&gt;
; Optional/Nilable (t?, o? and i?)&lt;br /&gt;
: Adds a customizable tooltip to indicate the parameter could be nil.  Use nil= to customize the default message.  All instances of &amp;#039;nil&amp;#039; will be shaded automatically in the tooltip.&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{api|boolean|t=t?|nil=Returns nil if the player does not exist.}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
: {{api|boolean|t=t?|nil=Returns nil if the player does not exist.}}&lt;br /&gt;
&lt;br /&gt;
== Macros API ==&lt;br /&gt;
&lt;br /&gt;
;Macro command (m)&lt;br /&gt;
: Turns a slash command into an appropriate link&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{api|t=m|/dump}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
: {{api|t=m|/dump}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;[[Category:Template documentation|{{PAGENAME}}]]&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>imported&gt;Ddcorkum</name></author>
	</entry>
</feed>