Template:APIDoc

This is the current revision of this page, as edited by Alex (talk | contribs) at 22:10, 11 October 2024 (Created page with "<includeonly>{{#invoke:APIDoc|main}}</includeonly> <noinclude>{{/doc}}</noinclude>"). The present address (URL) is a permanent link to this version.

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Template documentation
This documentation is transcluded from Template:APIDoc/doc. [edit] [history] [purge]
Template:APIDoc invokes function main in Module:APIDoc using Lua.

The APIDoc template generates a table to describe a module's public function.

{{APIDoc
|funcName = 
|funcDesc = 
|arg1 = 
|type1 = 
|desc1 = 
|returnType = 
|returnDesc = 
}}

Usage

No arguments, no return value

someFunction()
This function does something.
Returns--


No arguments, return value

someFunction()
This function does something.
TypeDescription
ReturnstableA table of data.


One argument, no return value

someFunction(a)
This function does something.
ArgumentTypeDescriptionOptional
anumberA number of some kind.
Returns--


Multiple arguments, return value

someFunction(a, b)
This function does something.
ArgumentTypeDescriptionOptional
anumberA number of some kind.
bstringA string of some kind.
ReturnstableA table of data.


Arguments

Argument Optional?
funcName The function's name
Values Any text
funcDesc The function's description
Values Any text
arg1
arg2
...argN
An argument's name
Values Any text
type1
type2
...typeN
An argument's type
Values Any text
desc1
desc2
...descN
An argument's description
Values Any text
optional1
optional2
...optionalN
If an argument is optional
Values Yes or unset Default No
returnType The function's return type
Values Any text
returnDesc The function's return value description
Values Any text