new_prop_query {wikkitidy} | R Documentation |
Constructor for the property query type
Description
The intended use for this query is to set the 'titles', 'pageids' or 'revids'
parameter, and enforce that only one of these is set. All property modules API in the Action API require
this parameter to be set, or they require a
generator
parameter to be set instead. The
prop/query
type is an abstract type representing the three possible kinds
of property query that do not rely on a generator (see below on the return
value). A complication is that a prop/query
can itself be used as the
basis for a generator.
Usage
new_prop_query(.req, by, pages, ...)
Arguments
.req |
A |
by |
The type of page. Allowed values are: pageids, titles, revids |
pages |
A string, the pages to query by, corresponding to the 'by' parameter. Multiple values should be separated with "|" |
... |
< |
Value
A properly qualified prop/query
object. There are six
possibilities:
-
titles/prop/query
-
pageids/prop/query
-
revids/prop/query
-
generator/titles/prop/query
-
generator/pageids/prop/query
-
generator/revids/prop/query
Examples
# Build a query on a set of pageids
# 963273 and 1159171 are Kate Bush albums
bush_albums_query <- wiki_action_request() %>%
new_prop_query("pageids", "963273|1159171")