Gnap is an interface to Gnip’s api. It has not been written yet. The following code is how I hope to make it work, and is subject to change.
require 'gnap'
gnap = Gnap.new("username", "password")
# current notifications stream for twitter
gnap.publishers("twitter").notifications
# five minutes ago
gnap.publishers("twitter").notifications(5.minutes.ago)
# from a filter
gnap.publishers("twitter").filter("bobs_rule").notifications(5.minutes.ago)
# gnip doesn't appear to me to support time ranges, so I don't.
# one call to notifications == one request!
# create a new filter
gnap.publishers("twitter").create_filter!("bobs_rule", :actor => "some actor rule text")
# add a rule
gnap.publishers("twitter").filter("bobs_rule").add_rule!("actor", "bob")
# add several rules
gnap.publishers("twitter").filter("bobs_rule").add_rules!({"actor" => ["bob", "steve", "alan", "and so on"])