API:Patrol: Difference between revisions
Appearance
Content deleted Content added
dummy edit |
Syntux delu<s></s> |
||
| Line 40: | Line 40: | ||
<translate> |
<translate> |
||
== Patrolling changes == <!--T:3--> |
<code></code>{{DEFAULTSORT:}}== Patrolling changes == <!--T:3--> |
||
<!--T:4--> |
<!--T:4--> |
||
Revision as of 15:39, 22 December 2015
| This page is part of the MediaWiki Action API documentation. |
| MediaWiki version: | 1.14 |
Token
To patrol a request, a patrol token is required. Since MediaWiki 1.17, the patrol token has no longer been the same as the edit token. The patrol token is the same for all pages, but changes at every login. Patrol tokens can be obtained via action=tokens with type=patrol (MW 1.20+), or by using the following method:
Obtaining a patrol token
| Result |
|---|
<?xml version="1.0" encoding="utf-8"?>
<api>
<query-continue>
<recentchanges rcstart="2008-09-06T10:49:06Z" />
</query-continue>
<query>
<recentchanges>
<rc type="edit" ns="0" title="Sites using MediaWiki/uk"
rcid="228053" pageid="25473" revid="210889"
old_revid="210888" timestamp="2008-09-06T10:58:33Z"
patroltoken="8f45aa1dfd9725b4d6a71c66959b111f+\" />
</recentchanges>
</query>
</api>
|
== Patrolling changes ==
You can patrol changes using action=patrol. Note that this module only accepts POST requests.
Parameters
rcid: Recentchanges ID to patrolrevid: Revision ID to patroltoken: The token obtained in the previous request. Take care to encode the+as%2B
Example
Patrolling rcid 242005359
| Result |
|---|
<?xml version="1.0" encoding="utf-8"?>
<api>
<patrol rcid="242005359" />
</api>
|
Possible errors
In addition to the usual stuff:
| Code | Info |
|---|---|
| nosuchrcid | There is no change with rcid "id" |
| patroldisabled | Patrolling is disabled on this wiki |
| noautopatrol | You don't have permission to patrol your own changesautopatrol right can do this
|