Module: Tacokit::Client::Webhooks
- Included in:
- Tacokit::Client
- Defined in:
- lib/tacokit/client/webhooks.rb
Instance Method Summary collapse
-
#create_webhook(token, model_id, callback_url, options = {}) ⇒ Object
POST /1/webhooks.
-
#delete_webhook(webhook_id) ⇒ Object
DELETE /1/webhooks/.
-
#update_webhook(webhook_id, options = {}) ⇒ Object
PUT /1/webhooks/.
-
#webhook(webhook_id) ⇒ Object
GET /1/webhooks/.
- #webhook_path(*paths) ⇒ Object
Instance Method Details
#create_webhook(token, model_id, callback_url, options = {}) ⇒ Object
POST /1/webhooks
21 22 23 24 25 26 |
# File 'lib/tacokit/client/webhooks.rb', line 21 def create_webhook(token, model_id, callback_url, = {}) .update \ model_id: model_id, callback_url: callback_url post webhook_path, end |
#delete_webhook(webhook_id) ⇒ Object
DELETE /1/webhooks/
29 30 31 |
# File 'lib/tacokit/client/webhooks.rb', line 29 def delete_webhook(webhook_id) delete webhook_path(webhook_id) end |
#update_webhook(webhook_id, options = {}) ⇒ Object
PUT /1/webhooks/
10 11 12 |
# File 'lib/tacokit/client/webhooks.rb', line 10 def update_webhook(webhook_id, = {}) put webhook_path(webhook_id), end |
#webhook(webhook_id) ⇒ Object
GET /1/webhooks/
5 6 7 |
# File 'lib/tacokit/client/webhooks.rb', line 5 def webhook(webhook_id) get webhook_path(webhook_id) end |
#webhook_path(*paths) ⇒ Object
33 34 35 |
# File 'lib/tacokit/client/webhooks.rb', line 33 def webhook_path(*paths) path_join "webhooks", *paths end |