MultimediaClient | R Documentation |
This client connects to all Multimedia-related endpoints of the NBA. Each endpoint is available as a class method (see section 'Methods' below). Optionally, a custom URL pointing to a NBA server and a user Agent can be specified by the user (see section 'Fields' below).
# client <- MultimediaClient$new()
R6 class
basePath
Stores url path of the request, defaults to http://api.biodiversitydata.nl/v2
userAgent
Set the user agent of the request, defaults to nbaR/0.1.0
count
Get the number of multimedia documents matching a given condition; Conditions given as query parameters or QuerySpec JSON.
Parameters:
query_spec
: Object of type QuerySpec or its JSON representation
queryParams
: named list or vector with query parameters
...
: additional parameters passed to httr::GET
Returns:
integer
count_distinct_values
Count the distinct number of values that exist for a given field; See also endpoint /getDistinctValues.
Parameters:
field
: Name of field in taxon object
...
: additional parameters passed to httr::GET
Returns:
integer
count_distinct_values_per_group
Count the distinct number of field values that exist per the given field to group by; See also endpoint /getDistinctValuesPerGroup.
Parameters:
group
: name of field in the multimedia object you want to group by
field
: name of field in the multimedia object
...
: additional parameters passed to httr::GET
Returns:
list
download_query
Dynamic download service: Query for multimedia objects and return result as a stream ...; Query with query parameters or querySpec JSON. ....
Parameters:
collection_type
: Example query param
queryParams
: named list or vector with query parameters
...
: additional parameters passed to httr::GET
Returns:
find
Find a multimedia document by id; If found, returns a single multimedia document.
Parameters:
id
: id of multimedia document
...
: additional parameters passed to httr::GET
Returns:
MultiMediaObject
find_by_ids
Find multimedia document by ids; Given multiple ids, returns a list of multimedia documents.
Parameters:
ids
: ids of multiple multimedia documents, separated by comma
...
: additional parameters passed to httr::GET
Returns:
MultiMediaObject
get_distinct_values
Get all different values that can be found for one field; A list of all fields for multimedia documents can be retrieved with /metadata/getFieldInfo.
Parameters:
field
: field
...
: additional parameters passed to httr::GET
Returns:
list
get_distinct_values_per_group
Get all distinct values (and their document count) for the field given divided per distinct value of the field to group by; See also endpoint /getDistinctValues.
Parameters:
group
: name of field in the multimedia object you want to group by
field
: name of field in the multimedia object
...
: additional parameters passed to httr::GET
Returns:
list
get_field_info
Returns extended information for each field of a multimedia document; Info consists of whether the fields is indexed, the ElasticSearch datatype and a list of allowed operators.
Parameters:
...
: additional parameters passed to httr::GET
Returns:
list
get_paths
Returns the full path of all fields within a document; See also metadata/getFieldInfo for all allowed operators per field.
Parameters:
...
: additional parameters passed to httr::GET
Returns:
character
get_setting
Get the value of an NBA setting; All settings can be queried with /metadata/getSettings.
Parameters:
name
: name of setting
...
: additional parameters passed to httr::GET
Returns:
list
get_settings
List all publicly available configuration settings for the NBA; The value of a specific setting can be queried with metadata/getSetting/name.
Parameters:
...
: additional parameters passed to httr::GET
Returns:
list
is_operator_allowed
Checks if a given operator is allowed for a given field; See also metadata/getFieldInfo.
Parameters:
field
: multimedia document field
operator
: operator
...
: additional parameters passed to httr::GET
Returns:
logical
query
Query for multimedia documents; Search for multimedia documents with query parameters or QuerySpec JSON string.
Parameters:
query_spec
: Object of type QuerySpec or its JSON representation
queryParams
: named list or vector with query parameters
...
: additional parameters passed to httr::GET
Returns:
QueryResult
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.