MediaWiki API 帮助

这是自动生成的MediaWiki API文档页面。

文档和例子:-{R|https://www.mediawiki.org/wiki/API:Main_page/zh}-

list=categorymembers (cm)

main | query | categorymembers
  • 此模块需要读取权限。
  • 此模块可作为发生器使用。
  • 来源:MediaWiki
  • 许可协议:GPL-2.0+

在指定的分类中列出所有页面。

参数:
cmtitle

要列举的分类(必需)。必须包括Category:前缀。不能与cmpageid一起使用。

cmpageid

要枚举的分类的页面 ID。不能与cmtitle一起使用。

类型:整数
cmprop

要包含的信息束:

ids
添加页面ID。
title
添加页面标题和名字空间ID。
sortkey
Adds the sortkey used for sorting in the category (hexadecimal string).
sortkeyprefix
Adds the sortkey prefix used for sorting in the category (human-readable part of the sortkey).
type
Adds the type that the page has been categorised as (page, subcat or file).
timestamp
Adds the timestamp of when the page was included.
值(以|分隔):ids、title、sortkey、sortkeyprefix、type、timestamp
默认:ids|title
cmnamespace

仅包含这些名字空间的页面。注意cmtype=subcatcmtype=file可能被使用,而不是cmnamespace=146

值(以|分隔):0、1、2、3、4、5、6、7、8、9、10、11、12、13、14、15、570、571、600、601、274、275、828、829
cmtype

包含的分类成员类型。当cmsort=timestamp被设置时会忽略。

值(以|分隔):page、subcat、file
默认:page|subcat|file
cmcontinue

当更多结果可用时,使用这个继续。

cmlimit

返回页面的最大数量。

不允许超过500个(对于机器人则是5,000个)。
类型:整数或max
默认:10
cmsort

要作为排序方式的属性。

以下值中的一个:sortkey、timestamp
默认:sortkey
cmdir

排序的方向。

以下值中的一个:asc、desc、ascending、descending、newer、older
默认:ascending
cmstart

开始列举的时间戳。只能与cmsort=timestamp一起使用。

类型:时间戳(允许格式
cmend

列举的结尾时间戳。只能与cmsort=timestamp一起使用。

类型:时间戳(允许格式
cmstarthexsortkey

开始列举的关键词,由cmprop=sortkey返回。不能与cmsort=sortkey一起使用。

cmendhexsortkey

结束列举的关键词,由cmprop=sortkey返回。不能与cmsort=sortkey一起使用。

cmstartsortkeyprefix

要开始列举的排序关键词前缀。只能与cmsort=sortkey一起使用。覆盖cmstarthexsortkey

cmendsortkeyprefix

Sortkey prefix to end listing before (not at; if this value occurs it will not be included!). Can only be used with cmsort=sortkey. Overrides cmendhexsortkey.

cmstartsortkey
不推荐使用。

请改用cmstarthexsortkey。

cmendsortkey
不推荐使用。

请改用cmendhexsortkey。

例子:
获取Category:Physics中的前10个页面。
api.php?action=query&list=categorymembers&cmtitle=Category:Physics
获取有关Category:Physics中的前10个页面的页面信息。
api.php?action=query&generator=categorymembers&gcmtitle=Category:Physics&prop=info