(api_name, api_version)
return content
Get a discovery doc from the discovery server.
Get a discovery doc from the discovery server.
Get a discovery doc from the discovery server .
def GetApiDiscovery(api_name, api_version):
  """Get a discovery doc from the discovery server."""
  api_path = 'apis/%s/%s/rest' % (api_name, api_version)

  discovery_url = 'https://%s/discovery/%s/%s' % (
      FLAGS.discovery_server, FLAGS.discovery_version, api_path)
  http = httplib2.Http()
  _, content = http.request(discovery_url)
  discovery_doc = json.loads(content)
  error = discovery_doc.get('error')
  if error:
    raise app.Error(error)
  return content
def GetApiDiscovery ( api_name , api_version ) : api_path = 'apis/%s/%s/rest' % ( api_name , api_version ) discovery_url = 'https://%s/discovery/%s/%s' % ( FLAGS . discovery_server , FLAGS . discovery_version , api_path ) http = httplib2 . Http ( ) _ , content = http . request ( discovery_url ) discovery_doc = json . loads ( content ) error = discovery_doc . get ( 'error' ) if error : raise app . Error ( error ) return content