diff options
-rw-r--r-- | sx-favorites.el | 8 | ||||
-rw-r--r-- | sx-networks.el | 9 | ||||
-rw-r--r-- | sx-question.el | 20 | ||||
-rw-r--r-- | sx-site.el | 7 |
4 files changed, 24 insertions, 20 deletions
diff --git a/sx-favorites.el b/sx-favorites.el index 3aa96dd..55ebf49 100644 --- a/sx-favorites.el +++ b/sx-favorites.el @@ -55,10 +55,10 @@ Added as hook to initialization." (defun sx-favorites--retrieve-favorites (site) "Obtain list of starred QUESTION_IDs for SITE." - (sx-method-call (format "me/favorites?site=%s" site) - nil - sx-favorite-list-filter - 'warn)) + (sx-method-call 'me + :submethod (format "favorites?site=%s" site) + :filter sx-favorite-list-filter + :auth 'warn)) (defun sx-favorites--update-site-favorites (site) "Update list of starred QUESTION_IDs for SITE. diff --git a/sx-networks.el b/sx-networks.el index 755d62c..ff5a630 100644 --- a/sx-networks.el +++ b/sx-networks.el @@ -67,10 +67,11 @@ If cache is not available, retrieve current data." Sets cache and then uses `sx-network--get-associated' to update the variables." (sx-cache-set 'network-user - (sx-method-call "me/associated" - '((types . (main_site meta_site))) - sx-network--user-filter - 'warn)) + (sx-method-call 'me + :submethod 'associated + :keywords '((types . (main_site meta_site))) + :filter sx-network--user-filter + :auth 'warn)) (sx-network--get-associated)) (defun sx-network--initialize () 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)))) @@ -48,9 +48,10 @@ (defun sx-site--get-site-list () (sx-cache-get 'site-list - '(sx-method-call - "sites" '((pagesize . 999)) - sx-site-browse-filter))) + '(sx-method-call 'sites + :keywords '((pagesize . 999)) + :filter sx-site-browse-filter + :auth 'warn))) (defcustom sx-site-favorites nil |