wt_wiki_url_build {wikitaxa} | R Documentation |
Build MediaWiki Page URL
Description
Builds a MediaWiki page url from its component parts (wiki name, wiki type, and page title). Supports both static page urls and their equivalent API calls.
Usage
wt_wiki_url_build(
wiki,
type = NULL,
page = NULL,
api = FALSE,
action = "parse",
redirects = TRUE,
format = "json",
utf8 = TRUE,
prop = c("text", "langlinks", "categories", "links", "templates", "images",
"externallinks", "sections", "revid", "displaytitle", "iwlinks", "properties")
)
Arguments
wiki |
(character | list) Either the wiki name or a list with
|
type |
(character) Wiki type. |
page |
(character) Wiki page title. |
api |
(boolean) Whether to return an API call or a static page url
(default). If |
action |
(character) See https://en.wikipedia.org/w/api.php for supported actions. This function currently only supports "parse". |
redirects |
(boolean) If the requested page is set to a redirect, resolve it. |
format |
(character) See https://en.wikipedia.org/w/api.php for supported output formats. |
utf8 |
(boolean) If |
prop |
(character) Properties to retrieve, either as a character vector or pipe-delimited string. See https://en.wikipedia.org/w/api.php?action=help&modules=parse for supported properties. |
Value
a URL (character)
See Also
Other MediaWiki functions:
wt_wiki_page_parse()
,
wt_wiki_page()
,
wt_wiki_url_parse()
Examples
wt_wiki_url_build(wiki = "en", type = "wikipedia", page = "Malus domestica")
wt_wiki_url_build(
wt_wiki_url_parse("https://en.wikipedia.org/wiki/Malus_domestica"))
wt_wiki_url_build("en", "wikipedia", "Malus domestica", api = TRUE)