bhl_subjectmetadata: Get metadata about a subject

View source: R/bhl_subjectmetadata.R

bhl_subjectmetadataR Documentation

Get metadata about a subject

Description

Get metadata about a subject

Usage

bhl_subjectmetadata(subject, pubs = FALSE, as = "table", key = NULL, ...)

Arguments

subject

(character) he subject for which to return metadata

pubs

(logical) TRUE to return the subject's publications. 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()

Details

You may choose to include a list of the subject's publications. The BHLType element identifies the type of each publication (Title or Part).

Examples

## Not run: 
bhl_subjectmetadata(subject = "water")
x <- bhl_subjectmetadata(subject = "water", pubs = TRUE)
head(x$Publications[[1]])

## End(Not run)

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