def document_api_from_discovery_document(uri):
 http = build_http()
 (response, content) = http.request(FLAGS.discovery_uri)
 discovery = json.loads(content)
 service = build_from_document(discovery)
 name = discovery['version']
 version = safe_version(discovery['version'])
 document_collection_recursive(service, ('%s_%s.' % (name, version)), discovery, discovery)

def document_api_from_discovery_document ( uri ) : http = build_http ( ) ( response , content ) = http . request ( FLAGS . discovery_uri ) discovery = json . loads ( content ) service = build_from_document ( discovery ) name = discovery [ 'version' ] version = safe_version ( discovery [ 'version' ] ) document_collection_recursive ( service , ( '%s_%s.' % ( name , version ) ) , discovery , discovery )
document the given api .