aboutsummaryrefslogtreecommitdiff
path: root/stack-question.el
diff options
context:
space:
mode:
Diffstat (limited to 'stack-question.el')
-rw-r--r--stack-question.el24
1 files changed, 15 insertions, 9 deletions
diff --git a/stack-question.el b/stack-question.el
index 83247d8..13cc5e8 100644
--- a/stack-question.el
+++ b/stack-question.el
@@ -24,15 +24,21 @@
;;; Code:
-(if (boundp 'production)
- (require 'stack-core)
- (setq load-path (cons "." load-path))
- (load "stack-core.el"))
-
-(defun stack-question-parse (data)
- "Parse and return the questions from DATA as returned by
-`stack-core-make-request'"
- (cdr (assoc 'items data)))
+(require 'stack-core)
+(require 'stack-filter)
+
+(defvar stack-question-browse-filter
+ (stack-filter-compile nil
+ '(user.profile_image shallow_user.profile_image)))
+
+(defun stack-question-get-questions (site &optional page)
+ "Get the page PAGE of questions from SITE."
+ (cdr (assoc 'items
+ (stack-core-make-request
+ "questions"
+ `((site . ,site)
+ (page . ,page))
+ stack-question-browse-filter))))
(provide 'stack-question)
;;; stack-question.el ends here