API:Rollback/zh

回退
回退指的是撤销一系列由某用户进行的编辑. 换言之，回滚一直撤销版本直到某版本的编辑是由另一人做出的. 本功能与图形界面中提供的[ ]链接效果是一样的. 回退的版本将被标记为“小编辑”. 可选的是，回退与与被回退的编辑均可被标记为机器人操作，可在最近更改中默认不显示.

令牌
回滚页面需要回滚令牌. 如果您的维基使用MediaWiki 1.24及以上版本，您可以使用 action=query&meta=tokens&type=rollback 来获取回滚令牌.

对于MediaWiki 1.23及之前的版本，可以通过如下的步骤：

Unlike most other tokens, rollback tokens aren't universal: they're not only different for every login, but also depend on the title of the page and the name of the user whose edits are to be rolled back. A rollback token can be obtained as follows:

Rolling back pages
Pages can be rolled back with action=rollback.

参数

 * : The page you want to roll back. Cannot be used together with pageid.
 * : Page ID of the page you want to roll back. Cannot be used together with title.
 * : The token obtained in the previous request. Take care to urlencode the '+' as '%2B'.
 * : The author of the last revision.
 * : Edit summary (optional). If not set, a default summary will be used.
 * : If set, both the rollback and the revisions being rolled back will be marked as bot edits.
 * : Unconditionally add or remove the page from your watchlist, use preferences or do not change watch. One value among: watch, unwatch, preferences, nochange.

例子
注意：在本例中，所有的参数通过GET请求传递只是为了便于理解. 实际上， action=rollback 需要以POST方式请求，以GET方式请求将报错.

返回数据字段

 * : 回退的版本ID
 * : 首个回退的版本ID
 * : 最后一个被回退的版本ID

If rolling back wouldn't change the page, no new revision is made. In this case,  will be equal to.

可能的错误
In addition to the usual stuff: