bhl_getitemmetadata: Return metadata about an item.

View source: R/bhl_getitemmetadata.R

bhl_getitemmetadataR Documentation

Return metadata about an item.

Description

You may choose to include a list of the item's pages.

Usage

bhl_getitemmetadata(
  itemid = NULL,
  pages = TRUE,
  ocr = FALSE,
  parts = FALSE,
  as = "table",
  key = NULL,
  ...
)

Arguments

itemid

item id (character)

pages

return the items pages (TRUE/FALSE)

ocr

(logical) TRUE to return the ocr for the item's pages. Setting this to TRUE apparently doesn't return any actual ocr text, but leaving parameter here for now.

parts

(logical) TRUE to return the item's parts. Setting this to TRUE apparently doesn't return any parts text, but leaving parameter here for now.

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_getitemmetadata('16800', TRUE)
bhl_getitemmetadata('16800', TRUE, as='xml')
bhl_getitemmetadata('16800', TRUE, as='json')
bhl_getitemmetadata('16800', TRUE, as='list')
bhl_getitemmetadata(20419, pages=FALSE, parts=TRUE)

## End(Not run)

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