MediaWiki API 說明
此頁為自動產生的 MediaWiki API 說明文件頁面。
說明文件與範例:https://www.mediawiki.org/wiki/API
prop=deletedrevisions <pre>(drv) </pre>
- 此模組需要讀取權限。
- 此模块可作为发生器使用。
获得删除修订版本信息。
可在很多途径中使用:
- 获得一组页面的已删除修订,通过设置标题或页面ID。以标题和时间戳排序。
- 通过设置它们的ID与修订ID获得关于一组已删除修订。以修订ID排序。
- drvprop
Which properties to get for each revision:
- ids
- The ID of the revision.
- flags
- Revision flags (minor).
- timestamp
- The timestamp of the revision.
- user
- User that made the revision.
- userid
- User ID of the revision creator.
- size
- Length (bytes) of the revision.
- sha1
- SHA-1 (base 16) of the revision.
- contentmodel
- Content model ID of the revision.
- comment
- Comment by the user for the revision.
- parsedcomment
- Parsed comment by the user for the revision.
- content
- Text of the revision.
- tags
- Tags for the revision.
- 多值 (以 | 分隔):ids、flags、timestamp、user、userid、size、sha1、contentmodel、comment、parsedcomment、content、tags
- 預設值:ids|timestamp|flags|comment|user
- drvlimit
限制返回多少修订。
- 不允許超過 500 (機器人為 5,000)。
- drvexpandtemplates
Expand templates in revision content (requires drvprop=content).
- drvgeneratexml
Generate XML parse tree for revision content (requires drvprop=content).
- drvparse
Parse revision content (requires drvprop=content). For performance reasons, if this option is used, drvlimit is enforced to 1.
- drvsection
Only retrieve the content of this section number.
- drvdiffto
Revision ID to diff each revision to. Use prev, next and cur for the previous, next and current revision respectively.
- drvdifftotext
Text to diff each revision to. Only diffs a limited number of revisions. Overrides drvdiffto. If drvsection is set, only that section will be diffed against this text
- drvcontentformat
Serialization format used for drvdifftotext and expected for output of content.
- 單值:text/x-wiki、text/javascript、application/json、text/css、text/plain
- drvstart
The timestamp to start enumerating from. Ignored when processing a list of revision IDs.
- drvend
The timestamp to stop enumerating at. Ignored when processing a list of revision IDs.
- drvdir
列举的方向:
- newer
- 最早的优先。注意:drvstart应早于drvend。
- older
- 最新的优先(默认)。注意:drvstart应晚于drvend。
- 單值:newer、older
- 預設值:older
- drvtag
只列出被此标签标记的修订。
- drvuser
只列出此用户做出的修订。
- drvexcludeuser
不要列出此用户做出的修订。
- drvcontinue
当更多结果可用时,使用这个继续。
- 列出页面Main Page和Talk:Main Page的已删除修订,包含内容。
- api.php?action=query&prop=deletedrevisions&titles=Main%20Page|Talk:Main%20Page&drvprop=user|comment|content
- 列出已删除修订123456的信息。
- api.php?action=query&prop=deletedrevisions&revids=123456