Function to query the iDigBio API for media records
Usage
idig_search_media(
mq = FALSE,
rq = FALSE,
fields = FALSE,
max_items = 1e+05,
limit = 0,
offset = 0,
sort = FALSE,
...
)
Arguments
- mq
iDigBio media query in nested list format
- rq
iDigBio record query in nested list format
- fields
vector of fields that will be contained in the data.frame, defaults to "all" which is all indexed fields
- max_items
maximum number of results allowed to be retrieved (fail -safe)
- limit
maximum number of results returned
- offset
number of results to skip before returning results
- sort
vector of fields to use for sorting, UUID is always appended to make paging safe
- ...
additional parameters
Value
A data frame with fields requested or the following default fields:
datemodified: Date last modified, which is assigned by iDigBio.
dqs: Data quality score assigned by iDigBio.
etag: Tag assigned by iDigBio.
flags: Data quality flag assigned by iDigBio.
hasSpecimen: TRUE or FALSE, indicates if there is an associated record for this media.
mediatype: Media object type.
recordids: List of UUID for associated records.
records: UUID for the associated record.
recordset: Record set ID assigned by iDigBio.
uuid: Unique identifier assigned by iDigBio.
version: Media record version assigned by iDigBio.
xpixels: As defined by EXIF, x dimension in pixel.
ypixels: As defined by EXIF,y dimension in pixels.
Details
Also see idig_search_records
for the full examples of all the
parameters related to searching iDigBio.
Wraps idig_search
to provide defaults specific to searching
media records. Using this function instead of idig_search
directly is recommened. Record queries and media queries objects are allowed
(rq and mq parameters) and media records returned will match the
requirements of both.
This function defaults to returning all indexed media record fields.
Examples
if (FALSE) { # \dontrun{
# Searching for media using a query on related specimen information - first
# 10 media records with image URIs related to a specimen in the genus Acer:
df <- idig_search_media(rq=list(genus="acer"),
mq=list("data.ac:accessURI"=list("type"="exists")),
fields=c("uuid","data.ac:accessURI"), limit=10)
} # }