Difference between revisions of "Template:API-head"
Jump to navigation
Jump to search
Template documentation
Mediawiki>Shirayuki m |
Joelmartin (talk | contribs) m (Undo revision 10248 by Joelmartin (talk)) Tag: Undo |
||
(8 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
− | + | ||
− | </noinclude>{{#switch: | + | </noinclude>{{#switch: |
| = | | = | ||
<table {{Databox-layout|style=margin:{{dir|{{pagelang}}|5px 12px 5px 0|5px 0 5px 12px}};}}><tr> | <table {{Databox-layout|style=margin:{{dir|{{pagelang}}|5px 12px 5px 0|5px 0 5px 12px}};}}><tr> | ||
<th {{Databox-head}}>{{{module|{{BASEPAGENAME}}}}}</th> | <th {{Databox-head}}>{{{module|{{BASEPAGENAME}}}}}</th> | ||
</tr><tr> | </tr><tr> | ||
− | <td colspan="2" style="text-align:center; padding:0.3em; font-style:italic">{{{description|}}}{{#switch: {{{generator|}}} |#default=<br /><small | + | <td colspan="2" style="text-align:center; padding:0.3em; font-style:italic">{{{description|}}}{{#switch: {{{generator|}}} |#default=<br /><small> This module cannot be used as a <tvar|generator>{{ll|API:generator|nsp=0}}.</small>|yes=<br /><small> This module can be used as a <tvar|generator>{{ll|API:generator|nsp=0}}.</small>}}</td> |
</tr><tr> | </tr><tr> | ||
− | <th | + | <th> Prefix</th> |
− | <td>{{#switch: {{lc:{{{prefix|none}}}}} |none='' | + | <td>{{#switch: {{lc:{{{prefix|none}}}}} |none='' none'' |#default={{{prefix}}} }}</td> |
</tr><tr> | </tr><tr> | ||
− | <th | + | <th> Required rights</th> |
− | <td>{{#switch: {{lc:{{{rrights|none}}}}} |none='' | + | <td>{{#switch: {{lc:{{{rrights|none}}}}} |none='' none'' |#default={{{rrights}}} }}</td> |
</tr><tr> | </tr><tr> | ||
− | <th | + | <th> Post only?</th> |
− | <td>{{#switch: {{lc:{{{postonly|no}}}}} |no= | + | <td>{{#switch: {{lc:{{{postonly|no}}}}} |no= No |#default= Yes }}</td> |
</tr><tr> | </tr><tr> | ||
− | <th | + | <th> Generated help</th> |
− | <td>[//{{{site|www.mediawiki.org}}}/w/api.php?action=help&modules={{#ifeq: {{lc:{{{query|{{{generator|}}}}}}}} | yes |query+}}{{lc:{{{module|{{IfNotTranslation|{{PAGENAMEE}}|{{BASEPAGENAMEE}}}}}}}}} | + | <td>[//{{{site|www.mediawiki.org}}}/w/api.php?action=help&modules={{#ifeq: {{lc:{{{query|{{{generator|}}}}}}}} | yes |query+}}{{lc:{{{module|{{IfNotTranslation|{{PAGENAMEE}}|{{BASEPAGENAMEE}}}}}}}}} Current]</td> |
{{#if:{{{version|}}}| | {{#if:{{{version|}}}| | ||
</tr><tr> | </tr><tr> | ||
− | <th | + | <th> Version added</th> |
<td>{{MW version|version={{{version|?}}}|compact=yes|comment=and after}}</td> | <td>{{MW version|version={{{version|?}}}|compact=yes|comment=and after}}</td> | ||
}} | }} | ||
Line 27: | Line 27: | ||
{{#ifeq:{{{templatemode|}}}|nocat| | {{#ifeq:{{{templatemode|}}}|nocat| | ||
|{{#ifeq:{{{generator|}}}|yes | |{{#ifeq:{{{generator|}}}|yes | ||
− | |[[Category:MediaWiki API generators | + | |[[Category:MediaWiki API generators]]}} |
}}</includeonly> | }}</includeonly> | ||
| #default= | | #default= | ||
Line 34: | Line 34: | ||
{{Documentation|content= | {{Documentation|content= | ||
− | + | ||
− | == Usage == | + | == Usage == |
− | + | ||
{{clear}} | {{clear}} | ||
Displays a box providing more information about an API module. | Displays a box providing more information about an API module. | ||
See also {{tl|ApiEx}} which transcludes the generated API documentation | See also {{tl|ApiEx}} which transcludes the generated API documentation | ||
− | + | ||
− | == Examples == | + | == Examples == |
− | + | ||
{{API-head|templatemode=nocat | {{API-head|templatemode=nocat | ||
|version=1.11 | |version=1.11 | ||
Line 85: | Line 85: | ||
{{clear}} | {{clear}} | ||
}} | }} | ||
− | [[Category:API templates | + | [[Category:API templates]] |
</noinclude> | </noinclude> |
Latest revision as of 17:13, 21 December 2019
API-head | |
---|---|
generator>API:generator . | |
Prefix | none |
Required rights | none |
Post only? | No |
Generated help | Current |

Usage
Displays a box providing more information about an API module.
See also {{ApiEx}} which transcludes the generated API documentation
Examples
API-head | ||
---|---|---|
Perform a full text search This module can be used as a <tvar |
||
Prefix | sr | |
Required rights | none | |
Post only? | No | |
Generated help | Current | |
Version added |
|
{{API-head |version=1.11 |prefix=sr |rrights=None |postonly=No |description=Perform a full text search |generator=yes }}
edit | ||
---|---|---|
generator>API:generator . | ||
Prefix | ||
Required rights | edit | |
Post only? | Yes | |
Generated help | Current | |
Version added |
|
{{API-head |module=edit |version=1.13 |prefix= |rrights=edit |postonly=Yes |description= |query=no }}