diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2019-01-08 14:35:46 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2019-01-08 14:35:46 -0800 |
commit | d1862ea4a6dcb781713ffc54bdc4bd7d7cdbdb9e (patch) | |
tree | 7e84e4848ecbe2d2c5e013c2f16eb19ada634b13 /python/fatcat_tools/api_auth.py | |
parent | fc74ae5843d78fd072fbdce483db4608577a4794 (diff) | |
download | fatcat-d1862ea4a6dcb781713ffc54bdc4bd7d7cdbdb9e.tar.gz fatcat-d1862ea4a6dcb781713ffc54bdc4bd7d7cdbdb9e.zip |
start updating importer auth with crossref importer
Diffstat (limited to 'python/fatcat_tools/api_auth.py')
-rw-r--r-- | python/fatcat_tools/api_auth.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/python/fatcat_tools/api_auth.py b/python/fatcat_tools/api_auth.py index b36d467c..c49051f6 100644 --- a/python/fatcat_tools/api_auth.py +++ b/python/fatcat_tools/api_auth.py @@ -1,5 +1,5 @@ -import sys +import os, sys import fatcat_client from fatcat_client.rest import ApiException @@ -23,7 +23,7 @@ def authenticated_api(host_uri, token=None): conf = fatcat_client.Configuration() conf.host = host_uri if not token: - token = sys.env['FATCAT_API_AUTH_TOKEN'] + token = os.environ['FATCAT_API_AUTH_TOKEN'] if not token: sys.stderr.write( 'This client requires a fatcat API token (eg, in env var FATCAT_API_AUTH_TOKEN)\n') @@ -34,7 +34,7 @@ def authenticated_api(host_uri, token=None): api = fatcat_client.DefaultApi(fatcat_client.ApiClient(conf)) # verify up front that auth is working - api.check_auth() + api.auth_check() return api |