check_filters: Check the filters against api filters

View source: R/check_filters.R

check_filtersR Documentation

Check the filters against api filters

Description

This function is used within data fetching functions to verify that the list of provided filters are known to exist. If a filter cannot be found, a warning is printed out the screen. If the global api filter object does exist, it is populated before proceeding.

Usage

check_filters(endpoint, filters)

Arguments

endpoint
  • the name of the api endpoint

filters
  • vector of filter names that are to be applied to the endpoint.

Value

list

Author(s)

Adam Cottrill adam.cottrill@ontario.ca

Examples

check_filters("stocking_events", list("year"=2012, "species"="LAT"))
check_filters("stocking_events", list("year"=2012, "species"="LAT", 'col'="red"))
check_filters("foo", list("year"=2012, "species"="LAT"))

AdamCottrill/GLFishStockR documentation built on Sept. 3, 2022, 10:26 p.m.