Skip to content

Instantly share code, notes, and snippets.

@hayesdavis
Created July 20, 2010 16:02
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 hayesdavis/483163 to your computer and use it in GitHub Desktop.
Save hayesdavis/483163 to your computer and use it in GitHub Desktop.
# Setup grackle to talk to flamingo
client = Grackle::Client.new
client.api_hosts[:flamingo] = "http://localhost:4711"
client.api = :flamingo
# Commence talking
# See what's being filtered
client.streams.filter?
# Track something new on the filter resource (resarts wader)
client.streams.filter.track! :values=>'cat,dog,hat'
# Overwrite every param on a stream
client.put { streams.filter! :track=>"a,b,c", :follow=>"1,2,3" }
# Stop tracking the term "a"
client.delete { streams.filter.track! :values=>'a' }
# Add a new subscription
client.subscriptions! :name=>'app2'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment