diff options
author | Bu Sun Kim <8822365+busunkim96@users.noreply.github.com> | 2020-07-22 17:02:09 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-22 17:02:09 -0700 |
commit | d059ad881c7ae58c67931c48788d0bd7343ab16c (patch) | |
tree | c2dda487c8702c56c65e9c6a18a63567db789f80 /describe.py | |
parent | c72efbc6b71c963997c5728d471c04ab33d95e4f (diff) | |
download | google-api-python-client-d059ad881c7ae58c67931c48788d0bd7343ab16c.tar.gz |
docs: update generated docs (#981)
Diffstat (limited to 'describe.py')
-rwxr-xr-x | describe.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/describe.py b/describe.py index 9bf8cd63a..f60d72dc6 100755 --- a/describe.py +++ b/describe.py @@ -379,12 +379,13 @@ def document_collection_recursive(resource, path, root_discovery, discovery): ) -def document_api(name, version): +def document_api(name, version, uri): """Document the given API. Args: name: string, Name of the API. version: string, Version of the API. + uri: string, URI of the API's discovery document """ try: service = build(name, version) @@ -397,7 +398,7 @@ def document_api(name, version): http = build_http() response, content = http.request( - uritemplate.expand( + uri or uritemplate.expand( FLAGS.discovery_uri_template, {"api": name, "apiVersion": version} ) ) @@ -443,7 +444,7 @@ if __name__ == "__main__": if resp.status == 200: directory = json.loads(content)["items"] for api in directory: - document_api(api["name"], api["version"]) + document_api(api["name"], api["version"], api["discoveryRestUrl"]) api_directory[api["name"]].append(api["version"]) # sort by api name and version number |