diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2019-09-05 18:49:36 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2019-09-05 18:49:36 -0700 |
commit | 28d2d94a9100c1a809955cde93fdbb7a36263057 (patch) | |
tree | b61675cbd21f28da15dabf4361cf86bad565f1c4 /python/fatcat_tools/api_auth.py | |
parent | 070069cb6eb71b92a9c4e46f3d4cfabb67f4eb3f (diff) | |
download | fatcat-28d2d94a9100c1a809955cde93fdbb7a36263057.tar.gz fatcat-28d2d94a9100c1a809955cde93fdbb7a36263057.zip |
refactor all python source for client lib name
Diffstat (limited to 'python/fatcat_tools/api_auth.py')
-rw-r--r-- | python/fatcat_tools/api_auth.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/python/fatcat_tools/api_auth.py b/python/fatcat_tools/api_auth.py index 3c643cea..add03399 100644 --- a/python/fatcat_tools/api_auth.py +++ b/python/fatcat_tools/api_auth.py @@ -1,7 +1,7 @@ import os, sys -import fatcat_client -from fatcat_client.rest import ApiException +import fatcat_openapi_client +from fatcat_openapi_client.rest import ApiException def public_api(host_uri): @@ -10,9 +10,9 @@ def public_api(host_uri): if the API isn't going to be used, so it's important that it doesn't try to actually connect to the API host or something. """ - conf = fatcat_client.Configuration() + conf = fatcat_openapi_client.Configuration() conf.host = host_uri - return fatcat_client.DefaultApi(fatcat_client.ApiClient(conf)) + return fatcat_openapi_client.DefaultApi(fatcat_openapi_client.ApiClient(conf)) def authenticated_api(host_uri, token=None): """ @@ -20,7 +20,7 @@ def authenticated_api(host_uri, token=None): is needed, so it does try to connect and verify credentials. """ - conf = fatcat_client.Configuration() + conf = fatcat_openapi_client.Configuration() conf.host = host_uri if not token: token = os.environ['FATCAT_API_AUTH_TOKEN'] @@ -31,7 +31,7 @@ def authenticated_api(host_uri, token=None): conf.api_key["Authorization"] = token conf.api_key_prefix["Authorization"] = "Bearer" - api = fatcat_client.DefaultApi(fatcat_client.ApiClient(conf)) + api = fatcat_openapi_client.DefaultApi(fatcat_openapi_client.ApiClient(conf)) # verify up front that auth is working api.auth_check() |