MediaWiki API 帮助

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

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

action=visualeditoredit

main | visualeditoredit
  • 此模块是内部或不稳定的。它的操作可以更改而不另行通知。
  • 此模块需要读取权限。
  • 此模块需要写入权限。
  • 此模块只允许POST请求。
  • 来源:VisualEditor
  • 许可协议:MIT

保存一个HTML5页面至MediaWiki(通过Parsoid服务转换为wikitext)。

参数:
paction

要执行的操作。

这个参数是必需的。
以下值中的一个:diff、​save、​serialize、​serializeforcache
page

要执行操作的页面。

这个参数是必需的。
token

action=query&meta=tokens取回的“csrf”令牌

这个参数是必需的。
wikitext

扮演的wikitext。

section

起作用的章节。

sectiontitle

新章节的标题。

basetimestamp

当保存时,设置它作为编辑的修订的时间戳。用于检测编辑冲突。

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

当保存时,设置它作为页面加载时的时间戳。用于检测编辑冲突。

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

要使用的修订版本号。默认为最新版本。

类型:整数
minor

标记小编辑。

watchlist

无条件地将页面加入至当前用户的监视列表或将其移除(忽略机器人用户),使用设置或不更改监视。

html

要发送至Parsoid与wikitext交换的HTML。

etag

要发送的ETag。

summary

编辑摘要。

captchaid

验证码ID(当带验证码保存时)。

captchaword

回答验证码(当带验证码保存时)。

cachekey

使用之前的serializeforcache请求的结果带此密钥。覆盖html。

useskin

为解析器输出应用选择的皮肤。会影响以下属性:textlanglinksheaditemsmodulesjsconfigvarsindicators

以下值中的一个:apioutput、​cologneblue、​fallback、​minerva、​modern、​monobook、​timeless、​vector、​vector-2022
tags

修改应用于编辑的标签。

通过|替代物隔开各值。
值的最大值为50(允许更高上限的客户端为500)。
plugins

与API请求关联的插件。

ge-task-link-recommendation
Use when saving a GrowthExperiments "Add a link" structured edit.
ge-task-image-recommendation
Use when saving a GrowthExperiments "Add an image" structured edit.
通过|替代物隔开各值。
值的最大值为50(允许更高上限的客户端为500)。
data-{plugin}

插件随API请求发送的任意数据。

For the ge-task-link-recommendation plugin

A JSON string of an object with these keys:

  • acceptedTargets: (optional) Array with the titles of pages, the recommended link to which was accepted by the user.
  • rejectedTargets: (optional) Array with the titles of pages, the recommended link to which was rejected by the user.
  • skippedTargets: (optional) Array with the titles of pages, the recommended link to which was skipped (ignored) by the user.
For the ge-task-image-recommendation plugin

A JSON string of an object with these keys:

  • accepted: A boolean indicating whether the user accepted the recommended image.
  • reasons: An array of strings identifying boolean indicating why the user rejected the recommended image. Valid values: notrelevant、​noinfo、​offensive、​lowquality、​unfamiliar、​foreignlanguage、​other
  • caption: Image caption provided by the user. (Must have at least 5 characters.)
这是一个模板参数。当做出请求时,参数名中的{plugin}应替换为plugins的值。
mobileformat

以适配移动设备的格式返回解析输出。

类型:布尔型 (详情)