Created
September 30, 2012 12:24
-
-
Save takeisa/3806625 to your computer and use it in GitHub Desktop.
[Clojure] Twitter access sample
This file contains 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
(require '[clojure.xml :as xml]) | |
(defn twitter-followers [user-name] | |
(->> (str "https://api.twitter.com/1/users/show.xml?screen_name=" user-name) | |
xml/parse | |
:content | |
(filter (comp #{:followers_count} :tag)) | |
first | |
:content | |
first | |
Integer/parseInt)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment