Skip to content

Commit

Permalink
Confirm that `json.el' and SSL are available for the new API.
Browse files Browse the repository at this point in the history
* 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
cvmat committed Mar 4, 2013
1 parent 0dce710 commit 4372eac
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Expand Up @@ -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
Expand Down
13 changes: 9 additions & 4 deletions twittering-mode.el
Expand Up @@ -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")
))))
Expand Down

0 comments on commit 4372eac

Please sign in to comment.