|
|
@ -60,6 +60,7 @@ def get_authenticated_service(): |
|
|
|
check_authenticated_scopes() |
|
|
|
flow = InstalledAppFlow.from_client_secrets_file( |
|
|
|
CLIENT_SECRETS_FILE, SCOPES) |
|
|
|
|
|
|
|
if exists(CREDENTIALS_PATH): |
|
|
|
with open(CREDENTIALS_PATH, 'r') as f: |
|
|
|
credential_params = json.load(f) |
|
|
@ -76,7 +77,7 @@ def get_authenticated_service(): |
|
|
|
p = copy.deepcopy(vars(credentials)) |
|
|
|
del p["expiry"] |
|
|
|
json.dump(p, f) |
|
|
|
return build(API_SERVICE_NAME, API_VERSION, credentials=credentials, cache_discovery=False) |
|
|
|
return build(API_SERVICE_NAME, API_VERSION, credentials=credentials, cache_discovery=False) |
|
|
|
|
|
|
|
|
|
|
|
def check_authenticated_scopes(): |
|
|
|