CrossRef

CrossRef extension.

CrossRef extension is initialized like this:

>>> from flask import Flask
>>> from invenio.ext.crossref import CrossRef
>>> app = Flask("myapp")
>>> ext = CrossRef(app=app)

Configuration Settings

The details of the CrossRef URL and endpoint can be customized in the application settings.

CROSSREF_API_URL The URL of CrossRef query API. Default: http://api.crossref.org/works
CROSSREF_ENDPOINT The name of Flask endpoint for new application route. If the value is False (or None) the url rule is not registered. Default: _crossref.search
CROSSREF_URL_RULE The URL for CROSSREF_ENPOINT (i.e. url_for(current_app.config[‘CROSSREF_ENDPOINT’]) is equal TO current_app.config[‘CROSSREF_ENDPOINT’] ). Default: /crossref/search
CROSSREF_SEARCH_PREFIX The prefix used to perform the database search.
class invenio.ext.crossref.CrossRef(app=None)

CrossRef extension implementation.

Initialization of the extension:

>>> from flask import Flask
>>> from invenio.ext.crossref import CrossRef
>>> app = Flask("myapp")
>>> ext = CrossRef(app=app)

or alternatively using the factory pattern:

>>> app = Flask("myapp")
>>> ext = CrossRef()
>>> ext.init_app(app)
get_json(doi)

Get CrossRef json data.

get_response(crossref_doi)

Get CrossRef response from the CROSSREF_API_URL page.

init_app(app)

Initialize a Flask application.

search(doi=None)

Search for given DOI.