Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
sample_stream plugin for Earthquake
# 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