From b13351287605751a03437b5659575c026affe901 Mon Sep 17 00:00:00 2001 From: Artur Malabarba Date: Sat, 8 Nov 2014 20:12:18 +0000 Subject: Function for getting a single question. --- sx-question.el | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sx-question.el b/sx-question.el index e9634f7..c681a82 100644 --- a/sx-question.el +++ b/sx-question.el @@ -46,6 +46,16 @@ (page . ,page)) sx-question-browse-filter)) +(defun sx-question-get-question (site id) + "Get the question ID from SITE." + (let ((res (sx-request-make + (format "questions/%s" id) + `((site . ,site)) + sx-question-browse-filter))) + (if (vectorp res) + (elt res 0) + (error "Couldn't find question %s in %s" id site)))) + ;;; Question Properties (defun sx-question--read-p (question) -- cgit v1.2.3