API:Imagerotate
Appearance
本页是MediaWiki Action API帮助文档的一部份。 |
Imagerotate | ||
---|---|---|
旋转一个或多个图片。 此模块不能用作generator。 | ||
前缀 | 无 | |
需要的权限 | edit, upload | |
仅限Post? | 是 | |
产生帮助 | 当前 | |
添加的版本 |
|
由于性能问题,该模块目前在所有维基媒体的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.
rotation
: Degrees to rotate image clockwise. 可能的值: 90, 180, 270continue
: When more results are available, use this to continue. (See continuing queries.) 1.24+tags
: Tags to apply to the entry in the upload log. 1.29+titles
: A list of titles to work on. Separate values with |. 不允许超过50(对于机器人则是500)。 1.23+pageids
: A list of page IDs to work on. Separate values with |. 不允许超过50(对于机器人则是500)。 类型: list of integersrevids
: A list of revision IDs to work on. Separate values with |. 不允许超过50(对于机器人则是500)。 类型: list of integersgenerator
: Get 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 generatorsredirects
: Automatically resolve redirects in titles, pageids, and revids, and in pages returned by generator.converttitles
: Convert 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, zhtoken
: 从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度。
api.php? action=imagerotate& titles=File:Example.png& rotation=90& token=0123456789012345678901234567890123456789%2b%5c [在Api沙盒中尝试]
结果 |
---|
{
"imagerotate": [
{
"id": 20,
"ns": 6,
"title": "File:Example.png",
"result": "Success"
}
]
}
|
以下文档是Special: |
action=imagerotate
(main | imagerotate)
- Source: MediaWiki
- License: GPL-2.0-or-later
This module has been disabled.