Class: Cryptohopper::Resources::Webhooks
- Inherits:
-
Object
- Object
- Cryptohopper::Resources::Webhooks
- Defined in:
- lib/cryptohopper/resources/webhooks.rb
Overview
‘client.webhooks` — developer webhook registration. Maps to the server’s ‘/api/webhook_*` endpoints; named for clarity.
Instance Method Summary collapse
- #create(data) ⇒ Object
- #delete(webhook_id) ⇒ Object
-
#initialize(client) ⇒ Webhooks
constructor
A new instance of Webhooks.
Constructor Details
#initialize(client) ⇒ Webhooks
Returns a new instance of Webhooks.
8 9 10 |
# File 'lib/cryptohopper/resources/webhooks.rb', line 8 def initialize(client) @client = client end |
Instance Method Details
#create(data) ⇒ Object
12 13 14 |
# File 'lib/cryptohopper/resources/webhooks.rb', line 12 def create(data) @client._request("POST", "/api/webhook_create", body: data) end |
#delete(webhook_id) ⇒ Object
16 17 18 19 |
# File 'lib/cryptohopper/resources/webhooks.rb', line 16 def delete(webhook_id) @client._request("POST", "/api/webhook_delete", body: { webhook_id: webhook_id }) end |