Sha256: b1204afb027cd74a6ccca69900a04df2801b4b88964ec20dd7e4159977fded51
Contents?: true
Size: 1.04 KB
Versions: 2
Compression:
Stored size: 1.04 KB
Contents
module Pixela class Webhook # @!attribute [r] client # @return [Pixela::Client] attr_reader :client # @!attribute [r] webhook_hash # @return [String] attr_reader :webhook_hash # @param client [Pixela::Client] # @param webhook_hash [String] def initialize(client:, webhook_hash:) @client = client @webhook_hash = webhook_hash end # Invoke the webhook registered in advance. # # @return [Hashie::Mash] # # @raise [Pixela::PixelaError] API is failed # # @see https://pixe.la/#api-webhook # # @example # client.webhook("<webhookHash>").invoke def invoke client.invoke_webhook(webhook_hash: webhook_hash) end # Delete the registered Webhook. # # @return [Hashie::Mash] # # @raise [Pixela::PixelaError] API is failed # # @see https://pixe.la/#api-webhook # # @example # client.webhook("<webhookHash>").delete def delete client.delete_webhook(webhook_hash: webhook_hash) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
pixela-0.5.0 | lib/pixela/webhook.rb |
pixela-0.4.0 | lib/pixela/webhook.rb |