Updated to use v1 of the discovery API.
[arvados.git] / lib / google / api_client.rb
index 1b6150727a880d41711417fe8a8fb1d99eec57be..2e062ac4d3e1247095ed542394f0eda614da7397 100644 (file)
@@ -219,11 +219,9 @@ module Google
     # @return [Addressable::URI] The URI of the directory document.
     def directory_uri
       template = Addressable::Template.new(
-        "https://{host}/discovery/v0.3/directory"
+        "https://{host}/discovery/v1/apis"
       )
-      return template.expand({
-        "host" => self.host
-      })
+      return template.expand({"host" => self.host})
     end
 
     ##
@@ -250,8 +248,8 @@ module Google
       version = version || 'v1'
       return @discovery_uris["#{api}:#{version}"] ||= (begin
         template = Addressable::Template.new(
-          "https://{host}/discovery/v0.3/describe/" +
-          "{api}/{version}"
+          "https://{host}/discovery/v1/apis/" +
+          "{api}/{version}/rest"
         )
         template.expand({
           "host" => self.host,