# Compare revision 847170467 to 851733941 on English Wikipedia
get_diff(847170467, 851733941)
# The function is vectorised, so you can compare multiple pairs of revisions
# in a single call
# See diffs for the last two revisions of the Main Page
revisions <- wiki_action_request() %>%
query_by_title("Main Page") %>%
query_page_properties(
"revisions",
rvlimit = 2, rvprop = "ids", rvdir = "older"
) %>%
gracefully(next_result)
if (tibble::is_tibble(revisions)) {
revisions <- revisions %>%
tidyr::unnest(cols = c(revisions)) %>%
dplyr::mutate(diffs = get_diff(from = parentid, to = revid))
print(revisions)
}
Run the code above in your browser using DataLab