Ayuda de la API de MediaWiki
Esta es una página de documentación autogenerada de la API de MediaWiki.
Documentación y ejemplos: https://www.mediawiki.org/wiki/API
action=compare
- Este módulo requiere permisos de lectura.
- Fuente: MediaWiki
- Licencia: GPL-2.0-or-later
Obtener la diferencia entre 2 páginas.
Se debe pasar un número de revisión, un título de página o una ID tanto desde "de" hasta "a".
- fromtitle
Primer título para comparar
- fromid
ID de la primera página a comparar.
- Tipo: entero
- fromrev
Primera revisión para comparar.
- Tipo: entero
- 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.
- Valores (separados por | u otro separador): 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.
- Uno de los siguientes valores: application/json, text/x-wiki, text/javascript, 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.
- Uno de los siguientes valores: GadgetDefinition, wikitext, javascript, json, css, text
- frompst
Do a pre-save transform on fromtext-{slot}.
- Tipo: booleano/lógico (detalles)
- fromtext
- En desuso.
Specify fromslots=main and use fromtext-main instead.
- fromcontentformat
- En desuso.
Specify fromslots=main and use fromcontentformat-main instead.
- Uno de los siguientes valores: application/json, text/x-wiki, text/javascript, text/css, text/plain
- fromcontentmodel
- En desuso.
Specify fromslots=main and use fromcontentmodel-main instead.
- Uno de los siguientes valores: GadgetDefinition, wikitext, javascript, json, css, text
- fromsection
- En desuso.
Solamente usar la sección especificada del contenido 'from' especificado.
- totitle
Segundo título para comparar.
- toid
Segunda identificador de página para comparar.
- Tipo: entero
- torev
Segunda revisión para comparar.
- Tipo: entero
- torelative
Use a revision relative to the revision determined from fromtitle, fromid or fromrev. All of the other 'to' options will be ignored.
- Uno de los siguientes valores: 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.
- Valores (separados por | u otro separador): 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.
- Uno de los siguientes valores: application/json, text/x-wiki, text/javascript, 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.
- Uno de los siguientes valores: GadgetDefinition, wikitext, javascript, json, css, text
- topst
Do a pre-save transform on totext.
- Tipo: booleano/lógico (detalles)
- totext
- En desuso.
Specify toslots=main and use totext-main instead.
- tocontentformat
- En desuso.
Specify toslots=main and use tocontentformat-main instead.
- Uno de los siguientes valores: application/json, text/x-wiki, text/javascript, text/css, text/plain
- tocontentmodel
- En desuso.
Specify toslots=main and use tocontentmodel-main instead.
- Uno de los siguientes valores: GadgetDefinition, wikitext, javascript, json, css, text
- tosection
- En desuso.
Solamente usar la sección especificada del contenido 'to' especificado.
- prop
Qué fragmentos de información se obtendrán.
- diff
- El HTML de las diferencias.
- diffsize
- El tamaño del HTML de las diferencias, en 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.
- Valores (separados por | u otro separador): diff, diffsize, rel, ids, title, user, comment, parsedcomment, size
- Predeterminado: diff|ids|title
- slots
Return individual diffs for these slots, rather than one combined diff for all slots.
- Valores (separados por | u otro separador): main
- Para especificar todos los valores, utiliza *.
- Crear una diferencia entre las revisiones 1 y 2.
- api.php?action=compare&fromrev=1&torev=2 [abrir en la zona de pruebas]