Created
October 19, 2010 23:03
-
-
Save neotyk/635356 to your computer and use it in GitHub Desktop.
(and (first stream) (close))
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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