bhl_booksearch: Search for titles and items in BHL.

Description Usage Arguments Note Examples

View source: R/bhl_booksearch.R

Description

Search criteria includes title, author last name, volume, edition, year of publication, subject, language code, and collection identifier. Valid language codes and collection identifiers can be obtained from the getlanguages and getcollections functions. If year of publication is specified, it should be a 4-digit year. To execute a search, you must supply at least a title, author last name, or collection identifier.

Usage

1
2
3
bhl_booksearch(title = NULL, lname = NULL, volume = NULL,
  edition = NULL, year = NULL, collectionid = NULL, language = NULL,
  as = "table", key = NULL, ...)

Arguments

title

string to search for in the title (character)

lname

last name to search for (character)

volume

volume to search for (numeric)

edition

edition to search for (character)

year

year to search for, four characters, e.g, 1970 (numeric)

collectionid

collection identifier to search for (numeric)

language

language to search for (character)

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()

Note

Use bhl_getcollections() or bhl_getlanguages() to get acceptable terms

Examples

1
2
3
4
5
6
7
8
## Not run: 
bhl_booksearch(title='Selborne', lname='White', volume=2, edition='new',
   year=1825, collectionid=4, language='eng')
bhl_booksearch(title='evolution', year=2000, as='json')
bhl_booksearch('evolution', year=2000, as='xml')
bhl_booksearch('evolution', year=2000, as="list")

## End(Not run)

ropensci/rbhl documentation built on Oct. 26, 2018, 7:16 p.m.