bhl_getitemmetadata: Return metadata about an item.

Description Usage Arguments Examples

View source: R/bhl_getitemmetadata.R

Description

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

Usage

1
2
3
4
5
6
7
8
9
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

1
2
3
4
5
6
7
8
## 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)

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