pybliometrics.sciencedirect.ArticleEntitlement¶
ArticleEntitlement() implements the ScienceDirect Article Entitlement API.
The Article Entitlement API allows you to check whether you have access to a specific document. Further, it let’s you retrieve the identifiers of a document like the EID, DOI, PII, Scopus ID and Pubmed ID. The ‘FULL’ view is the default and only view available.
Documentation¶
- class pybliometrics.sciencedirect.ArticleEntitlement(identifier, view='FULL', id_type=None, refresh=False, **kwds)[source]¶
Class to retrieve the entitlement status for a document from ScienceDirect.
Class intended as superclass to perform retrievals.
- Parameters:
identifier (
int|str) – The ID to look for.id_type (
str|None, optional) – The type of the used ID. Will only take effect for the Abstract Retrieval API.Default:Nonekwds (
str) – Keywords passed on to requests header. Must contain fields and values specified in the respective API specification.view (str)
refresh (bool | int)
- Raises:
KeyError – If parameter api is not one of the allowed values.
- property status: str | None¶
Status of whether a document has been found
- property identifier: str | None¶
Identifier of a document.
- property eid: str | None¶
The EID of a document.
- property entitled: str | None¶
Entitlement status of a document.
- property link: str | None¶
ScienceDirect canonical URL.
- property message: str | None¶
Entitlement status message.
- property pii: str | None¶
The PII of a document.
- property pii_norm: str | None¶
The PII-norm of a document.
- property doi: str | None¶
The DOI of a document.
- property pubmed_id: str | None¶
The Pubmed ID of a document (when used in the request).
- property url: str | None¶
API URL used to check entitlement.
- property scopus_id: str | None¶
The Scopus ID of a document (when used in the request).
- get_cache_file_age()¶
Return the age of the cached file in days.
- Return type:
int
- get_cache_file_mdate()¶
Return the modification date of the cached file.
- Return type:
str
- get_key_remaining_quota()¶
Return number of remaining requests for the current key and the current API (relative on last actual request).
- Return type:
str | None
- get_key_reset_time()¶
Return time when current key is reset (relative on last actual request).
- Return type:
str | None
Examples¶
You initialize the class with an ID that ScienceDirect uses, e.g. the DOI:
>>> from pybliometrics.sciencedirect import ArticleEntitlement, init >>> init() >>> ae = ArticleEntitlement('10.1016/j.reseneeco.2015.06.001')
To check whether a document exists and whether you have access to it, you can use the status and entitled properties.
>>> ae.status 'found' >>> ae.entitled True
In addition to the entitlement status, ArticleEntitlement contains information about the document’s identifiers:
>>> ae.eid '1-s2.0-S092876551500038X' >>> ae.doi '10.1016/j.reseneeco.2015.06.001' >>> ae.pii 'S0928-7655(15)00038-X' >>> ae.pii_norm 'S092876551500038X' >>> ae.scopus_id '84935028440' >>> ae.pubmed_id None