aboutsummaryrefslogtreecommitdiff
path: root/sx-method.el
diff options
context:
space:
mode:
authorArtur Malabarba <bruce.connor.am@gmail.com>2014-11-26 22:10:07 +0000
committerArtur Malabarba <bruce.connor.am@gmail.com>2014-11-26 22:10:07 +0000
commit185365628b3088f77713e569c3390898b7848c22 (patch)
treec9611e1dc7bee5ce2d5e737ff28d021120d3036f /sx-method.el
parentdf6b6e57304c2415c111b4770608e81f4506fac9 (diff)
Make site a url argument
This addresses the apparent api bug which affected both the retrieval of favorites and the site-switching. Se #82 As far as I can see, this issue affects ALL api calls, so it seems reasonable that it should be fixed inside `sx-method-call`. The usage of sx-method-call stays the same, only the internal has changed.
Diffstat (limited to 'sx-method.el')
-rw-r--r--sx-method.el10
1 files changed, 5 insertions, 5 deletions
diff --git a/sx-method.el b/sx-method.el
index 4bd98a5..238f46a 100644
--- a/sx-method.el
+++ b/sx-method.el
@@ -75,7 +75,9 @@ Return the entire response as a complex alist."
(when id
(format "/%s" id))
(when submethod
- (format "/%s" submethod))))
+ (format "/%s" submethod))
+ (when (stringp site)
+ (format "?site=%s" site))))
(call 'sx-request-make))
(lwarn "sx-call-method" :debug "A: %S T: %S. M: %S,%s. F: %S" (equal 'warn auth)
access-token method-auth full-method filter-auth)
@@ -96,10 +98,8 @@ Return the entire response as a complex alist."
(error "This request requires authentication."))))
;; Concatenate all parameters now that filter is ensured.
(setq parameters
- (cons `(site . ,site)
- (cons (cons 'filter
- (sx-filter-get-var filter))
- keywords)))
+ (cons (cons 'filter (sx-filter-get-var filter))
+ keywords))
(funcall call
full-method
parameters