MediaWiki API 帮助

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

文档和例子:https://www.mediawiki.org/wiki/API:Main_page/zh

prop=deletedrevisions (drv)

main | query | deletedrevisions
  • 此模块需要读取权限。
  • 此模块可作为发生器使用。

获得删除修订版本信息。

可在很多途径中使用:

  1. 获得一组页面的已删除修订,通过设置标题或页面ID。以标题和时间戳排序。
  2. 通过设置它们的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 PageTalk: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