MediaWiki API 說明

此頁為自動產生的 MediaWiki API 說明文件頁面。

說明文件與範例:https://www.mediawiki.org/wiki/API

list=allrevisions (arv)

main | query | allrevisions
  • 此模組需要讀取權限。
  • 此模組可作為產生器使用。
  • 來源:MediaWiki
  • 協定:GPL-2.0-or-later

列出所有修訂版本。

參數:
arvprop

各修訂所要取得的屬性:

ids
修訂 ID。
flags
修訂標籤(小修改)。
timestamp
修訂的時間戳記。
user
做出修訂的使用者。
userid
修訂創建者的使用者 ID
size
修訂的長度(位元組)。
slotsize
每次修订间隔的长度(字节)。
sha1
修訂的 SHA-1(base 16)。
slotsha1
每次修订间隔的SHA-1(base 16)。
contentmodel
每次修订间隔的内容模型ID。
comment
由用户对修订做出的摘要。
parsedcomment
由用户对修订做出的被解析的摘要。
content
每次修订间隔的内容。
tags
修訂標籤。
roles
List content slot roles that exist in the revision.
parsetree
已停用。 请改用action=expandtemplatesaction=parse。修订内容的XML解析树(需要内容模型wikitext)。
多值 (以 |alternative 分隔):idsflagstimestampuseruseridsizeslotsizesha1slotsha1contentmodelcommentparsedcommentcontenttagsrolesparsetree
預設值:ids|timestamp|flags|comment|user
arvslots

Which revision slots to return data for, when slot-related properties are included in arvprops. If omitted, data from the main slot will be returned in a backwards-compatible format.

多值 (以 |alternative 分隔):main
要指定所有值,請使用*
arvlimit

限制所回傳的修訂數量。

不允許超過 500 (機器人為 5,000)。
類型:整數或max
arvexpandtemplates
已停用。

请改用action=expandtemplates。展开修订内容中的模板(需要arvprop=content)。

類型:布林值(詳細資訊
arvgeneratexml
已停用。

请改用action=expandtemplatesaction=parse。生成用于修订内容的XML解析树(需要arvprop=content;被arvprop=parsetree所取代)。

類型:布林值(詳細資訊
arvparse
已停用。

请改用action=parse。解析修订内容(需要arvprop=content)。由于性能原因,如果此选项被使用,arvlimit会被强制为1。

類型:布林值(詳細資訊
arvsection

只检索此段落数的内容。

arvdiffto
已停用。

请改用action=compare。要比较修订差异的修订ID。使用prevnextcur分别用于上个、下个和当前修订。

arvdifftotext
已停用。

请改用action=compare。要比较修订差异的文本。只有修订的有限数字内的差异。覆盖arvdiffto。如果arvsection被设置,只有那个段落将与此文本之间比较差异

arvdifftotextpst
已停用。

请改用action=compare。在编辑文本前对其执行预保存转换。只当与arvdifftotext一起使用时有效。

類型:布林值(詳細資訊
arvcontentformat
已停用。

序列化用于arvdifftotext的格式并预估内容输出。

單值:text/x-wikitext/javascriptapplication/jsontext/csstext/plain
arvuser

此列出由該使用者作出的修訂。

類型:使用者名稱
arvnamespace

僅列出此命名空間的頁面。

多值 (以 |alternative 分隔):0、1、2、3、4、5、6、7、8、9、10、11、12、13、14、15
要指定所有值,請使用*
arvstart

起始列舉的時間戳記。

類型:時間戳記(允許格式
arvend

終止列舉的時間戳記。

類型:時間戳記(允許格式
arvdir

列舉的方向:

newer
最舊的優先。注意:arvstart應在arvend之前。
older
最新的優先(預設)。注意:arvstart應在arvend之後。
單值:newerolder
預設值:older
arvexcludeuser

不要列出由該使用者作出的修訂。

類型:使用者名稱
arvcontinue

當有更多結果可用時,使用這個繼續。

arvgeneratetitles

當作為產生器時使用,產生標題而非修訂 ID。

類型:布林值(詳細資訊
範例:
列出由使用者 Example 做出的最近 50 個貢獻。
api.php?action=query&list=allrevisions&arvuser=Example&arvlimit=50 [在沙盒中開啟]
列出在主命名空間的前 50 個修訂。
api.php?action=query&list=allrevisions&arvdir=newer&arvlimit=50 [在沙盒中開啟]