Ruby SDK
The official HookBridge SDK for Ruby provides a simple way to integrate with HookBridge.
Installation
Section titled “Installation”Add to your Gemfile:
gem 'hookbridge'Then run:
bundle installOr install directly:
gem install hookbridgeQuick Start
Section titled “Quick Start”require "hookbridge"
client = HookBridge.new(api_key: "YOUR_API_KEY")
# Create an endpointendpoint = client.create_endpoint( url: "https://your-app.com/webhooks", description: "My webhook endpoint")
# Send a webhookresult = client.send( endpoint_id: endpoint.id, payload: { event: "user.created", data: { user_id: "123", email: "user@example.com" } })
puts "Message sent: #{result.message_id}"Rails Integration
Section titled “Rails Integration”Configure HookBridge in an initializer:
$hookbridge = HookBridge.new( api_key: Rails.application.credentials.hookbridge_api_key)More Information
Section titled “More Information” Personalize Examples
Enter your credentials to populate code examples throughout the docs.