Created
July 24, 2012 16:35
-
-
Save omgitsads/3171067 to your computer and use it in GitHub Desktop.
Scamp V1 example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'scamp' | |
scamp = Scamp.new(:api_key => "YOUR API KEY", :subdomain => "yoursubdomain", :verbose => true) | |
scamp.behaviour do | |
# Simple matching based on regex or string: | |
match "ping" do | |
say "pong" | |
end | |
end | |
# Connect and join some rooms | |
scamp.connect!([293788, "Monitoring"]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment