Learn R Programming

WikipediR (version 1.3.0)

revision_content: Retrieves MediaWiki revisions

Description

Retrieves the content of a provided list of revisions from whichever MediaWiki instance you're querying. Returns as wikimarkup.

Usage

revision_content(language = NULL, project = NULL, domain = NULL,
  revisions, properties = c("content", "ids", "flags", "timestamp", "user",
  "userid", "size", "sha1", "contentmodel", "comment", "parsedcomment", "tags"),
  clean_response = FALSE, ...)

Arguments

language
The language code of the project you wish to query, if appropriate.
project
The project you wish to query ("wikiquote"), if appropriate. Should be provided in conjunction with language.
domain
as an alternative to a language and project combination, you can also provide a domain ("rationalwiki.org") to the URL constructor, allowing for the querying of non-Wikimedia MediaWiki instances.
revisions
The revision IDs of each desired revision.
properties
Properties you're trying to retrieve about that revision, should you want to; options include "ids" (the revision ID of the revision...which is pointless), "flags" (whether the revision was 'minor' or not), "timestamp" (the timestamp of the revision), "us
clean_response
whether to do some basic sanitising of the resulting data structure.
...
further arguments to pass to httr's GET.

See Also

revision_diff for diffs between revisions, and page_content for the content a specific page currently has.

Examples

Run this code
#Revision content from a Wikimedia project
wp_content <- revision_content("en","wikipedia", revisions = 552373187)

#Revision content from a non-Wikimedia project
rw_content <- revision_content(domain = "rationalwiki.org", revisions = 88616)

Run the code above in your browser using DataLab