diff options
author | Artur Malabarba <bruce.connor.am@gmail.com> | 2014-11-08 20:12:18 +0000 |
---|---|---|
committer | Artur Malabarba <bruce.connor.am@gmail.com> | 2014-11-08 20:12:18 +0000 |
commit | b13351287605751a03437b5659575c026affe901 (patch) | |
tree | b040cdc99b69e7377eacdee2c38b8695b0a10864 | |
parent | f411787e513aec449ef87c8e0c6292eb5428dd50 (diff) |
Function for getting a single question.
-rw-r--r-- | sx-question.el | 10 |
1 files changed, 10 insertions, 0 deletions
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) |