aboutsummaryrefslogtreecommitdiff
path: root/sx-method.el
diff options
context:
space:
mode:
Diffstat (limited to 'sx-method.el')
-rw-r--r--sx-method.el22
1 files changed, 10 insertions, 12 deletions
diff --git a/sx-method.el b/sx-method.el
index e9c4f60..2d8f9d2 100644
--- a/sx-method.el
+++ b/sx-method.el
@@ -19,7 +19,10 @@
;;; Commentary:
-;;
+;;; This file is effectively a common-use wrapper for
+;;; `sx-request-make'. It provides higher-level handling such as
+;;; (authentication, filters, ...) that `sx-request-make' doesn't need
+;;; to handle.
;;; Code:
(require 'json)
@@ -29,7 +32,7 @@
(require 'sx-filter)
(defun sx-method-call
- (method &optional keyword-arguments filter need-auth use-post silent)
+ (method &optional keyword-arguments filter need-auth use-post)
"Call METHOD with KEYWORD-ARGUMENTS using FILTER.
If NEED-AUTH is non-nil, an auth-token is required. If 'WARN,
@@ -39,18 +42,13 @@ 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 response content as a complex alist.
-Return the entire response as a complex alist."
- (sx-request-make
- method
- (cons (cons 'filter
- (sx-filter-get-var
- (cond (filter filter)
- ((boundp 'stack-filter) stack-filter))))
+See `sx-request-make' and `sx-filter-get-var'."
+ (sx-request-make method
+ (cons (cons 'filter (sx-filter-get-var filter))
keyword-arguments)
- need-auth
- use-post))
+ need-auth use-post))
(provide 'sx-method)
;;; sx-method.el ends here