Class: Gcloud::Search::APIClient::ResourcePath
- Inherits:
-
Object
- Object
- Gcloud::Search::APIClient::ResourcePath
- Defined in:
- lib/gcloud/search/api_client.rb
Overview
Return type for DiscoveredApi http verb methods
Direct Known Subclasses
Instance Method Summary collapse
- #api_method(method, path = nil) ⇒ Object
- #create ⇒ Object
- #delete ⇒ Object
- #get ⇒ Object
-
#initialize(api_name, api_version, resource_root, resource_id_param) ⇒ ResourcePath
constructor
:nodoc:.
- #list ⇒ Object
Constructor Details
#initialize(api_name, api_version, resource_root, resource_id_param) ⇒ ResourcePath
:nodoc:
74 75 76 77 78 |
# File 'lib/gcloud/search/api_client.rb', line 74 def initialize api_name, api_version, resource_root, resource_id_param @root = "https://#{api_name}.googleapis.com/#{api_version}" \ "/projects/{projectId}/#{resource_root}" @resource_id_param = resource_id_param end |
Instance Method Details
#api_method(method, path = nil) ⇒ Object
96 97 98 |
# File 'lib/gcloud/search/api_client.rb', line 96 def api_method method, path = nil { method: method, uri: "#{@root}#{path}" } end |
#create ⇒ Object
80 81 82 |
# File 'lib/gcloud/search/api_client.rb', line 80 def create api_method :post end |
#delete ⇒ Object
84 85 86 |
# File 'lib/gcloud/search/api_client.rb', line 84 def delete api_method :delete, "/{docId}" end |
#get ⇒ Object
88 89 90 |
# File 'lib/gcloud/search/api_client.rb', line 88 def get api_method :get, "/{docId}" end |
#list ⇒ Object
92 93 94 |
# File 'lib/gcloud/search/api_client.rb', line 92 def list api_method :get end |