Created
June 9, 2012 17:43
-
-
Save sanemat/2901922 to your computer and use it in GitHub Desktop.
sample_stream plugin for Earthquake
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
# coding: utf-8 | |
# see https://dev.twitter.com/docs/api/1/get/statuses/sample | |
Earthquake.init do | |
sample_stream = { | |
method: "GET", | |
host: "stream.twitter.com", | |
path: "/1/statuses/sample.json", | |
ssl: true, | |
} | |
command :sample do | |
config[:api] = sample_stream | |
reconnect | |
end | |
command %r!^:sample off$!, as: :sample do | |
input(":filter off") | |
end | |
help :sample, "switches public streams", <<-HELP | |
⚡ :sample | |
⚡ :sample off | |
HELP | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment