Sha256: 0be23b867130b35490fa137d4587bc87a1407165323260f9d3fb928f3b3e3826

Contents?: true

Size: 433 Bytes

Versions: 1

Compression:

Stored size: 433 Bytes

Contents

# Usage: $ EVENTFLIT_KEY=YOURKEY ruby examples/hello_eventflit.rb

$:.unshift(File.expand_path("../../lib", __FILE__))
require 'eventflit-client'
require 'pp'

APP_KEY = ENV['EVENTFLIT_KEY'] # || "YOUR_APPLICATION_KEY"

socket = EventflitClient::Socket.new(APP_KEY)

# Subscribe to a channel
socket.subscribe('helloeventflit')

# Bind to a channel event
socket['helloeventflit'].bind('hello') do |data|
  pp data
end

socket.connect

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
eventflit-client-0.1.0 examples/hello_eventflit.rb