Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit ac418ffee796d002838453001122d2600b654640 1 parent 009c563
@Raynes authored
Showing with 7 additions and 6 deletions.
  1. +7 −6 src/tentacles/core.clj
View
13 src/tentacles/core.clj
@@ -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]
Please sign in to comment.
Something went wrong with that request. Please try again.