A set of functions to build a lookup cache, add new tables to it, and retrieve cached data. The cache is used to store lookup tables for species, age classes, survey types, and other related data.
Usage
build_cache()
add_cache_tables(api, endpoint)
get_cached_data(table, filter_fn = NULL, api = NULL, endpoint = NULL)Value
build_cache()invisibly returns a named list of tibbles. Keys include:species,project_species,age_classes,management_units,analysis_units,analysis_unit_versions, andparameters. Additional keys may be present depending on the API response.get_cached_data()returns a tibble. Iffilter_fnreduces results to zero rows, a 0-row tibble with the same columns is returned. Aborts if the requested table is not found in the cache.add_cache_tables()invisibly returns the entire cache (a named list of all tibbles, not just the newly added ones).