categories_in_page | R Documentation |
Retrieves categories associated with a page (or list of pages) on a MediaWiki instance
categories_in_page(
language = NULL,
project = NULL,
domain = NULL,
pages,
properties = c("sortkey", "timestamp", "hidden"),
limit = 50,
show_hidden = FALSE,
clean_response = FALSE,
...
)
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 |
domain |
as an alternative to a |
pages |
A vector of page titles, with or without spaces, that you want to retrieve categories for. |
properties |
The properties you want to retrieve about the categories. Options are "sortkey" (the key that sorts the way the page is stored in each category), "timestamp" (when the category was added to that page) and "hidden" (tags those categories in the returned list that are 'hidden' from readers). |
limit |
The maximum number of categories you want to retrieve for each page. Set to 50 by default. |
Whether or not to include 'hidden' categories in the categories that are retrieved - these are usually associated with the maintenance of Wikipedia and its internal processes. Set to FALSE by default. | |
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. |
pages_in_category
for pages in a specified category.
## Not run:
#Retrieve the categories for the "New Age" article on en.wiki
cats <- categories_in_page("en", "wikipedia", pages = "New Age")
#Retrieve the categories for the "New Age" article on rationalwiki.
rw_cats <- categories_in_page(domain = "rationalwiki.org", pages = "New Age")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.