ropensci / openalexR

Getting bibliographic records from OpenAlex
https://docs.ropensci.org/openalexR/
Other
89 stars 19 forks source link

empty filter check #201

Closed yjunechoe closed 5 months ago

yjunechoe commented 5 months ago

Fixes #200

oa_query() now errors if it receives a filter with a missing value, instead of silently ignoring it. Guards against users accidentally specifying a filter that ends up not doing anything.

author_id <- NULL
author_works <- oa_fetch(
  entity = "works",
  author.id = author_id,
  publication_year = 2022,
  verbose = TRUE
)
#> Error: Filters must have a value: author.id