From 08eea895f1a445156c2e1c382bf167ba6d9d4515 Mon Sep 17 00:00:00 2001 From: Artur Malabarba Date: Wed, 12 Nov 2014 21:19:31 +0000 Subject: Update code to new assoc-let --- sx-request.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'sx-request.el') diff --git a/sx-request.el b/sx-request.el index 56362fc..f8feb22 100644 --- a/sx-request.el +++ b/sx-request.el @@ -107,15 +107,16 @@ number of requests left every time it finishes a call.") (error "Response could not be read by `json-read-from-string'")) ;; If we get here, the response is a valid data structure (sx-assoc-let response - (when error_id + (when .error_id (error "Request failed: (%s) [%i %s] %S" - method error_id error_name error_message)) + .method .error_id .error_name .error_message)) (when (< (setq sx-request-remaining-api-requests - quota_remaining) + .quota_remaining) sx-request-remaining-api-requests-message-threshold) (sx-message "%d API requests reamining" sx-request-remaining-api-requests)) - items))))))) + :hi + .items))))))) ;;; Support Functions -- cgit v1.2.3 From 9c2e07f01f41c223b07356c4bd495e6f7edd1d0f Mon Sep 17 00:00:00 2001 From: Sean Allred Date: Wed, 12 Nov 2014 17:56:00 -0500 Subject: Remove spurious line --- sx-request.el | 1 - 1 file changed, 1 deletion(-) (limited to 'sx-request.el') diff --git a/sx-request.el b/sx-request.el index f8feb22..dd98ead 100644 --- a/sx-request.el +++ b/sx-request.el @@ -115,7 +115,6 @@ number of requests left every time it finishes a call.") sx-request-remaining-api-requests-message-threshold) (sx-message "%d API requests reamining" sx-request-remaining-api-requests)) - :hi .items))))))) -- cgit v1.2.3