Skip to content

Commit

Permalink
Merge 0e3c808 into b9dadce
Browse files Browse the repository at this point in the history
  • Loading branch information
femalves committed Mar 5, 2024
2 parents b9dadce + 0e3c808 commit 41260f6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/python_actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ jobs:
python -m pip install --upgrade wheel setuptools pip
pip install coverage==5.2.1
pip install coveralls==2.2.0
- uses: actions/download-artifact@master
- uses: actions/download-artifact@v2
with:
name: coverage-adsorcid

Expand Down
6 changes: 3 additions & 3 deletions ADSOrcid/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def rec_builder(bibcode=None, orcidid=None, provenance=None, status=None, date=N
def _get_ads_orcid_profile(self, orcidid, api_token, api_url):
r = self.client.get(api_url,
params={'reload': True},
headers={'Accept': 'application/json', 'Authorization': 'Bearer:%s' % api_token})
headers={'Accept': 'application/json', 'Authorization': 'Bearer %s' % api_token})
if r.status_code == 200:
return r.json()
else:
Expand Down Expand Up @@ -420,7 +420,7 @@ def get_public_orcid_profile(self, orcidid):
@cachetools.cached(ads_cache)
def get_ads_orcid_profile(self, orcidid):
r = self.client.get(self._config.get('API_ORCID_EXPORT_PROFILE') % orcidid,
headers={'Accept': 'application/json', 'Authorization': 'Bearer:%s' % self._config.get('API_TOKEN')})
headers={'Accept': 'application/json', 'Authorization': 'Bearer %s' % self._config.get('API_TOKEN')})
if r.status_code != 200:
return None
else:
Expand Down Expand Up @@ -640,7 +640,7 @@ def retrieve_metadata(self, bibcode, search_identifiers=False):
}
r = self.client.get(self._config.get('API_SOLR_QUERY_ENDPOINT'),
params=params,
headers={'Accept': 'application/json', 'Authorization': 'Bearer:%s' % self._config.get('API_TOKEN')})
headers={'Accept': 'application/json', 'Authorization': 'Bearer %s' % self._config.get('API_TOKEN')})
if r.status_code != 200:
raise Exception('{}\n{}\n{}'.format(r.status_code, params, r.text))
else:
Expand Down

0 comments on commit 41260f6

Please sign in to comment.