-
Notifications
You must be signed in to change notification settings - Fork 1
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
query CrossRef, DataCite, and Re3data when DOI provided as linked identifier #23
Comments
This comment applies to arXiv as well (#24); while arbitrary sites may not be allowed, it appears that CrossRef (or at least dx.doi.org), DataCite, and arXiv all allow requests from github.com in their CORS policy. So it should be beneficial to build this into the client and build a server to run that same client code as a backup. If someone wants to host an instance of metajelo, it is likely they could request that these providers add their site to the CORS policy. |
Here's the test code I used to make requests: <!doctype html>
<html lang=en>
<head>
<meta charset=utf-8>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Tests for purescript</title>
</head>
<body>
<div class= "pure-g">
<div class="pure-u-1-1">
<div id="metajelo_ui_root"></div>
</div>
</div>
<script type="application/javascript" charset="utf-8">
function reqListener () {
console.log(this.responseText);
}
var oReq = new XMLHttpRequest();
oReq.addEventListener("load", reqListener);
// oReq.open("GET", "https://export.arxiv.org/api/query?search_query=all:electron&start=0&max_results=1");
// oReq.send();
oReq.open("GET", "https://dx.doi.org/10.5555/515151");
oReq.setRequestHeader('Accept', 'application/json');
oReq.send();
// oReq.open("GET", "https://api.test.datacite.org/dois/10.5438/0012");
// oReq.send();
</script>
</body>
</html> |
|
In the case of failure, show relevant raw data to the user in a message so they can make the edits manually. |
Both CrossRef and DataCite have API to query information.
The text was updated successfully, but these errors were encountered: