Skip to content

Commit 7a462d2

Browse files
mikemdrone29a
authored andcommitted
Fix imports, typo, add home-timeline function
1 parent c70e235 commit 7a462d2

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

src/twitter.clj

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
(ns twitter
2-
(:use [clojure.contrib.json.read]
2+
(:use [clojure.contrib.json :only [read-json]]
33
[clojure.contrib.str-utils :only [re-gsub]]
4-
[clojure.contrib.java-utils :only [as-str]]
5-
[clojure.contrib.seq-utils :only [flatten]])
4+
[clojure.contrib.java-utils :only [as-str]])
65
(:require [clojure.set :as set]
76
[com.twinql.clojure.http :as http]
87
[twitter.query :as query]
@@ -108,6 +107,16 @@ take any required and optional arguments and call the associated Twitter method.
108107
:page]
109108
(comp #(:content %) status-handler))
110109

110+
(def-twitter-method home-timeline
111+
:get
112+
"twitter.com/statuses/home_timeline.json"
113+
[]
114+
[:since-id
115+
:max-id
116+
:count
117+
:page]
118+
(comp #(:content %) status-handler))
119+
111120
(def-twitter-method mentions
112121
:get
113122
"twitter.com/statuses/mentions.json"
@@ -268,7 +277,7 @@ take any required and optional arguments and call the associated Twitter method.
268277
[]
269278
(comp #(:content %) status-handler))
270279

271-
(def-twitter-method verifiy-credentials
280+
(def-twitter-method verify-credentials
272281
:get
273282
"twitter.com/account/verify_credentials.json"
274283
[]
@@ -592,4 +601,4 @@ the Twitter API."
592601
(fn [result]
593602
(let [headers (into {} (:headers result))]
594603
(when (= (headers "X-RateLimit-Remaining") "0")
595-
(handler-fn result)))))
604+
(handler-fn result)))))

0 commit comments

Comments
 (0)