Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resolve is publisher is on crossref #3

Open
maxheld83 opened this issue Jan 10, 2021 · 1 comment
Open

resolve is publisher is on crossref #3

maxheld83 opened this issue Jan 10, 2021 · 1 comment

Comments

@maxheld83
Copy link
Contributor

this is a good list that could be gotten off of CR.
Might belong into CR pkg.
Overlaps with subugoe/biblids#23

@maxheld83 maxheld83 transferred this issue from maxheld83/biblids Feb 10, 2021
@maxheld83
Copy link
Contributor Author

had this:

is_doi_on_cr <- function(x) {
  res <- httr::HEAD(
    url = paste0("https://api.crossref.org/works/", x)
  )
  if (res$status_code == 200) {
    return(TRUE)
  } else if (res$status_code == 404) {
    return(FALSE)
  } else {
    httr::stop_for_status(res)
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant