@citation-js/plugin-doi
Advanced tools
Comparing version 0.7.14 to 0.7.16
@@ -10,3 +10,3 @@ "use strict"; | ||
var _json = _interopRequireDefault(require("./json.js")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } | ||
const apiOptions = { | ||
@@ -13,0 +13,0 @@ checkContentType: true, |
@@ -8,3 +8,3 @@ "use strict"; | ||
var _type = _interopRequireDefault(require("./type.js")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } | ||
function parseDoiJson(data) { | ||
@@ -11,0 +11,0 @@ const res = { |
{ | ||
"name": "@citation-js/plugin-doi", | ||
"version": "0.7.14", | ||
"version": "0.7.16", | ||
"description": "Plugin for DOI input for Citation.js", | ||
@@ -47,3 +47,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "1e5f61227c10efc8387ef55816a8d8cf224471f5" | ||
"gitHead": "b0076f70a41efbafffe5fa206f43addc0a01a78b" | ||
} |
@@ -22,2 +22,20 @@ # @citation-js/plugin-doi | ||
### 'Polite' API access | ||
The plugin fetches data from DOIs using [DOI Content Negotiation](https://citation.crosscite.org/docs), | ||
which means the Crossref, DataCite, and mEDRA APIs are indirectly used. | ||
[Crossref strongly encourages](https://api.crossref.org/swagger-ui/index.html) | ||
adding a `mailto:` link to the `User-Agent` header or URL parameters | ||
to get higher rate limits. Because the Crossref API is only used indirectly, | ||
the URL parameter method cannot be used consistently. Additionally, the `User-Agent` | ||
header cannot be set in the browser. For non-browser usage however, | ||
the user agent can be set like this: | ||
```js | ||
const { util, version } = require('@citation-js/core') | ||
util.setUserAgent(`Example Foo (mailto:foo@example.org) Citation.js/${version} Node.js/${process.versions.node}`) | ||
``` | ||
## Formats | ||
@@ -24,0 +42,0 @@ |
12201
56