aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Leech-Pepin <jonathan.leechpepin@gmail.com>2014-11-17 10:48:32 -0500
committerJonathan Leech-Pepin <jonathan.leechpepin@gmail.com>2014-11-17 10:48:32 -0500
commit97eee0eae60c97bdab1361edb39dbac57c3dc6e5 (patch)
tree6189035804c00efdb610768899eca01d6e2eca01
parentf4d7c0341ce30a93bc7d75591183292307971e41 (diff)
Update `sx-method-call` to use `need-auth` and `use-post` variables when
creating a request.
-rw-r--r--sx-method.el13
1 files changed, 11 insertions, 2 deletions
diff --git a/sx-method.el b/sx-method.el
index 6f0a36b..e9c4f60 100644
--- a/sx-method.el
+++ b/sx-method.el
@@ -29,9 +29,16 @@
(require 'sx-filter)
(defun sx-method-call
- (method &optional keyword-arguments filter silent)
+ (method &optional keyword-arguments filter need-auth use-post silent)
"Call METHOD with KEYWORD-ARGUMENTS using FILTER.
+If NEED-AUTH is non-nil, an auth-token is required. If 'WARN,
+warn the user `(user-error ...)' if they do not have an AUTH
+token set.
+
+If USE-POST is non-nil, use `POST' rather than `GET' for passing
+arguments.
+
If SILENT is non-nil, no messages will be printed.
Return the entire response as a complex alist."
@@ -41,7 +48,9 @@ Return the entire response as a complex alist."
(sx-filter-get-var
(cond (filter filter)
((boundp 'stack-filter) stack-filter))))
- keyword-arguments)))
+ keyword-arguments)
+ need-auth
+ use-post))
(provide 'sx-method)
;;; sx-method.el ends here