query_by_ | R Documentation |
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.
query_by_title(.req, title)
query_by_pageid(.req, pageid)
query_by_revid(.req, revid)
.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 |
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.
A request object of type pages/query/action_api/httr2_request
. To
perform the query, pass the object to next_batch or retrieve_all
gracefully()
# Retrieve the categories for Charles Harpur's Wikipedia page
resp <- wiki_action_request() %>%
query_by_title("Charles Harpur") %>%
query_page_properties("categories") %>%
gracefully(next_batch)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.