fetch_record_metadata: Get and load SAFE dataset metadata

View source: R/metadata.R

fetch_record_metadataR Documentation

Get and load SAFE dataset metadata

Description

Internal handlers to i) ensure there are local copies of record metadata, fetching it from the SAFE project website if needed and ii) load that data from file.

Usage

fetch_record_metadata(record_set)

load_record_metadata(record_set)

Arguments

record_set

An object of class safe_record_set.

Details

This is the same metadata used to populate the Zenodo description but is downloaded as JSON format and stored within the record directory in the SAFE data directory for reuse.

Value

The fetch_record_metadata function invisibly returns a logical value indicating if all records were fetched successfully and load_record_metadata returns a list object containing record metadata

Functions

  • fetch_record_metadata: Download and store JSON metadata for a record

  • load_record_metadata: Load JSON metadata for a record

Examples

   
   set_example_safe_dir()
   rec <- validate_record_ids(1400562)
   safedata:::fetch_record_metadata(rec)
   metadata <- safedata:::load_record_metadata(rec)
   unset_example_safe_dir()
   

safedata documentation built on April 25, 2022, 5:05 p.m.