Skip to content

Instantly share code, notes, and snippets.

@neotyk
Created October 19, 2010 23:03
Show Gist options
  • Save neotyk/635356 to your computer and use it in GitHub Desktop.
Save neotyk/635356 to your computer and use it in GitHub Desktop.
(and (first stream) (close))
(ns twitter-stream
(:require [http.async.client :as c]
[org.danlarkin.json :as j]))
(def u ".")
(def p ".")
(defn track [s]
(let [resp (c/stream-seq :post "http://stream.twitter.com/1/statuses/filter.json"
:body {"track" (str s)}
:auth {:user u :password p})]
(println (first (c/string resp)))))
(track "football")
(c/close)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment