File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -51,12 +51,16 @@ take any required and optional arguments and call the associated Twitter method.
51
51
rest-map# (apply hash-map rest#)
52
52
provided-optional-params# (set/intersection (set ~optional-params)
53
53
(set (keys rest-map#)))
54
- query-param-names# (sort (map (fn [x#] (keyword (string/replace (name x#) #"-" " _" )))
55
- (concat ~required-params provided-optional-params#)))
56
- query-params# (apply hash-map (interleave query-param-names#
57
- (vec (concat ~required-fn-params
58
- (vals (sort (select-keys rest-map#
59
- provided-optional-params#)))))))
54
+ required-query-param-names# (map (fn [x#]
55
+ (keyword (string/replace (name x#) #"-" " _" )))
56
+ ~required-params)
57
+ optional-query-param-names-mapping# (map (fn [x#]
58
+ [x# (keyword (string/replace (name x#) #"-" " _" ))])
59
+ provided-optional-params#)
60
+ query-params# (merge (apply hash-map
61
+ (vec (interleave required-query-param-names# ~required-fn-params)))
62
+ (apply merge
63
+ (map (fn [x#] {(second x#) ((first x#) rest-map#)}) optional-query-param-names-mapping#)))
60
64
need-to-url-encode# (if (= :get ~req-method)
61
65
(into {} (map (fn [[k# v#]] [k# (oauth.signature/url-encode v#)]) query-params#))
62
66
query-params#)
You can’t perform that action at this time.
0 commit comments