MediaWiki API 帮助
这是自动生成的MediaWiki API文档页面。
文档和例子:-{R|https://www.mediawiki.org/wiki/Special:MyLanguage/API:Main_page}-
list=listwikis (sw)
- 此模块需要读取权限。
- 来源:ShoutWiki API
- 许可协议:CC0-1.0
List all available wikis on ShoutWiki
参数:
- swwid
Unique, wiki-specific ID number; use this when you want to get info about a specific wiki and you know its ID number
- 类型:整数
- swdeleted
Also list deleted wikis (optional)
- 类型:整数
- 值必须介于0和1之间。
- swfrom
Get all wikis with ID that is equal to or greater than this value
- 类型:整数
- 值必须不少于1。
- swto
Get all wikis with ID that is equal to or lower than this value
- 类型:整数
- 值必须不少于1。
- swcountonly
Return only the amount of wikis
- 类型:整数
- 值必须不少于1。
- swlang
Wiki language code (i.e. en for English, fi for Finnish, etc.)
- swlimit
Get information about this many wikis at once
- 类型:整数或max
- 值必须介于1和500之间。
- 默认:100
- swstart
The timestamp to start enumerating from
- 类型:时间戳(允许格式)
- swend
The timestamp to end enumerating
- 类型:时间戳(允许格式)
- swdir
列举的方向:
- newer
- 最早的优先。注意:swstart应早于swend。
- older
- 最新的优先(默认)。注意:swstart应晚于swend。
- 以下值中的一个:newer、older
- 默认:older
例子:
- Get all active wikis
- api.php?action=query&list=listwikis [在沙盒中打开]
- Also include deleted wikis in the listing
- api.php?action=query&list=listwikis&swdeleted=1 [在沙盒中打开]
- Get information about the wiki whose ID is #177
- api.php?action=query&list=listwikis&swwid=177 [在沙盒中打开]
- Get all (active) wikis with IDs ranging from 100 to 150
- api.php?action=query&list=listwikis&swfrom=100&swto=150 [在沙盒中打开]
- Show all Finnish (fi) wikis whose IDs range between 10 to 50
- api.php?action=query&list=listwikis&swfrom=10&swto=50&swlang=fi [在沙盒中打开]
- Show the total amount of active wikis
- api.php?action=query&list=listwikis&swcountonly=1 [在沙盒中打开]
- Show the total amount of all wikis ever, including deleted ones
- api.php?action=query&list=listwikis&swactive=1&swcountonly=1 [在沙盒中打开]