Template:ApiEx/sv

{{documentation|content=

Använd den här mallen på API-dokumentationssidor för att formatera ett exempel av en API-begäran.

Notera som ett alternativ, {{tl|Api help}} infogar lokaliserad API-dokumentation genererad från källkod som normalt sett har API-exempel i sig.

User:SPage (WMF)/ApiEx utility skapar en $-mallkallan om du klipper in en api.php-URL i den.

Parameters

 * desc - API request description
 * lang - two-letter code for the wiki language. 'en' by default.
 * site - full URL of site to use in example (e.g., www.mediawiki.org). Overrides lang parameter.
 * p1-p9 - parameter groups, each containing either one param=value pair or multiple pairs each separated by an ampersand (&), e.g. p3=param=value&paramB=valueBbbb
 * result - the result of the query execution. Add the template, preview, click the api.php link, and copy and paste the API response into the template as | result=
 * post - a "list" of ApiEx/Post objects, to generate a post table
 * collapse - set to "no" to stop "result" and "post" sections from being collapsed with Collapse top/Collapse bottom
 * apisandbox - whether to show a "[try in ApiSandbox]" link that loads the example API query parameters into Special:ApiSandbox. Default is 1, add | apisandbox=0 to not show this link.

Example
}}