Class: Google::APIClient

Inherits:
Object
  • Object
show all
Defined in:
lib/arvados.rb

Instance Method Summary collapse

Instance Method Details

#discovery_document(api, version) ⇒ Object



105
106
107
108
109
110
111
112
113
114
115
116
# File 'lib/arvados.rb', line 105

def discovery_document(api, version)
  api = api.to_s
  return @discovery_documents["#{api}:#{version}"] ||=
    begin
      response = self.execute!(
                               :http_method => :get,
                               :uri => self.discovery_uri(api, version),
                               :authenticated => false
                               )
      response.body.class == String ? JSON.parse(response.body) : response.body
    end
end