Permalink
Browse files

Confirm that `json.el' and SSL are available for the new API.

* twittering-mode.el: Confirm that `json.el' and SSL are available
before calling the Twitter REST API v1.1.
(twittering-call-api-with-account): confirm that `json.el' and SSL
are available for the Twitter REST API v1.1.
  • Loading branch information...
1 parent 0dce710 commit 4372eac07458537133c4c18093d1e9d368b5d159 @cvmat cvmat committed Mar 4, 2013
Showing with 14 additions and 4 deletions.
  1. +5 −0 ChangeLog
  2. +9 −4 twittering-mode.el
View
@@ -17,6 +17,11 @@
command `get-service-configuration' and add an authentication
header correctly.
+ * twittering-mode.el: Confirm that `json.el' and SSL are available
+ before calling the Twitter REST API v1.1.
+ (twittering-call-api-with-account): confirm that `json.el' and SSL
+ are available for the Twitter REST API v1.1.
+
2013-03-04 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Use the JSON format for retrieving list
View
@@ -5219,11 +5219,16 @@ get-service-configuration -- Get the configuration of the server.
(twittering-call-api-with-account-in-api1.0
account-info-alist command args-alist additional-info))
((eq twittering-service-method 'twitter-api-v1.1)
- (if (require 'json nil t)
- (twittering-call-api-with-account-in-api1.1
- account-info-alist command args-alist additional-info)
+ (cond
+ ((not (require 'json nil t))
(error "`json.el' is required to use the Twitter REST API v1.1")
- nil))
+ nil)
+ ((not twittering-use-ssl)
+ (error "SSL is required to use the Twitter REST API v1.1")
+ nil)
+ (t
+ (twittering-call-api-with-account-in-api1.1
+ account-info-alist command args-alist additional-info))))
(t
(error "`twittering-service-method' is an invalid service method")
))))

0 comments on commit 4372eac

Please sign in to comment.