query_by_ {wikkitidy} | R Documentation |
Query the MediaWiki Action API using a vector of Wikipedia pages
Description
These functions help you to build a query for the MediaWiki Action API if you already have a set of pages that you wish to investigate. These functions can be combined with query_page_properties to choose which properties to return for the passed pages.
Usage
query_by_title(.req, title)
query_by_pageid(.req, pageid)
query_by_revid(.req, revid)
Arguments
.req |
A wiki_action_request query to modify |
title |
A character vector of page titles |
pageid |
A character or numeric vector of page ids |
revid |
A character or numeric vector of revision ids |
Details
If you don't already know which pages you wish to examine, you can build a query to find pages that meet certain criteria using query_list_pages or query_generate_pages.
Value
A request object of type pages/query/action_api/httr2_request
. To
perform the query, pass the object to next_batch or retrieve_all
Examples
# Retrieve the categories for Charles Harpur's Wikipedia page
resp <- wiki_action_request() %>%
query_by_title("Charles Harpur") %>%
query_page_properties("categories") %>%
next_batch()
[Package wikkitidy version 0.1.12 Index]