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, api_app)

Arguments

endpoint
  • the name of the api endpoint

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

api_app
  • the name of the api application to fetch the filters from.

Value

list

Author(s)

Adam Cottrill adam.cottrill@ontario.ca

Examples

check_filters("fn125", list(year = "2022", lake = "ON"), "fn_portal")
check_filters("fn125", list(year = "2022", lake = "ON", colour = "blue"), "fn_portal")
check_filters("foo", list(year = "2022", lake = "ON"), "fn_portal")

AdamCottrill/glfishr documentation built on Aug. 9, 2024, 5:47 p.m.