page_vector_functions | R Documentation |
get_latest_revision()
returns metadata about the latest
revision of each
page.
get_page_html()
returns the rendered html for each
page.
get_page_summary()
returns metadata about the latest revision, along
with the page description and a summary extracted from the opening
paragraph
get_page_related()
returns summaries for 20 related pages for each
passed page
get_page_talk()
returns structured talk page content for each
title. You must ensure to use the title for the Talk page itself, e.g.
"Talk:Earth" rather than "Earth"
get_page_langlinks()
returns interwiki links for each
title
get_latest_revision(title, language = "en", failure_mode = "error")
get_page_html(title, language = "en", failure_mode = "error")
get_page_summary(title, language = "en", failure_mode = "error")
get_page_talk(title, language = "en", failure_mode = "error")
get_page_langlinks(title, language = "en", failure_mode = "error")
title |
A character vector of page titles. |
language |
A character vector of two-letter language codes, either of
length 1 or the same length as |
failure_mode |
Either "quiet" or "error." See |
A list, vector or tibble, the same length as title
, with the
desired data.
# Get language links for a known page on English Wikipedia
get_page_langlinks("Charles Harpur", failure_mode = "quiet")
# The functions are vectorised over title and language
# Find all articles about Joanna Baillie, and retrieve summary data for
# the first two.
baillie <- get_page_langlinks("Joanna Baillie") %>%
dplyr::slice(1:2) %>%
dplyr::mutate(get_page_summary(title = title, language = code, failure_mode = "quiet"))
baillie
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.