Skip to content

Commit

Permalink
feat: add citationStyles property to Paper (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielnsilva committed Dec 27, 2023
1 parent c278e5d commit 1e7e6b0
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions semanticscholar/Paper.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@ class Paper(SemanticScholarObject):
'authors.paperCount',
'authors.url',
'citationCount',
'citationStyles',
'citations',
'citations.abstract',
'citations.authors',
'citations.citationCount',
'citations.citationStyles',
'citations.corpusId',
'citations.externalIds',
'citations.fieldsOfStudy',
Expand Down Expand Up @@ -94,6 +96,7 @@ class Paper(SemanticScholarObject):
'abstract',
'authors',
'citationCount',
'citationStyles',
'corpusId',
'externalIds',
'fieldsOfStudy',
Expand All @@ -118,6 +121,7 @@ def __init__(self, data) -> None:
self._abstract = None
self._authors = None
self._citationCount = None
self._citationStyles = None
self._citations = None
self._corpusId = None
self._embedding = None
Expand Down Expand Up @@ -161,6 +165,13 @@ def citationCount(self) -> int:
'''
return self._citationCount

@property
def citationStyles(self) -> dict:
'''
:type: :class:`dict`
'''
return self._citationStyles

@property
def citations(self) -> list:
'''
Expand Down Expand Up @@ -320,6 +331,8 @@ def _init_attributes(self, data) -> None:
self._authors = items
if 'citationCount' in data:
self._citationCount = data['citationCount']
if 'citationStyles' in data:
self._citationStyles = data['citationStyles']
if 'citations' in data:
items = []
for item in data['citations']:
Expand Down

0 comments on commit 1e7e6b0

Please sign in to comment.