Created
November 28, 2012 21:11
-
-
Save zealot128/4164516 to your computer and use it in GitHub Desktop.
Earthquake - Show replies to a tweet
This file contains hidden or 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
# paste into ~/.earthquake/config | |
Earthquake.init do | |
command :replies do |m| | |
thread = [twitter.status(m[1])] | |
r = twitter.get "/related_results/show/#{273873995647045633}.json" | |
results = r.first["results"].map{|i|i["value"]} | |
results.reverse_each.with_index do |t,i| | |
t["_mark"] = config[:thread_indent] * i | |
end | |
results.unshift twitter.status(m[1]) | |
puts_items results | |
end | |
help :replies, "Show replies to a tweet - Opposite of :thread", <<-HELP | |
:replies $ab | |
HELP | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment