Skip to content

Commit

Permalink
Fix API URL definition issue
Browse files Browse the repository at this point in the history
  • Loading branch information
danielnsilva committed Nov 2, 2021
1 parent f11a32f commit eee1df9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions semanticscholar/SemanticScholar.py
Expand Up @@ -25,16 +25,16 @@ def __init__(
:param str api_url: (optional) custom API url.
'''

if api_key:
self.auth_header = {'x-api-key': api_key}
if not api_url:
self.api_url = self.DEFAULT_PARTNER_API_URL

if api_url:
self.api_url = api_url
else:
self.api_url = self.DEFAULT_API_URL

if api_key:
self.auth_header = {'x-api-key': api_key}
if not api_url:
self.api_url = self.DEFAULT_PARTNER_API_URL

self.timeout = timeout

def paper(self, id: str, include_unknown_refs: bool=False) -> dict:
Expand Down

0 comments on commit eee1df9

Please sign in to comment.