Skip to content

Commit

Permalink
Properties pubmed_id and pii for AbstractRetrieval
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael-E-Rose committed Jun 26, 2019
1 parent 886272c commit 107d5e0
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pybliometrics/scopus/abstract_retrieval.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,11 @@ def pageRange(self):
"""Page range."""
return chained_get(self._json, ['coredata', 'prism:pageRange'])

@property
def pii(self):
"""The PII (Publisher Item Identifier) of the document."""
return chained_get(self._json, ['coredata', 'pii'])

@property
def publicationName(self):
"""Name of source the document is published in."""
Expand All @@ -363,6 +368,11 @@ def publisheraddress(self):
"""Name of the publisher of the document."""
return chained_get(self._head, ['source', 'publisher', 'publisheraddress'])

@property
def pubmed_id(self):
"""The PubMed ID of the document."""
return chained_get(self._json, ['coredata', 'pubmed-id'])

@property
def refcount(self):
"""Number of references of an article.
Expand Down
11 changes: 11 additions & 0 deletions pybliometrics/scopus/tests/test_AbstractRetrieval.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,12 @@ def test_pageRange():
assert_equal(ab8.pageRange, None)


def test_pii():
assert_equal(ab4.pii, 'S0304407697000183')
assert_equal(ab5.pii, None)
assert_equal(ab6.pii, 'S0048969718335976')


def test_publicationName():
assert_equal(ab1.publicationName, 'ACS Catalysis')
assert_equal(ab8.publicationName, None)
Expand All @@ -325,6 +331,11 @@ def test_publisheraddress():
assert_equal(ab8.publisheraddress, None)


def test_pubmed_id():
assert_equal(ab6.pubmed_id, '30240917')
assert_equal(ab7.pubmed_id, None)


def test_refcount():
assert_equal(ab4.refcount, '18')
assert_equal(ab8.refcount, '48')
Expand Down

0 comments on commit 107d5e0

Please sign in to comment.