API:Imagerotate
Appearance
Cette page fait partie de la documentation de l'API MediaWiki Action. |
Imagerotate | ||
---|---|---|
Rotate one or more images. Ce module ne peut pas être utilisé comme générateur. | ||
Préfixe | aucun | |
Droits exigés | edit, upload | |
POST seulement ? | Oui | |
Aide générée | Version actuelle | |
Ajouté en version |
|
This module is currently disabled on all Wikimedia wikis due to performance concerns (phab:T35186).
Jeton
To rotate an image, a CSRF token is required.
The CSRF token is the same for all pages, but changes at every login.
CSRF tokens can be obtained via action=query&meta=tokens
with type=csrf
(MW 1.24+).
For older versions, you can use API:Tokens (action) or API:Info/fr to get an edit token.
Paramètres
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. Valeurs possibles : 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 |. Pas plus de 50 valeurs autorisées (500 pour les robots). 1.23+pageids
: A list of page IDs to work on. Separate values with |. Pas plus de 50 valeurs autorisées (500 pour les robots). Type: list of integersrevids
: A list of revision IDs to work on. Separate values with |. Pas plus de 50 valeurs autorisées (500 pour les robots). Type: 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". Valeurs possibles : 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
: A "csrf" token retrieved from action=query&meta=tokens
Codes d'erreur
In addition to the usual stuff, any failure to rotate an image will be reported in the errormessage field in the results.
Exemple
Faire une rotation de File:Example.png par un angle de 90 degrés
api.php? action=imagerotate& titles=File:Example.png& rotation=90& token=0123456789012345678901234567890123456789%2b%5c [Essayez !]
Résultat |
---|
{
"imagerotate": [
{
"id": 20,
"ns": 6,
"title": "File:Example.png",
"result": "Success"
}
]
}
|
La documentation qui suit est le résultat de Special: |
action=imagerotate
(main | imagerotate)
- Source: MediaWiki
- License: GPL-2.0-or-later
This module has been disabled.