Created
September 28, 2023 00:19
-
-
Save bcoe/a3c6ec96f7cfea8d5464614d46eea0c7 to your computer and use it in GitHub Desktop.
testing cached discovery
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from googleapiclient import discovery | |
api_scopes = ["https://www.googleapis.com/auth/cloud-platform"] | |
api_version = "v1" | |
discovery_api = "https://cloudiot.googleapis.com/$discovery/rest" | |
service_name = "cloudiot" | |
discovery_url = "{}?version={}".format(discovery_api, api_version) | |
client = discovery.build( | |
service_name, | |
api_version, | |
discoveryServiceUrl=discovery_url, | |
credentials=scoped_credentials, | |
cache_discovery=True, | |
devices = client.projects().locations().registries().devices() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment