page_info: Retrieve information about a particular page

View source: R/metadata.R

page_infoR Documentation

Retrieve information about a particular page

Description

page_info, when provided with a page title, retrieves metadata about that page.

Usage

page_info(
  language = NULL,
  project = NULL,
  domain = NULL,
  page,
  properties = c("protection", "talkid", "url", "displaytitle"),
  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.

page

the title of the page you want the metadata of.

properties

the properties you'd like to retrieve. Some properties (the pageID, namespace, title, language, length and most recent revision ID, for example) are retrieved by default, whatever is passed to properties: properties that can be explicitly retrieved include the page's protection level ("protection"), the ID of the associated talk page, if applicable ("talkid"), the full, canonical URL ("url"), and the displayed page title ("displaytitle").

clean_response

whether to do some basic sanitising of the resulting data structure. Set to FALSE by default.

...

further arguments to pass to httr's GET.

Examples

## Not run: 
#Metadata
page_metadata <- page_info("en","wikipedia", page = "Aaron Halfaker")

## End(Not run)

Ironholds/WikipediR documentation built on April 6, 2024, 8:45 p.m.