Даведка MediaWiki API

This is an auto-generated MediaWiki API documentation page.

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

action=compare

(main | compare)

Атрымаць розьніцу паміж 2 старонкамі.

Вы мусіце перадаць нумар вэрсіі, назву або ID старонкі для абодвух «from» і «to».

Specific parameters:
Other general parameters are available.
fromtitle

Першая назва для параўнаньня.

fromid

ID першай старонкі для параўнаньня.

Type: integer
fromrev

Першая вэрсія для параўнаньня.

Type: integer
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.

Values (separate with | or alternative): 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 identifier. 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.
One of the following values: application/json, application/octet-stream, application/unknown, application/vue+xml, application/x-binary, text/css, text/javascript, text/plain, text/unknown, text/x-wiki, unknown/unknown
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.
One of the following values: css, javascript, json, text, unknown, vue, wikitext
frompst

Рабіць трансфармацыю перад захаваньнем на fromtext-{slot}.

Type: boolean (details)
fromtext
Deprecated.

Specify fromslots=main and use fromtext-main instead.

fromcontentformat
Deprecated.

Specify fromslots=main and use fromcontentformat-main instead.

One of the following values: application/json, application/octet-stream, application/unknown, application/vue+xml, application/x-binary, text/css, text/javascript, text/plain, text/unknown, text/x-wiki, unknown/unknown
fromcontentmodel
Deprecated.

Specify fromslots=main and use fromcontentmodel-main instead.

One of the following values: css, javascript, json, text, unknown, vue, wikitext
fromsection
Deprecated.

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

totitle

Другая назва для параўнаньня.

toid

ID другой старонкі для параўнаньня.

Type: integer
torev

Другая вэрсія для параўнаньня.

Type: integer
torelative

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

One of the following values: cur, next, prev
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.

Values (separate with | or alternative): 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 identifier. 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.
One of the following values: application/json, application/octet-stream, application/unknown, application/vue+xml, application/x-binary, text/css, text/javascript, text/plain, text/unknown, text/x-wiki, unknown/unknown
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.
One of the following values: css, javascript, json, text, unknown, vue, wikitext
topst

Do a pre-save transform on totext.

Type: boolean (details)
totext
Deprecated.

Specify toslots=main and use totext-main instead.

tocontentformat
Deprecated.

Specify toslots=main and use tocontentformat-main instead.

One of the following values: application/json, application/octet-stream, application/unknown, application/vue+xml, application/x-binary, text/css, text/javascript, text/plain, text/unknown, text/x-wiki, unknown/unknown
tocontentmodel
Deprecated.

Specify toslots=main and use tocontentmodel-main instead.

One of the following values: css, javascript, json, text, unknown, vue, wikitext
tosection
Deprecated.

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
Імя карыстальніка ды ідэнтыфікатар вэрсіяў „ад“ і „да“. Калі вэрсія карыстальніка была выдаленая, вернецца ўласьцівасьць fromuserhidden або touserhidden.
comment
Апісаньне рэдагаваньняў вэрсіяў „ад“ і „да“. Калі вэрсія апісаньня была выдаленая, вернецца ўласьцівасьць fromcommenthidden або tocommenthidden.
parsedcomment
Сынтаксічны аналіз апісаньняў вэрсіяў „ад“ і „да“. Калі апісаньне было выдаленае, вернецца ўласьцівасьць fromcommenthidden або tocommenthidden.
size
The size of the 'from' and 'to' revisions.
timestamp
The timestamp of the 'from' and 'to' revisions.
Values (separate with | or alternative): comment, diff, diffsize, ids, parsedcomment, rel, size, timestamp, title, user
Default: diff|ids|title
slots

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

Values (separate with | or alternative): main
To specify all values, use *.
difftype

Return the comparison formatted as inline HTML.

One of the following values: table, unified
Default: table
Прыклад:
Паказвае розьніцу паміж вэрсіямі 1 і 2
api.php?action=compare&fromrev=1&torev=2 [open in sandbox]