Permalink
Browse files

Document rate-limit and add more argslists to api-call.

  • Loading branch information...
1 parent 009c563 commit ac418ffee796d002838453001122d2600b654640 @Raynes committed Aug 19, 2012
Showing with 7 additions and 6 deletions.
  1. +7 −6 src/tentacles/core.clj
View
@@ -80,13 +80,14 @@
resp)))]
(exec-request req)))
-(defn api-call [method end-point positional query]
- (let [query (query-map query)]
- (make-request method end-point positional query)))
+(defn api-call
+ ([method end-point] (api-call method end-point nil nil))
+ ([method end-point positional] (api-call method end-point positional nil))
+ ([method end-point positional query]
+ (let [query (query-map query)]
+ (make-request method end-point positional query))))
-(defn rate-limit
- []
- (api-call :get "rate_limit" nil nil))
+(defn rate-limit [] (api-call :get "rate_limit"))
(defmacro with-url [new-url & body]
`(binding [url ~new-url]

0 comments on commit ac418ff

Please sign in to comment.