class Contentful::Management::WebhookHealth
Resource
class for WebhookHealth
. @see _ www.contentful.com/developers/docs/references/content-management-api/#/reference/webhook-calls/webhook-health
Public Class Methods
all(*)
click to toggle source
Not supported
# File lib/contentful/management/webhook_health.rb, line 31 def self.all(*) fail 'Not supported' end
build_endpoint(endpoint_options)
click to toggle source
@private
# File lib/contentful/management/webhook_health.rb, line 41 def self.build_endpoint(endpoint_options) space_id = endpoint_options.fetch(:space_id) webhook_id = endpoint_options.fetch(:webhook_id) "spaces/#{space_id}/webhooks/#{webhook_id}/health" end
create(*)
click to toggle source
Not supported
# File lib/contentful/management/webhook_health.rb, line 26 def self.create(*) fail 'Not supported' end
endpoint()
click to toggle source
@private
# File lib/contentful/management/webhook_health.rb, line 36 def self.endpoint 'webhooks' end
find(client, space_id, webhook_id)
click to toggle source
Gets a webhook's health details by ID
@param [Contentful::Management::Client] client @param [String] space_id @param [String] webhook_id
@return [Contentful::Management::WebhookHealth]
# File lib/contentful/management/webhook_health.rb, line 21 def self.find(client, space_id, webhook_id) ClientWebhookHealthMethodsFactory.new(client, space_id).find(webhook_id) end
Public Instance Methods
destroy()
click to toggle source
Not supported
# File lib/contentful/management/webhook_health.rb, line 49 def destroy fail 'Not supported' end
errors?()
click to toggle source
Returns wether or not there was an error on the webhook calls on the last 30 days.
# File lib/contentful/management/webhook_health.rb, line 69 def errors? total != healthy end
healthy()
click to toggle source
Returns the amount of healthy calls made by the webhook.
# File lib/contentful/management/webhook_health.rb, line 64 def healthy calls['healthy'] end
healthy?()
click to toggle source
Returns whether or not all the webhook calls on the last 30 days were successful.
# File lib/contentful/management/webhook_health.rb, line 74 def healthy? total == healthy end
total()
click to toggle source
Returns the total calls made by the webhook.
# File lib/contentful/management/webhook_health.rb, line 59 def total calls['total'] end
update(*)
click to toggle source
Not supported
# File lib/contentful/management/webhook_health.rb, line 54 def update(*) fail 'Not supported' end