From 999090151eea9ce37bff5192d48dc3c1931a6910 Mon Sep 17 00:00:00 2001 From: Matt Revelle Date: Fri, 17 Sep 2010 11:28:20 -0400 Subject: [PATCH 01/11] Incremented version number. --- project.clj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project.clj b/project.clj index 9327c80..85c284d 100644 --- a/project.clj +++ b/project.clj @@ -1,4 +1,4 @@ -(defproject clojure-twitter "1.2.1" +(defproject clojure-twitter "1.2.2" :description "Twitter Client API for Clojure" :dependencies [[org.clojure/clojure "1.2.0"] [org.clojure/clojure-contrib "1.2.0"] From 28cdd0154173d07428f82a9a731253bcb57ede1f Mon Sep 17 00:00:00 2001 From: Matt Revelle Date: Sun, 31 Oct 2010 13:01:54 -0400 Subject: [PATCH 02/11] Changes for 1.2.3. --- CHANGES | 7 +++++-- project.clj | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGES b/CHANGES index a4468e1..4ef19aa 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,7 @@ -* 1.2.2 +* 1.2.3 + +- Depending on clj-oauth 1.2.4. -- Fixed incorrect merging of optional params. Possible regression from 1.2. (found and fixed by Zehua Liu) +* 1.2.2 +- Fixed incorrect merging of optional params. Possible regression from 1.2. (found and fixed by Zehua Liu) \ No newline at end of file diff --git a/project.clj b/project.clj index 85c284d..e604a76 100644 --- a/project.clj +++ b/project.clj @@ -1,7 +1,7 @@ -(defproject clojure-twitter "1.2.2" +(defproject clojure-twitter "1.2.3" :description "Twitter Client API for Clojure" :dependencies [[org.clojure/clojure "1.2.0"] [org.clojure/clojure-contrib "1.2.0"] - [clj-oauth "1.2.1"] + [clj-oauth "1.2.4"] [com.twinql.clojure/clj-apache-http "2.3.1"]] :dev-dependencies [[swank-clojure "1.2.1"]]) From e83d650ad13506604db18690b014e30b2843ba74 Mon Sep 17 00:00:00 2001 From: Matt Revelle Date: Sun, 26 Dec 2010 21:19:37 -0500 Subject: [PATCH 03/11] Updated version to depend on updated clj-oauth. --- CHANGES | 6 +++++- project.clj | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index 4ef19aa..2e50542 100644 --- a/CHANGES +++ b/CHANGES @@ -1,7 +1,11 @@ +* 1.2.4 + +- Updated dependency of clj-oauth to 1.2.9. + * 1.2.3 - Depending on clj-oauth 1.2.4. * 1.2.2 -- Fixed incorrect merging of optional params. Possible regression from 1.2. (found and fixed by Zehua Liu) \ No newline at end of file +- Fixed incorrect merging of optional params. Possible regression from 1.2. (found and fixed by Zehua Liu) diff --git a/project.clj b/project.clj index e604a76..09111b2 100644 --- a/project.clj +++ b/project.clj @@ -1,7 +1,7 @@ -(defproject clojure-twitter "1.2.3" +(defproject clojure-twitter "1.2.4" :description "Twitter Client API for Clojure" :dependencies [[org.clojure/clojure "1.2.0"] [org.clojure/clojure-contrib "1.2.0"] - [clj-oauth "1.2.4"] + [clj-oauth "1.2.9"] [com.twinql.clojure/clj-apache-http "2.3.1"]] :dev-dependencies [[swank-clojure "1.2.1"]]) From 6d1b6df372b1d65c06c63c9d192e87897fb52b63 Mon Sep 17 00:00:00 2001 From: Matt Revelle Date: Tue, 1 Feb 2011 01:28:12 -0800 Subject: [PATCH 04/11] Version bump for updated dep on clj-oauth. --- project.clj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/project.clj b/project.clj index 09111b2..5f700d0 100644 --- a/project.clj +++ b/project.clj @@ -1,7 +1,7 @@ -(defproject clojure-twitter "1.2.4" +(defproject clojure-twitter "1.2.5" :description "Twitter Client API for Clojure" :dependencies [[org.clojure/clojure "1.2.0"] [org.clojure/clojure-contrib "1.2.0"] - [clj-oauth "1.2.9"] + [clj-oauth "1.2.10"] [com.twinql.clojure/clj-apache-http "2.3.1"]] :dev-dependencies [[swank-clojure "1.2.1"]]) From 495969b4cfc24faead210aedc7f774579e1a6602 Mon Sep 17 00:00:00 2001 From: Tavis Rudd Date: Fri, 13 Jan 2012 15:02:21 -0800 Subject: [PATCH 05/11] purely cosmetic whitespace cleanup (nothing else has changed) --- src/twitter.clj | 157 +++++++++++++++++++++++++++--------------------- 1 file changed, 87 insertions(+), 70 deletions(-) diff --git a/src/twitter.clj b/src/twitter.clj index 33d5d64..8134349 100644 --- a/src/twitter.clj +++ b/src/twitter.clj @@ -18,7 +18,7 @@ (def *oauth-access-token-secret* nil) (def *protocol* "http") -;; Get JSON from clj-apache-http +;; Get JSON from clj-apache-http (defmethod http/entity-as :json [entity as state] (read-json (http/entity-as entity :string state))) @@ -28,13 +28,13 @@ `(binding [*oauth-consumer* ~consumer *oauth-access-token* ~access-token *oauth-access-token-secret* ~access-token-secret] - (do + (do ~@body))) (defmacro with-https [ & body] `(binding [*protocol* "https"] - (do + (do ~@body))) (defmacro def-twitter-method @@ -51,21 +51,34 @@ take any required and optional arguments and call the associated Twitter method. rest-map# (apply hash-map rest#) provided-optional-params# (set/intersection (set ~optional-params) (set (keys rest-map#))) - required-query-param-names# (map (fn [x#] - (keyword (string/replace (name x#) #"-" "_" ))) - ~required-params) - optional-query-param-names-mapping# (map (fn [x#] - [x# (keyword (string/replace (name x#) #"-" "_"))]) - provided-optional-params#) - query-params# (merge (apply hash-map - (vec (interleave required-query-param-names# ~required-fn-params))) - (apply merge - (map (fn [x#] {(second x#) ((first x#) rest-map#)}) optional-query-param-names-mapping#))) + required-query-param-names# + (map (fn [x#] + (keyword (string/replace (name x#) #"-" "_" ))) + ~required-params) + + optional-query-param-names-mapping# + (map (fn [x#] + [x# (keyword (string/replace (name x#) #"-" "_"))]) + provided-optional-params#) + + query-params#(merge (apply hash-map + (vec (interleave + required-query-param-names# + ~required-fn-params))) + (apply merge + (map (fn [x#] {(second x#) + ((first x#) + rest-map#)}) + optional-query-param-names-mapping#))) need-to-url-encode# (if (= :get ~req-method) - (into {} (map (fn [[k# v#]] [k# (oauth.signature/url-encode v#)]) query-params#)) + (into {} + (map (fn [[k# v#]] + [k# + (oauth.signature/url-encode v#)]) + query-params#)) query-params#) - oauth-creds# (when (and *oauth-consumer* - *oauth-access-token*) + oauth-creds# (when (and *oauth-consumer* + *oauth-access-token*) (oauth/credentials *oauth-consumer* *oauth-access-token* *oauth-access-token-secret* @@ -76,7 +89,7 @@ take any required and optional arguments and call the associated Twitter method. req-uri# :query (merge query-params# oauth-creds#) - :parameters (http/map->params + :parameters (http/map->params {:use-expect-continue false}) :as :json)))))) @@ -282,7 +295,7 @@ take any required and optional arguments and call the associated Twitter method. (def-twitter-method friends-of-name :get "api.twitter.com/1/friends/ids.json" - [:screen-name] + [:screen-name] [] (comp #(:content %) status-handler)) @@ -349,7 +362,7 @@ take any required and optional arguments and call the associated Twitter method. (defn update-profile-image [^String image] (let [req-uri__9408__auto__ "http://api.twitter.com/1/account/update_profile_image.json" - + oauth-creds__9414__auto__ (when (and *oauth-consumer* @@ -379,45 +392,47 @@ take any required and optional arguments and call the associated Twitter method. (comp #(:content %) status-handler))) (defn update-profile-background-image [^String image & rest__2570__auto__] - (let [req-uri__2571__auto__ "http://api.twitter.com/1/account/update_profile_background_image.json" - rest-map__2572__auto__ (apply hash-map rest__2570__auto__) - provided-optional-params__2573__auto__ (set/intersection - (set [:title]) - (set - (keys - rest-map__2572__auto__))) - query-param-names__2574__auto__ (sort - (map - (fn - [x__2575__auto__] - (keyword - (string/replace - (name - x__2575__auto__) - #"-" - "_" - ))) - provided-optional-params__2573__auto__)) - query-params__2576__auto__ (apply - hash-map - (interleave - query-param-names__2574__auto__ - (vec - (vals - (sort - (select-keys - rest-map__2572__auto__ - provided-optional-params__2573__auto__)))))) - oauth-creds__2577__auto__ (when - (and - *oauth-consumer* - *oauth-access-token*) - (oauth/credentials - *oauth-consumer* - *oauth-access-token* - :post - req-uri__2571__auto__ - query-params__2576__auto__))] + (let [req-uri__2571__auto__ + "http://api.twitter.com/1/account/update_profile_background_image.json" + + rest-map__2572__auto__ (apply hash-map rest__2570__auto__) + provided-optional-params__2573__auto__ (set/intersection + (set [:title]) + (set + (keys + rest-map__2572__auto__))) + query-param-names__2574__auto__ (sort + (map + (fn + [x__2575__auto__] + (keyword + (string/replace + (name + x__2575__auto__) + #"-" + "_" + ))) + provided-optional-params__2573__auto__)) + query-params__2576__auto__ (apply + hash-map + (interleave + query-param-names__2574__auto__ + (vec + (vals + (sort + (select-keys + rest-map__2572__auto__ + provided-optional-params__2573__auto__)))))) + oauth-creds__2577__auto__ (when + (and + *oauth-consumer* + *oauth-access-token*) + (oauth/credentials + *oauth-consumer* + *oauth-access-token* + :post + req-uri__2571__auto__ + query-params__2576__auto__))] ((comp #(:content %) status-handler) (http/post req-uri__2571__auto__ :query (merge query-params__2576__auto__ oauth-creds__2577__auto__) @@ -430,7 +445,7 @@ take any required and optional arguments and call the associated Twitter method. :post "api.twitter.com/1/account/update_profile.json" [] - [:name + [:name :email :url :location @@ -605,21 +620,23 @@ take any required and optional arguments and call the associated Twitter method. "Handle the various HTTP status codes that may be returned when accessing the Twitter API." [result] - (condp #(if (coll? %1) + (condp #(if (coll? %1) (first (filter (fn [x] (== x %2)) %1)) (== %2 %1)) (:code result) 200 result 304 nil - [400 401 403 404 406 500 502 503] (let [body (:content result) - headers (into {} (:headers result)) - error-msg (:error body) - error-code (:code result) - request-uri (:request body)] - (throw (proxy [Exception] [(str "[" error-code "] " error-msg ". [" request-uri "]")] - (request [] (body "request")) - (remaining-requests [] (headers "X-RateLimit-Remaining")) - (rate-limit-reset [] (java.util.Date. - (long (headers "X-RateLimit-Reset"))))))))) + [400 401 403 404 406 500 502 503] + (let [body (:content result) + headers (into {} (:headers result)) + error-msg (:error body) + error-code (:code result) + request-uri (:request body)] + (throw (proxy [Exception] + [(str "[" error-code "] " error-msg ". [" request-uri "]")] + (request [] (body "request")) + (remaining-requests [] (headers "X-RateLimit-Remaining")) + (rate-limit-reset [] (java.util.Date. + (long (headers "X-RateLimit-Reset"))))))))) (defn make-rate-limit-handler "Creates a handler that will only be called if the API rate limit has been exceeded." From d94a7388ce181ba877dfce7da55d162d02b65bbf Mon Sep 17 00:00:00 2001 From: Tavis Rudd Date: Fri, 13 Jan 2012 15:41:37 -0800 Subject: [PATCH 06/11] update for clojure 1.3 (depends on downstream versions of clj-oauth / clj-apache-http) --- project.clj | 11 +++++------ src/twitter.clj | 11 +++++------ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/project.clj b/project.clj index 5f700d0..4e01a19 100644 --- a/project.clj +++ b/project.clj @@ -1,7 +1,6 @@ -(defproject clojure-twitter "1.2.5" +(defproject clojure-twitter "1.2.6-SNAPSHOT" :description "Twitter Client API for Clojure" - :dependencies [[org.clojure/clojure "1.2.0"] - [org.clojure/clojure-contrib "1.2.0"] - [clj-oauth "1.2.10"] - [com.twinql.clojure/clj-apache-http "2.3.1"]] - :dev-dependencies [[swank-clojure "1.2.1"]]) + :dependencies [[org.clojure/clojure "1.3.0"] + [org.clojure/data.json "0.1.2"] + [clj-oauth "1.3.1-SNAPSHOT"] + [com.twinql.clojure/clj-apache-http "2.3.2-SNAPSHOT"]]) diff --git a/src/twitter.clj b/src/twitter.clj index 8134349..2eefc41 100644 --- a/src/twitter.clj +++ b/src/twitter.clj @@ -1,6 +1,5 @@ (ns twitter - (:use [clojure.contrib.json :only [read-json]] - [clojure.contrib.java-utils :only [as-str]]) + (:use [clojure.data.json :only [read-json]]) (:require [clojure.set :as set] [clojure.string :as string] [com.twinql.clojure.http :as http] @@ -13,10 +12,10 @@ (declare status-handler) -(def *oauth-consumer* nil) -(def *oauth-access-token* nil) -(def *oauth-access-token-secret* nil) -(def *protocol* "http") +(def ^:dynamic *oauth-consumer* nil) +(def ^:dynamic *oauth-access-token* nil) +(def ^:dynamic *oauth-access-token-secret* nil) +(def ^:dynamic *protocol* "http") ;; Get JSON from clj-apache-http (defmethod http/entity-as :json [entity as state] From 52ca0971f0f46109a63fc5c74cf777fab66c1e90 Mon Sep 17 00:00:00 2001 From: Tavis Rudd Date: Fri, 13 Jan 2012 15:55:03 -0800 Subject: [PATCH 07/11] pull clj-apache-http from org.clojars.tavisrudd for now (needs pulling upstream) --- project.clj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project.clj b/project.clj index 4e01a19..e7080a5 100644 --- a/project.clj +++ b/project.clj @@ -3,4 +3,4 @@ :dependencies [[org.clojure/clojure "1.3.0"] [org.clojure/data.json "0.1.2"] [clj-oauth "1.3.1-SNAPSHOT"] - [com.twinql.clojure/clj-apache-http "2.3.2-SNAPSHOT"]]) + [org.clojars.tavisrudd/clj-apache-http "2.3.2-SNAPSHOT"]]) From b65039360f5a367d31d592234b9790fa551d6e2f Mon Sep 17 00:00:00 2001 From: Joost Elfering Date: Tue, 27 Mar 2012 14:40:46 +0200 Subject: [PATCH 08/11] adding users/search.json api wrapper to the available methods. --- src/twitter.clj | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/twitter.clj b/src/twitter.clj index 2eefc41..ae615d9 100644 --- a/src/twitter.clj +++ b/src/twitter.clj @@ -571,6 +571,15 @@ take any required and optional arguments and call the associated Twitter method. [] (comp #(:content %) status-handler)) +(def-twitter-method users-search + :get + "api.twitter.com/1/users/search.json" + [:q] + [:page + :per_page + :include_entities] + (comp #(:content %) status-handler)) + (def-twitter-method search :get "search.twitter.com/search.json" From 8dd3ce8a01a3d014faa812ba5194dd08559227b1 Mon Sep 17 00:00:00 2001 From: Andrej Date: Tue, 3 Apr 2012 17:41:41 +0200 Subject: [PATCH 09/11] no need to url encode query parameters when generating oauth signature --- src/twitter.clj | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/twitter.clj b/src/twitter.clj index ae615d9..e8d557e 100644 --- a/src/twitter.clj +++ b/src/twitter.clj @@ -69,13 +69,6 @@ take any required and optional arguments and call the associated Twitter method. ((first x#) rest-map#)}) optional-query-param-names-mapping#))) - need-to-url-encode# (if (= :get ~req-method) - (into {} - (map (fn [[k# v#]] - [k# - (oauth.signature/url-encode v#)]) - query-params#)) - query-params#) oauth-creds# (when (and *oauth-consumer* *oauth-access-token*) (oauth/credentials *oauth-consumer* @@ -83,7 +76,7 @@ take any required and optional arguments and call the associated Twitter method. *oauth-access-token-secret* ~req-method req-uri# - need-to-url-encode#))] + query-params#))] (~handler (~(symbol "http" (name req-method)) req-uri# :query (merge query-params# From 149d270cdf3c9e7a2effaaf9b8d0e3e2292e0350 Mon Sep 17 00:00:00 2001 From: Rahul Goma Phulore Date: Thu, 12 Jul 2012 18:45:10 +0530 Subject: [PATCH 10/11] Minor code cleanup. --- src/twitter.clj | 120 ++++++++++++++++++++++++------------------------ 1 file changed, 60 insertions(+), 60 deletions(-) diff --git a/src/twitter.clj b/src/twitter.clj index ae615d9..08420f7 100644 --- a/src/twitter.clj +++ b/src/twitter.clj @@ -101,7 +101,7 @@ take any required and optional arguments and call the associated Twitter method. "api.twitter.com/1/statuses/public_timeline.json" [] [] - (comp #(:content %) status-handler)) + (comp :content status-handler)) (def-twitter-method friends-timeline :get @@ -111,7 +111,7 @@ take any required and optional arguments and call the associated Twitter method. :max-id :count :page] - (comp #(:content %) status-handler)) + (comp :content status-handler)) (def-twitter-method user-timeline :get @@ -124,7 +124,7 @@ take any required and optional arguments and call the associated Twitter method. :max-id :count :page] - (comp #(:content %) status-handler)) + (comp :content status-handler)) (def-twitter-method home-timeline :get @@ -136,7 +136,7 @@ take any required and optional arguments and call the associated Twitter method. :page :skip-user :include-entities] - (comp #(:content %) status-handler)) + (comp :content status-handler)) (def-twitter-method mentions :get @@ -146,56 +146,56 @@ take any required and optional arguments and call the associated Twitter method. :max-id :count :page] - (comp #(:content %) status-handler)) + (comp :content status-handler)) (def-twitter-method show-status :get "api.twitter.com/1/statuses/show.json" [:id] [] - (comp #(:content %) status-handler)) + (comp :content status-handler)) (def-twitter-method update-status :post "api.twitter.com/1/statuses/update.json" [:status] [:in-reply-to-status-id] - (comp #(:status (:content %)) status-handler)) + (comp :status :content status-handler)) (def-twitter-method destroy-status :post "api.twitter.com/1/statuses/destroy.json" [:id] [] - (comp #(:status (:content %)) status-handler)) + (comp :status :content status-handler)) (def-twitter-method show-user-by-id :get "api.twitter.com/1/users/show.json" [:user-id] [] - (comp #(:content %) status-handler)) + (comp :content status-handler)) (def-twitter-method show-user-by-name :get "api.twitter.com/1/users/show.json" [:screen-name] [] - (comp #(:content %) status-handler)) + (comp :content status-handler)) (def-twitter-method lookup-users-by-id :get "api.twitter.com/1/users/lookup.json" [:user-id] [] - (comp #(:content %) status-handler)) + (comp :content status-handler)) (def-twitter-method lookup-users-by-name :get "api.twitter.com/1/users/lookup.json" [:screen-name] [] - (comp #(:content %) status-handler)) + (comp :content status-handler)) (def-twitter-method direct-messages :get @@ -205,7 +205,7 @@ take any required and optional arguments and call the associated Twitter method. :max-id :count :page] - (comp #(:content %) status-handler)) + (comp :content status-handler)) (def-twitter-method sent-direct-messages :get @@ -215,7 +215,7 @@ take any required and optional arguments and call the associated Twitter method. :max-id :count :page] - (comp #(:content %) status-handler)) + (comp :content status-handler)) (def-twitter-method send-direct-message-to-id :post @@ -223,7 +223,7 @@ take any required and optional arguments and call the associated Twitter method. [:user-id :text] [] - (comp #(:content %) status-handler)) + (comp :content status-handler)) (def-twitter-method send-direct-message-to-name :post @@ -231,42 +231,42 @@ take any required and optional arguments and call the associated Twitter method. [:screen-name :text] [] - (comp #(:content %) status-handler)) + (comp :content status-handler)) (def-twitter-method destroy-direct-message :post "api.twitter.com/1/direct_messages/destroy.json" [:id] [] - (comp #(:content %) status-handler)) + (comp :content status-handler)) (def-twitter-method create-friendship-to-id :post "api.twitter.com/1/friendships/create.json" [:user-id] [:follow] - (comp #(:content %) status-handler)) + (comp :content status-handler)) (def-twitter-method create-friendship-to-name :post "api.twitter.com/1/friendships/create.json" [:screen-name] [:follow] - (comp #(:content %) status-handler)) + (comp :content status-handler)) (def-twitter-method destroy-friendship-to-id :post "api.twitter.com/1/friendships/destroy.json" [:user-id] [] - (comp #(:content %) status-handler)) + (comp :content status-handler)) (def-twitter-method destroy-friendship-to-name :post "api.twitter.com/1/friendships/destroy.json" [:screen-name] [] - (comp #(:content %) status-handler)) + (comp :content status-handler)) (def-twitter-method show-friendship-by-ids :get @@ -274,7 +274,7 @@ take any required and optional arguments and call the associated Twitter method. [:source-id :target-id] [] - (comp #(:content %) status-handler)) + (comp :content status-handler)) (def-twitter-method show-friendship-by-names :get @@ -282,63 +282,63 @@ take any required and optional arguments and call the associated Twitter method. [:source-screen-name :target-screen-name] [] - (comp #(:content %) status-handler)) + (comp :content status-handler)) (def-twitter-method friends-of-id :get "api.twitter.com/1/friends/ids.json" [:user-id] [] - (comp #(:content %) status-handler)) + (comp :content status-handler)) (def-twitter-method friends-of-name :get "api.twitter.com/1/friends/ids.json" [:screen-name] [] - (comp #(:content %) status-handler)) + (comp :content status-handler)) (def-twitter-method followers-of-id :get "api.twitter.com/1/followers/ids.json" [:user-id] [] - (comp #(:content %) status-handler)) + (comp :content status-handler)) (def-twitter-method followers-of-name :get "api.twitter.com/1/followers/ids.json" [:screen-name] [] - (comp #(:content %) status-handler)) + (comp :content status-handler)) (def-twitter-method verify-credentials :get "api.twitter.com/1/account/verify_credentials.json" [] [] - (comp #(:content %) status-handler)) + (comp :content status-handler)) (def-twitter-method rate-limit-status :get "api.twitter.com/1/account/rate_limit_status.json" [] [] - (comp #(:content %) status-handler)) + (comp :content status-handler)) (def-twitter-method end-session :post "api.twitter.com/1/account/end_session.json" [] [] - (comp #(:content %) status-handler)) + (comp :content status-handler)) (def-twitter-method update-delivery-device :post "api.twitter.com/1/account/update_delivery_device.json" [:device] [] - (comp #(:content %) status-handler)) + (comp :content status-handler)) (def-twitter-method update-profile-colors :post @@ -349,7 +349,7 @@ take any required and optional arguments and call the associated Twitter method. :profile-link-color :profile-sidebar-fill-color :profile-sidebar-border-color] - (comp #(:content %) status-handler)) + (comp :content status-handler)) (comment (def-twitter-method update-profile-image @@ -357,7 +357,7 @@ take any required and optional arguments and call the associated Twitter method. "api.twitter.com/1/account/update_profile_image.json" [:image] [] - (comp #(:content %) status-handler))) + (comp :content status-handler))) (defn update-profile-image [^String image] (let [req-uri__9408__auto__ "http://api.twitter.com/1/account/update_profile_image.json" @@ -371,7 +371,7 @@ take any required and optional arguments and call the associated Twitter method. *oauth-access-token* :post req-uri__9408__auto__))] - ((comp #(:content %) status-handler) + ((comp :content status-handler) (http/post req-uri__9408__auto__ :query @@ -388,7 +388,7 @@ take any required and optional arguments and call the associated Twitter method. "api.twitter.com/1/account/update_profile_background_image.json" [:image] [:title] - (comp #(:content %) status-handler))) + (comp :content status-handler))) (defn update-profile-background-image [^String image & rest__2570__auto__] (let [req-uri__2571__auto__ @@ -432,7 +432,7 @@ take any required and optional arguments and call the associated Twitter method. :post req-uri__2571__auto__ query-params__2576__auto__))] - ((comp #(:content %) status-handler) + ((comp :content status-handler) (http/post req-uri__2571__auto__ :query (merge query-params__2576__auto__ oauth-creds__2577__auto__) :parameters (http/map->params {:use-expect-continue false}) @@ -449,7 +449,7 @@ take any required and optional arguments and call the associated Twitter method. :url :location :description] - (comp #(:content %) status-handler)) + (comp :content status-handler)) (def-twitter-method favorites :get @@ -457,119 +457,119 @@ take any required and optional arguments and call the associated Twitter method. [] [:id :page] - (comp #(:content %) status-handler)) + (comp :content status-handler)) (def-twitter-method create-favorite :post "api.twitter.com/1/favorites/create.json" [:id] [] - (comp #(:content %) status-handler)) + (comp :content status-handler)) (def-twitter-method destroy-favorite :post "api.twitter.com/1/favorites/destroy.json" [:id] [] - (comp #(:content %) status-handler)) + (comp :content status-handler)) (def-twitter-method notifications-follow-by-id :post "api.twitter.com/1/notifications/follow.json" [:user-id] [] - (comp #(:content %) status-handler)) + (comp :content status-handler)) (def-twitter-method notifications-follow-by-name :post "api.twitter.com/1/notifications/follow.json" [:screen-name] [] - (comp #(:content %) status-handler)) + (comp :content status-handler)) (def-twitter-method notifications-leave-by-id :post "api.twitter.com/1/notifications/leave.json" [:user-id] [] - (comp #(:content %) status-handler)) + (comp :content status-handler)) (def-twitter-method notifications-leave-by-name :post "api.twitter.com/1/notifications/leave.json" [:screen-name] [] - (comp #(:content %) status-handler)) + (comp :content status-handler)) (def-twitter-method create-block :post "api.twitter.com/1/blocks/create.json" [:user-id-or-screen-name] [] - (comp #(:content %) status-handler)) + (comp :content status-handler)) (def-twitter-method destroy-block :post "api.twitter.com/1/blocks/destroy.json" [:user-id-or-screen-name] [] - (comp #(:content %) status-handler)) + (comp :content status-handler)) (def-twitter-method block-exists-for-id :get "api.twitter.com/1/blocks/exists.json" [:user-id] [] - (comp #(:content %) status-handler)) + (comp :content status-handler)) (def-twitter-method block-exists-for-name :get "api.twitter.com/1/blocks/exists.json" [:screen-name] [] - (comp #(:content %) status-handler)) + (comp :content status-handler)) (def-twitter-method blocking-users :get "api.twitter.com/1/blocks/blocking.json" [] [:page] - (comp #(:content %) status-handler)) + (comp :content status-handler)) (def-twitter-method blocking-user-ids :get "api.twitter.com/1/blocks/blocking/ids.json" [] [] - (comp #(:content %) status-handler)) + (comp :content status-handler)) (def-twitter-method saved-searches :get "api.twitter.com/1/saved_searches.json" [] [] - (comp #(:content %) status-handler)) + (comp :content status-handler)) (def-twitter-method show-saved-search :get "api.twitter.com/1/saved_searches/show.json" [:id] [] - (comp #(:content %) status-handler)) + (comp :content status-handler)) (def-twitter-method create-saved-search :post "api.twitter.com/1/saved_searches/create.json" [:query] [] - (comp #(:content %) status-handler)) + (comp :content status-handler)) (def-twitter-method destroy-saved-search :post "api.twitter.com/1/saved_searches/destroy.json" [:id] [] - (comp #(:content %) status-handler)) + (comp :content status-handler)) (def-twitter-method users-search :get @@ -578,7 +578,7 @@ take any required and optional arguments and call the associated Twitter method. [:page :per_page :include_entities] - (comp #(:content %) status-handler)) + (comp :content status-handler)) (def-twitter-method search :get @@ -592,21 +592,21 @@ take any required and optional arguments and call the associated Twitter method. :max-id :geocode :show-user] - (comp #(:content %) status-handler)) + (comp :content status-handler)) (def-twitter-method trends :get "search.twitter.com/trends.json" [] [] - (comp #(:content %) status-handler)) + (comp :content status-handler)) (def-twitter-method current-trends :get "search.twitter.com/trends/current.json" [] [:exclude] - (comp #(:content %) status-handler)) + (comp :content status-handler)) (def-twitter-method daily-trends :get @@ -614,7 +614,7 @@ take any required and optional arguments and call the associated Twitter method. [] [:date :exclude] - (comp #(:content %) status-handler)) + (comp :content status-handler)) (def-twitter-method weekly-trends :get @@ -622,7 +622,7 @@ take any required and optional arguments and call the associated Twitter method. [] [:date :exclude] - (comp #(:content %) status-handler)) + (comp :content status-handler)) (defn status-handler "Handle the various HTTP status codes that may be returned when accessing From 9c739e211545fefb9825cf42b0f56c53fc8eb62a Mon Sep 17 00:00:00 2001 From: Matt Revelle Date: Fri, 30 Aug 2013 13:17:12 -0400 Subject: [PATCH 11/11] Bumped version number for release. --- CHANGES | 4 ++++ project.clj | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index 2e50542..13a1228 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,7 @@ +* 1.2.5 + +- Updated dependency of clj-oauth to 1.2.10. + * 1.2.4 - Updated dependency of clj-oauth to 1.2.9. diff --git a/project.clj b/project.clj index e7080a5..8c8d12c 100644 --- a/project.clj +++ b/project.clj @@ -1,6 +1,6 @@ -(defproject clojure-twitter "1.2.6-SNAPSHOT" +(defproject clojure-twitter "1.2.8" :description "Twitter Client API for Clojure" - :dependencies [[org.clojure/clojure "1.3.0"] + :dependencies [[org.clojure/clojure "1.5.1"] [org.clojure/data.json "0.1.2"] - [clj-oauth "1.3.1-SNAPSHOT"] + [clj-oauth "1.4.1"] [org.clojars.tavisrudd/clj-apache-http "2.3.2-SNAPSHOT"]])