Skip to content

Instantly share code, notes, and snippets.

@zealot128
Created November 28, 2012 21:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zealot128/4164516 to your computer and use it in GitHub Desktop.
Save zealot128/4164516 to your computer and use it in GitHub Desktop.
Earthquake - Show replies to a tweet
# 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