ropensci / openalexR

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

oa_fetch works with author_id as NULL #200

Closed yhan818 closed 8 months ago

yhan818 commented 8 months ago

I ran code as below

author_works <- oa_fetch( entity = "works", author.id = author_id, publication_year = publication_year, verbose = TRUE }

It the author_id is null, the oa_fetch will fetch all the records for that year. e.g For year 2022. it did

"Requesting url: https://api.openalex.org/works?filter=publication_year%3A2022 Getting 44486 pages of results with a total of 8897078 records... "

Shall this case be taken care of ? Maybe throw an exception?