From 61bef1ec5efb8f78c2b8f73638693acf912466a9 Mon Sep 17 00:00:00 2001 From: Artur Malabarba Date: Tue, 25 Nov 2014 02:42:21 +0000 Subject: Move browse-filter to sx --- sx.el | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'sx.el') diff --git a/sx.el b/sx.el index 7935ee0..12b08a1 100644 --- a/sx.el +++ b/sx.el @@ -45,6 +45,31 @@ (interactive) (browse-url "https://github.com/vermiculus/stack-mode/issues/new")) + +;;; Browsing filter +(defvar sx-browse-filter + '((question.body_markdown + question.comments + question.answers + question.last_editor + question.accepted_answer_id + question.link + question.upvoted + question.downvoted + user.display_name + comment.owner + comment.body_markdown + comment.body + comment.link + answer.last_editor + answer.link + answer.owner + answer.body_markdown + answer.comments) + (user.profile_image shallow_user.profile_image)) + "The filter applied when retrieving question data. +See `sx-question-get-questions' and `sx-question-get-question'.") + ;;; Utility Functions @@ -212,9 +237,10 @@ Status is a boolean." (.answer_id "answers") (.question_id "questions")) :id (or .comment_id .answer_id .question_id) - :submethod type + :submethod (concat type (unless status "/undo")) :auth 'warn :url-method "POST" + :filter sx-browse-filter :site .site))) -- cgit v1.2.3