Skip to contents

Resolves and downloads a media capsule by id. MorphoSource enforces a data-use agreement on every download, so use_statement is required and agreements_accepted is sent as TRUE; restricted media additionally need per-item permission granted on the website. The key comes from api_key or MORPHOSOURCE_API_KEY and travels only in the Authorization header.

Usage

morie_taphonomy_morphosource_fetch(
  media_id,
  use_statement,
  use_categories = NULL,
  use_category_other = NULL,
  dest = tempdir(),
  api_key = NULL
)

Arguments

media_id

MorphoSource media id.

use_statement

Required free-text statement of intended use.

use_categories

Optional character vector of use categories.

use_category_other

Optional free-text for the "other" category.

dest

Directory to write the capsule (default tempdir()).

api_key

Optional key; else MORPHOSOURCE_API_KEY.

Value

Path to the downloaded .zip capsule.

Examples

# \donttest{
# morie_taphonomy_morphosource_fetch(
#   media_id = 000000, use_statement = "Non-commercial taphonomy research")
# }