Class: PlatformAPI::AppWebhook
- Inherits:
-
Object
- Object
- PlatformAPI::AppWebhook
- Defined in:
- lib/platform-api/client.rb
Overview
Represents the details of a webhook subscription
Instance Method Summary collapse
-
#create(app_id_or_app_name, body = {}) ⇒ Object
Create an app webhook subscription.
-
#delete(app_id_or_app_name, app_webhook_id) ⇒ Object
Removes an app webhook subscription.
-
#info(app_id_or_app_name, app_webhook_id) ⇒ Object
Returns the info for an app webhook subscription.
-
#initialize(client) ⇒ AppWebhook
constructor
A new instance of AppWebhook.
-
#list(app_id_or_app_name) ⇒ Object
List all webhook subscriptions for a particular app.
-
#update(app_id_or_app_name, app_webhook_id, body = {}) ⇒ Object
Updates the details of an app webhook subscription.
Constructor Details
#initialize(client) ⇒ AppWebhook
Returns a new instance of AppWebhook.
1372 1373 1374 |
# File 'lib/platform-api/client.rb', line 1372 def initialize(client) @client = client end |
Instance Method Details
#create(app_id_or_app_name, body = {}) ⇒ Object
Create an app webhook subscription.
1380 1381 1382 |
# File 'lib/platform-api/client.rb', line 1380 def create(app_id_or_app_name, body = {}) @client.app_webhook.create(app_id_or_app_name, body) end |
#delete(app_id_or_app_name, app_webhook_id) ⇒ Object
Removes an app webhook subscription.
1388 1389 1390 |
# File 'lib/platform-api/client.rb', line 1388 def delete(app_id_or_app_name, app_webhook_id) @client.app_webhook.delete(app_id_or_app_name, app_webhook_id) end |
#info(app_id_or_app_name, app_webhook_id) ⇒ Object
Returns the info for an app webhook subscription.
1396 1397 1398 |
# File 'lib/platform-api/client.rb', line 1396 def info(app_id_or_app_name, app_webhook_id) @client.app_webhook.info(app_id_or_app_name, app_webhook_id) end |
#list(app_id_or_app_name) ⇒ Object
List all webhook subscriptions for a particular app.
1403 1404 1405 |
# File 'lib/platform-api/client.rb', line 1403 def list(app_id_or_app_name) @client.app_webhook.list(app_id_or_app_name) end |
#update(app_id_or_app_name, app_webhook_id, body = {}) ⇒ Object
Updates the details of an app webhook subscription.
1412 1413 1414 |
# File 'lib/platform-api/client.rb', line 1412 def update(app_id_or_app_name, app_webhook_id, body = {}) @client.app_webhook.update(app_id_or_app_name, app_webhook_id, body) end |