Permalink
Browse files

Fix imports, typo, add home-timeline function

  • Loading branch information...
1 parent c70e235 commit 7a462d2318178bd6da5768c8cbada6733ae34c93 @mikem mikem committed with mattrepl Jun 18, 2010
Showing with 14 additions and 5 deletions.
  1. +14 −5 src/twitter.clj
View
@@ -1,8 +1,7 @@
(ns twitter
- (:use [clojure.contrib.json.read]
+ (:use [clojure.contrib.json :only [read-json]]
[clojure.contrib.str-utils :only [re-gsub]]
- [clojure.contrib.java-utils :only [as-str]]
- [clojure.contrib.seq-utils :only [flatten]])
+ [clojure.contrib.java-utils :only [as-str]])
(:require [clojure.set :as set]
[com.twinql.clojure.http :as http]
[twitter.query :as query]
@@ -108,6 +107,16 @@ take any required and optional arguments and call the associated Twitter method.
:page]
(comp #(:content %) status-handler))
+(def-twitter-method home-timeline
+ :get
+ "twitter.com/statuses/home_timeline.json"
+ []
+ [:since-id
+ :max-id
+ :count
+ :page]
+ (comp #(:content %) status-handler))
+
(def-twitter-method mentions
:get
"twitter.com/statuses/mentions.json"
@@ -268,7 +277,7 @@ take any required and optional arguments and call the associated Twitter method.
[]
(comp #(:content %) status-handler))
-(def-twitter-method verifiy-credentials
+(def-twitter-method verify-credentials
:get
"twitter.com/account/verify_credentials.json"
[]
@@ -592,4 +601,4 @@ the Twitter API."
(fn [result]
(let [headers (into {} (:headers result))]
(when (= (headers "X-RateLimit-Remaining") "0")
- (handler-fn result)))))
+ (handler-fn result)))))

0 comments on commit 7a462d2

Please sign in to comment.