From e63d08fe75cff6e4b713a477408203351cc14e57 Mon Sep 17 00:00:00 2001 From: Jonathan Leech-Pepin Date: Thu, 20 Nov 2014 13:18:44 -0500 Subject: Uses of `sx-method-call` have been updated to use new format. sx-question now includes 2 authentication requiring parameters, `question.upvoted` and `question.downvoted`. These will only be used if access token exists. sx-favorites still uses site-workaround pending #82. --- sx-question.el | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'sx-question.el') diff --git a/sx-question.el b/sx-question.el index 972e9d9..d040bad 100644 --- a/sx-question.el +++ b/sx-question.el @@ -35,6 +35,8 @@ question.last_editor question.accepted_answer_id question.link + question.upvoted + question.downvoted user.display_name comment.owner comment.body_markdown @@ -50,18 +52,18 @@ "Get the page PAGE of questions from SITE." (mapcar (lambda (question) (cons (cons 'site site) question)) - (sx-method-call - "questions" - `((site . ,site) - (page . ,page)) - sx-question-browse-filter))) + (sx-method-call 'questions + :keywords `((page . ,page)) + :site site + :auth t + :filter sx-question-browse-filter))) (defun sx-question-get-question (site id) "Get the question ID from SITE." - (let ((res (sx-method-call - (format "questions/%s" id) - `((site . ,site)) - sx-question-browse-filter))) + (let ((res (sx-method-call 'questions + :id id + :site site + :filter sx-question-browse-filter))) (if (vectorp res) (elt res 0) (error "Couldn't find question %S in %S" id site)))) -- cgit v1.2.3