Class: TrustedSearch::V2::Hook
- Inherits:
-
ApiVersion2
- Object
- APIResource
- Api
- ApiVersion2
- TrustedSearch::V2::Hook
- Defined in:
- lib/trustedsearch/v2/hooks.rb
Instance Attribute Summary collapse
-
#resource ⇒ Object
Returns the value of attribute resource.
Instance Method Summary collapse
-
#index ⇒ Object
Retrieve an array of all available hooks.
-
#initialize ⇒ Hook
constructor
A new instance of Hook.
-
#show(id = nil) ⇒ Object
Get the details of a single hook.
Methods inherited from ApiVersion2
Methods inherited from APIResource
#base_path, #class_name, #delete, #end_point, #get, #get_time, #has_keys, #post, #process, #put, #request, #sign_request
Constructor Details
#initialize ⇒ Hook
Returns a new instance of Hook.
6 7 8 |
# File 'lib/trustedsearch/v2/hooks.rb', line 6 def initialize @resource = 'hooks' end |
Instance Attribute Details
#resource ⇒ Object
Returns the value of attribute resource.
4 5 6 |
# File 'lib/trustedsearch/v2/hooks.rb', line 4 def resource @resource end |
Instance Method Details
#index ⇒ Object
Retrieve an array of all available hooks
11 12 13 14 |
# File 'lib/trustedsearch/v2/hooks.rb', line 11 def index() method_url = @resource return self.get(method_url) end |
#show(id = nil) ⇒ Object
Get the details of a single hook
17 18 19 20 21 |
# File 'lib/trustedsearch/v2/hooks.rb', line 17 def show(id = nil) method_url = @resource + "/" + id params = {} return self.get(method_url, params) end |