Permalink
Browse files

Invoke an API with an authentication header correctly.

* twittering-mode.el: Correctly add an authentication header for
the command `get-service-configuration' with the Twitter REST API
v1.1.
(twittering-call-api-with-account-in-api1.1): fix a path for the
command `get-service-configuration' and add an authentication
header correctly.
  • Loading branch information...
cvmat committed Mar 4, 2013
1 parent 8c43a68 commit 0dce710d2a87a6c585e65d6f0ed68a5028b339f5
Showing with 13 additions and 10 deletions.
  1. +7 −0 ChangeLog
  2. +6 −10 twittering-mode.el
View
@@ -10,6 +10,13 @@
`twittering-json-object-to-a-status-on-direct-messages' correctly
when using the Twitter REST API v1.1.
+ * twittering-mode.el: Correctly add an authentication header for
+ the command `get-service-configuration' with the Twitter REST API
+ v1.1.
+ (twittering-call-api-with-account-in-api1.1): fix a path for the
+ command `get-service-configuration' and add an authentication
+ header correctly.
+
2013-03-04 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Use the JSON format for retrieving list
View
@@ -5872,19 +5872,15 @@ get-service-configuration -- Get the configuration of the server.
format-str additional-info)))
((eq command 'get-service-configuration)
(let* ((host "api.twitter.com")
- (method "1.1/account/verify_credentials")
- (request
- (twittering-make-http-request-from-uri
- "GET" nil
- (concat (if twittering-use-ssl
- "https"
- "http")
- "://" host "/" method ".json")))
+ (method "1.1/help/configuration")
+ (http-parameters nil)
+ (format-str "json")
(additional-info nil)
(sentinel (cdr (assq 'sentinel args-alist)))
(clean-up-sentinel (cdr (assq 'clean-up-sentinel args-alist))))
- (twittering-send-http-request request additional-info
- sentinel clean-up-sentinel)))
+ (twittering-http-get account-info-alist host method http-parameters
+ format-str additional-info
+ sentinel clean-up-sentinel)))
(t
nil)))

0 comments on commit 0dce710

Please sign in to comment.