bhl_getpagemetadata: Return metadata about a page.

View source: R/bhl_getpagemetadata.R

bhl_getpagemetadataR Documentation

Return metadata about a page.

Description

You may choose to include the OCR text and a list of names found on the page

Usage

bhl_getpagemetadata(
  page = NULL,
  ocr = FALSE,
  names = FALSE,
  as = "table",
  key = NULL,
  ...
)

Arguments

page

page number to get

ocr

return ocr text of the page (TRUE/FALSE)

names

return the names that appear on the page (TRUE/FALSE)

as

(character) Return a list ("list"), json ("json"), xml ("xml"), or parsed table ("table", default). Note that as="table" can give different data format back depending on the function - for example, sometimes a data.frame and sometimes a character vector.

key

Your BHL API key, either enter, or loads from your .Renviron as BHL_KEY or from .Rprofile as bhl_key.

...

Curl options passed on to crul::HttpClient()

Examples

## Not run: 
bhl_getpagemetadata(page=1328690, ocr=TRUE)
bhl_getpagemetadata(page=1328690, ocr=TRUE, as='json')
bhl_getpagemetadata(page=1328690, ocr=TRUE, as='xml')
bhl_getpagemetadata(page=1328690, ocr=TRUE, as='list')

## End(Not run)

ropensci/rbhl documentation built on Sept. 12, 2022, 2:02 p.m.