This page is a translated version of the page API:Imagerotate and the translation is 41% complete.
由于性能问题,该模块目前在所有维基媒体的wiki项目中被禁用(phab:T35186)。

令牌

要旋转图像,需要CSRF令牌。 所有页面的CSRF令牌是相同的,但是每次登录时令牌都会改变。 CSRF tokens can be obtained via action=query&meta=tokens with type=csrf (MW 1.24+). For older versions, you can use API:令牌(操作) or API:Info to get an edit token.

参数

This module incorporates ApiPageSet and behaves similar to a query in most respects. See specifying pages and resolve redirects for more information.

  • rotationDegrees to rotate image clockwise. 可能的值: 90, 180, 270
  • continueWhen more results are available, use this to continue. (See continuing queries.) 1.24+
  • tagsTags to apply to the entry in the upload log. 1.29+
  • titlesA list of titles to work on. Separate values with |. 不允许超过50(对于机器人则是500)。 1.23+
  • pageidsA list of page IDs to work on. Separate values with |. 不允许超过50(对于机器人则是500)。 类型: list of integers
  • revidsA list of revision IDs to work on. Separate values with |. 不允许超过50(对于机器人则是500)。 类型: list of integers
  • generatorGet the list of pages to work on by executing the specified query module. Note: Generator parameter names must be prefixed with a "g". 可能的值: see MediaWiki API generators
  • redirectsAutomatically resolve redirects in titles, pageids, and revids, and in pages returned by generator.
  • converttitlesConvert titles to other variants if necessary. Only works if the wiki's content language supports variant conversion. Languages that support variant conversion include: gan, iu, kk, ku, shi, sr, tg, uz, zh
  • token: 从action=query&meta=tokens检索到的“csrf”令牌

错误代码

In addition to the usual stuff, any failure to rotate an image will be reported in the errormessage field in the results.

示例

File:Example.png旋转90度。
结果
{
  "imagerotate": [
    {
      "id": 20,
      "ns": 6,
      "title": "File:Example.png",
      "result": "Success"
    }
  ]
}


action=imagerotate

(main | imagerotate)

This module has been disabled.