{"issue":{"created_at":"2011-11-27T00:49:34Z","state":"open","updated_at":"2011-11-28T19:16:53Z","user":{"gravatar_id":"ed8cd6f26fffbe2b783df3b12508dfd0","id":10421,"url":"https://api.github.com/users/devn","avatar_url":"https://secure.gravatar.com/avatar/ed8cd6f26fffbe2b783df3b12508dfd0?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"devn"},"comments":9,"body":"Currently I am trying to filter a sequence of hashtags. (def response (user-stream :oatuh-creds ...)) does not seem to be the answer. Could you please provide an example where you're filtering on a hashtag and doing something when that hashtag appears in the stream?","assignee":null,"id":2357804,"number":2,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"labels":[],"title":"More Examples","closed_at":null,"html_url":"https://github.com/adamwynne/twitter-api/issues/2","url":"https://api.github.com/repos/adamwynne/twitter-api/issues/2","milestone":null},"action":"created","comment":{"created_at":"2011-11-28T19:16:53Z","updated_at":"2011-11-28T19:16:53Z","user":{"gravatar_id":"ed8cd6f26fffbe2b783df3b12508dfd0","id":10421,"url":"https://api.github.com/users/devn","avatar_url":"https://secure.gravatar.com/avatar/ed8cd6f26fffbe2b783df3b12508dfd0?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"devn"},"body":"Thanks for the help. Yes, that's probably the issue.\r\n\r\nI'm still a little fuzzy on which callback to use where, but I think I've got enough to roll with at this point.\r\n\r\nThanks!\r\n\r\nSent via mobile\r\n\r\nOn Nov 28, 2011, at 12:31 PM, Adam Wynne<reply@reply.github.com> wrote:\r\n\r\n> thats the error callback - so perhaps you're experiencing an error from\r\n> twitter? there are some subtleties with their APi response (like it giving\r\n> some 'twitter overloaded' errors every so often)\r\n> \r\n> On Mon, Nov 28, 2011 at 6:17 PM, Devin Walters <\r\n> reply@reply.github.com\r\n>> wrote:\r\n> \r\n>> Thanks adam, I managed to get this working right before you replied by\r\n>> doing something similar.\r\n>> \r\n>> ```\r\n>> (defn on-bodypart [response baos]\r\n>> (json/read-json (.toString baos)))\r\n>> \r\n>> (def ^:dynamic *mongodb-callback*\r\n>> (AsyncStreamingCallback.\r\n>>  (comp #(insert! :voicerally {:text %}) #(:text %) on-bodypart)\r\n>>  (comp println response-return-everything)\r\n>>  exception-print))\r\n>> \r\n>> (statuses-filter :params {:track config/hashtag-list}\r\n>>                :oauth-creds config/credentials\r\n>>                :callbacks *mongodb-callback*)\r\n>> ```\r\n>> \r\n>> Two things I'm still a little confused by:\r\n>> \r\n>> * There isn't much explanation of how the various callbacks actually work\r\n>> in practice. For instance, I see by example that I need functions inside an\r\n>> AsyncStreamingCallback, but I don't know why. The second fn I'm using which\r\n>> includes `response-return-everything` seems to intermittently execute and\r\n>> I'm not sure why.\r\n>> \r\n>> ---\r\n>> Reply to this email directly or view it on GitHub:\r\n>> https://github.com/adamwynne/twitter-api/issues/2#issuecomment-2904585\r\n>> \r\n> \r\n> --- \r\n> Reply to this email directly or view it on GitHub:\r\n> https://github.com/adamwynne/twitter-api/issues/2#issuecomment-2904799","id":2905584,"url":"https://api.github.com/repos/adamwynne/twitter-api/issues/comments/2905584"}}