Class: Google::APIClient
- Inherits:
-
Object
- Object
- Google::APIClient
- Defined in:
- lib/arvados/google_api_client.rb
Instance Method Summary collapse
Instance Method Details
#discovery_document(api, version) ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/arvados/google_api_client.rb', line 6 def discovery_document(api, version) api = api.to_s discovery_uri = self.discovery_uri(api, version) discovery_uri_hash = Digest::MD5.hexdigest(discovery_uri) discovery_cache_path = File.("~/.cache/arvados/discovery-#{discovery_uri_hash}.json") @discovery_documents[discovery_uri_hash] ||= disk_cached_discovery_document(discovery_cache_path) or fetched_discovery_document(discovery_uri, discovery_cache_path) end |