class TrustedSearch::V2::HookSubscription
Attributes
resource[RW]
Public Class Methods
new()
click to toggle source
# File lib/trustedsearch/v2/hook_subscriptions.rb, line 6 def initialize @resource = 'hook-subscriptions' end
Public Instance Methods
create(data = nil)
click to toggle source
Create a new subscription
# File lib/trustedsearch/v2/hook_subscriptions.rb, line 24 def create(data = nil) method_url = @resource params = {} return self.post(method_url, params, data) end
destroy(id = nil)
click to toggle source
Delete/Destroy a subscription
# File lib/trustedsearch/v2/hook_subscriptions.rb, line 38 def destroy(id = nil) method_url = @resource + "/" + id return self.delete(method_url) end
index()
click to toggle source
Retrieve an array of all hook subscriptions
# File lib/trustedsearch/v2/hook_subscriptions.rb, line 11 def index() method_url = @resource return self.get(method_url) end
show(id = nil)
click to toggle source
Show the details of a single hook
# File lib/trustedsearch/v2/hook_subscriptions.rb, line 17 def show(id = nil) method_url = @resource + "/" + id params = {} return self.get(method_url, params) end
update(id = nil, data)
click to toggle source
Update a subscription
# File lib/trustedsearch/v2/hook_subscriptions.rb, line 31 def update(id = nil, data) method_url = @resource + "/" + id params = {} return self.put(method_url, params, data) end