Search collections from the Digital Public Library of America (DPLA).

Description

Search collections from the Digital Public Library of America (DPLA).

Usage

1
2
3
dpla_collections(q = NULL, title = NULL, description = NULL,
  fields = NULL, sort_by = NULL, page_size = 10, page = NULL,
  key = NULL, ...)

Arguments

q

(character) Query terms.

title

(character) Query in the title field

description

(character) Query in the description field

fields

(character) A vector of the fields to return in the output. The default is all fields. See dpla_fields for options.

sort_by

(character) The default sort order is ascending. Most, but not all fields can be sorted on. Attempts to sort on an un-sortable field will return the standard error structure with a HTTP 400 status code.

page_size

(integer) Number of items to return. Default: 10. Max: 500.

page

(integer) Page number to return. Default: NULL (which means this parameter is not passed to DPLA, so they default to 1)

key

(character) Your DPLA API key. See dpla_get_key

...

Curl options passed on to GET

Value

A list with two slots:

  • meta - a tibble/data.frame of metadata for the response, with one row and two columns:

    • found - number of records found matching criteria

    • returned - number of records returned

  • data - a tibble/data.frame of the data; empty data.frame if no data matches your request; structure varies depending on search criteria

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
dpla_collections(q="university of texas", page_size=2)
dpla_collections(q="university of texas", fields='id', page_size=2)
dpla_collections(q="university of texas", sort_by='title', page_size=5)
dpla_collections(title="paso")
dpla_collections(description="east")

# use curl options
library("httr")
dpla_collections(q="university", config = httr::verbose())

## End(Not run)