Skip to content

Commit

Permalink
Fixed issue with registering custom discovery URIs.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bob Aman committed Oct 7, 2011
1 parent 436e23c commit 55977ab
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion bin/google-api
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,17 @@ HTML
end
client = Google::APIClient.new(:authorization => nil)
if options[:discovery_uri]
client.discovery_uri = options[:discovery_uri]
if options[:api] && options[:version]
client.register_discovery_uri(
options[:api], options[:version], options[:discovery_uri]
)
else
STDERR.puts(
'Cannot register a discovery URI without ' +
'specifying an API and version.'
)
exit(1)
end
end
version = api_version(api_name, options[:version])
api = client.discovered_api(api_name, version)
Expand Down

0 comments on commit 55977ab

Please sign in to comment.