Skip to content

Instantly share code, notes, and snippets.

@takeisa
Created September 30, 2012 12:24
Show Gist options
  • Save takeisa/3806625 to your computer and use it in GitHub Desktop.
Save takeisa/3806625 to your computer and use it in GitHub Desktop.
[Clojure] Twitter access sample
(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