bhl_bioherlib: Search BHL across many API methods.

Description Usage Arguments Examples

View source: R/bhl_bioherlib.R

Description

Search BHL across many API methods.

Usage

1
2
3
4
5
6
7
8
9
bhl_bioherlib(
  method = "GetPageMetadata",
  pageid = NULL,
  ocr = FALSE,
  names = FALSE,
  as = "table",
  key = NULL,
  ...
)

Arguments

method

The API method to use.

pageid

The identifier of an individual page in a scanned book.

ocr

return ocr text of the page (logical). Default: FALSE

names

return the names that appear on the page (logical). Default: 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

1
2
3
4
5
6
7
8
9
## Not run: 
bhl_bioherlib(method='GetPageMetadata', pageid=1328690, ocr=TRUE,
  names=TRUE)
bhl_bioherlib(method='GetPageMetadata', pageid=1328690, ocr=TRUE,
  names=TRUE, as="xml")
bhl_bioherlib(method='GetPageMetadata', pageid=1328690, ocr=TRUE,
  names=TRUE, as="list")

## End(Not run)

rbhl documentation built on May 13, 2021, 9:07 a.m.