From 97eee0eae60c97bdab1361edb39dbac57c3dc6e5 Mon Sep 17 00:00:00 2001 From: Jonathan Leech-Pepin Date: Mon, 17 Nov 2014 10:48:32 -0500 Subject: Update `sx-method-call` to use `need-auth` and `use-post` variables when creating a request. --- sx-method.el | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'sx-method.el') 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 -- cgit v1.2.3