Skip to content

Commit

Permalink
Limit oc_coci to 100 DOIs per query. Fixes #9
Browse files Browse the repository at this point in the history
  • Loading branch information
David Selby committed Oct 18, 2024
1 parent b3b11ca commit 0148c5b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Title: Client for the Open Citations Corpus
Description: Client for the Open Citations Corpus (<http://opencitations.net/>).
Includes a set of functions for getting one identifier type from another,
as well as getting references and citations for a given identifier.
Version: 0.3.1.9000
Version: 0.3.2.9000
Authors@R: c(
person("Scott", "Chamberlain", role = "aut",
email = "[email protected]",
Expand Down
2 changes: 2 additions & 0 deletions R/oc_coci.R
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ oc_coci_stub <- function(path, doi, exclude, filter, sort, ...) {
assert(exclude, "character")
assert(filter, "character")
assert(sort, "character")
if (length(doi) > 100)
stop(sprintf("You are requesting too many DOIs (%d); please limit to <= 100 per query", length(doi)))
args <- cp(list(exclude = exclude, filter = filter, sort = sort))
doi <- paste0(doi, collapse = "__")
x <- oc_GET(coci_base, file.path(coci_meta, path, doi),
Expand Down

0 comments on commit 0148c5b

Please sign in to comment.