Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Bearer token calls to ADS API. #68

Merged
merged 2 commits into from
Feb 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/python_actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ 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@v3
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the story behind this one? Is this something we're going to run into with other repos?

with:
name: coverage-citationcapture

Expand Down
4 changes: 2 additions & 2 deletions ADSCitationCapture/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def _request_citations_page(app, bibcode, start, rows):
'sort': 'date desc, bibcode desc',
})
headers = {}
headers["Authorization"] = "Bearer:{}".format(app.conf['ADS_API_TOKEN'])
headers["Authorization"] = "Bearer {}".format(app.conf['ADS_API_TOKEN'])
url = app.conf['ADS_API_URL']+"search/query?"+params
r_json = {}
try:
Expand Down Expand Up @@ -117,7 +117,7 @@ def _get_canonical_bibcodes(app, n_chunk, total_n_chunks, bibcodes_chunk, timeou
'rows': len(bibcodes_chunk),
})
headers = {}
headers["Authorization"] = "Bearer:{}".format(app.conf['ADS_API_TOKEN'])
headers["Authorization"] = "Bearer {}".format(app.conf['ADS_API_TOKEN'])
headers["Content-Type"] = "big-query/csv"
url = app.conf['ADS_API_URL']+"search/bigquery?"+params
r_json = {}
Expand Down
Loading