MediaWiki API hulp

This is an auto-generated MediaWiki API documentation page.

Documentation and examples: https://www.mediawiki.org/wiki/API

action=compare

(main | compare)
  • Voor deze module zijn leesrechten nodig.
  • Bron: MediaWiki
  • Licentie: GPL-2.0-or-later

Het verschil tussen twee pagina's ophalen.

Voor zowel "from" als "to" moet een revisienummer, paginatitel, pagina-ID, tekst of relatieve referentie ingegeven worden.

Parameters:
fromtitle

Eerste te vergelijken paginanaam.

fromid

Eerste te vergelijken pagina-ID.

Type: geheel getal
fromrev

Eerste te vergelijken revisie.

Type: geheel getal
fromslots

Override content of the revision specified by fromtitle, fromid or fromrev.

This parameter specifies the slots that are to be modified. Use fromtext-{slot}, fromcontentmodel-{slot}, and fromcontentformat-{slot} to specify content for each slot.

Waarden (gescheiden met | of alternatief): main
fromtext-{slot}

Text of the specified slot. If omitted, the slot is removed from the revision.

This is a templated parameter. When making the request, {slot} in the parameter's name should be replaced with values of fromslots.
fromsection-{slot}

When fromtext-{slot} is the content of a single section, this is the section number. It will be merged into the revision specified by fromtitle, fromid or fromrev as if for a section edit.

This is a templated parameter. When making the request, {slot} in the parameter's name should be replaced with values of fromslots.
fromcontentformat-{slot}

Content serialization format of fromtext-{slot}.

This is a templated parameter. When making the request, {slot} in the parameter's name should be replaced with values of fromslots.
Een van de volgende waarden: text/x-wiki, text/javascript, application/json, text/css, text/plain
fromcontentmodel-{slot}

Content model of fromtext-{slot}. If not supplied, it will be guessed based on the other parameters.

This is a templated parameter. When making the request, {slot} in the parameter's name should be replaced with values of fromslots.
Een van de volgende waarden: wikitext, javascript, json, css, text
frompst

Do a pre-save transform on fromtext-{slot}.

Type: boolean (details)
fromtext
Verouderd.

Specify fromslots=main and use fromtext-main instead.

fromcontentformat
Verouderd.

Specify fromslots=main and use fromcontentformat-main instead.

Een van de volgende waarden: text/x-wiki, text/javascript, application/json, text/css, text/plain
fromcontentmodel
Verouderd.

Specify fromslots=main and use fromcontentmodel-main instead.

Een van de volgende waarden: wikitext, javascript, json, css, text
fromsection
Verouderd.

Only use the specified section of the specified 'from' content.

totitle

Tweede te vergelijken paginanaam.

toid

Tweede te vergelijken pagina-ID.

Type: geheel getal
torev

Tweede te vergelijken revisie.

Type: geheel getal
torelative

Use a revision relative to the revision determined from fromtitle, fromid or fromrev. All of the other 'to' options will be ignored.

Een van de volgende waarden: prev, next, cur
toslots

Override content of the revision specified by totitle, toid or torev.

This parameter specifies the slots that are to be modified. Use totext-{slot}, tocontentmodel-{slot}, and tocontentformat-{slot} to specify content for each slot.

Waarden (gescheiden met | of alternatief): main
totext-{slot}

Text of the specified slot. If omitted, the slot is removed from the revision.

This is a templated parameter. When making the request, {slot} in the parameter's name should be replaced with values of toslots.
tosection-{slot}

When totext-{slot} is the content of a single section, this is the section number. It will be merged into the revision specified by totitle, toid or torev as if for a section edit.

This is a templated parameter. When making the request, {slot} in the parameter's name should be replaced with values of toslots.
tocontentformat-{slot}

Content serialization format of totext-{slot}.

This is a templated parameter. When making the request, {slot} in the parameter's name should be replaced with values of toslots.
Een van de volgende waarden: text/x-wiki, text/javascript, application/json, text/css, text/plain
tocontentmodel-{slot}

Content model of totext-{slot}. If not supplied, it will be guessed based on the other parameters.

This is a templated parameter. When making the request, {slot} in the parameter's name should be replaced with values of toslots.
Een van de volgende waarden: wikitext, javascript, json, css, text
topst

Do a pre-save transform on totext.

Type: boolean (details)
totext
Verouderd.

Specify toslots=main and use totext-main instead.

tocontentformat
Verouderd.

Specify toslots=main and use tocontentformat-main instead.

Een van de volgende waarden: text/x-wiki, text/javascript, application/json, text/css, text/plain
tocontentmodel
Verouderd.

Specify toslots=main and use tocontentmodel-main instead.

Een van de volgende waarden: wikitext, javascript, json, css, text
tosection
Verouderd.

Only use the specified section of the specified 'to' content.

prop

Which pieces of information to get.

diff
The diff HTML.
diffsize
The size of the diff HTML, in bytes.
rel
The revision IDs of the revision previous to 'from' and after 'to', if any.
ids
The page and revision IDs of the 'from' and 'to' revisions.
title
The page titles of the 'from' and 'to' revisions.
user
The user name and ID of the 'from' and 'to' revisions.
comment
The comment on the 'from' and 'to' revisions.
parsedcomment
The parsed comment on the 'from' and 'to' revisions.
size
The size of the 'from' and 'to' revisions.
Waarden (gescheiden met | of alternatief): diff, diffsize, rel, ids, title, user, comment, parsedcomment, size
Standaard: diff|ids|title
slots

Return individual diffs for these slots, rather than one combined diff for all slots.

Waarden (gescheiden met | of alternatief): main
Gebruik * om alle waarden op te geven.
Voorbeeld:
Create a diff between revision 1 and 2.
api.php?action=compare&fromrev=1&torev=2 [open in de zandbak]