Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Use `GET users/profile_image' API only if so configured.

* twittering-mode.el: Use `GET users/profile_image' API only if
the variable `twittering-use-profile-image-api' is non-nil. Since
the API is rate limited, it may cause troubles on other API calls.
(twittering-use-profile-image-api): new variable.
(twittering-generate-format-table): call `GET users/profile_imagne'
API only if `twittering-use-profile-image-api' is non-nil.
  • Loading branch information...
commit f36a7a6055ec5abc935c3856a573d0618b626a16 1 parent d8436b2
@cvmat cvmat authored
Showing with 14 additions and 2 deletions.
  1. +7 −0 ChangeLog
  2. +7 −2 twittering-mode.el
View
7 ChangeLog
@@ -15,6 +15,13 @@
(twittering-generate-format-table): generate the URL of the scaled
icon image by API.
+ * twittering-mode.el: Use `GET users/profile_image' API only if
+ the variable `twittering-use-profile-image-api' is non-nil. Since
+ the API is rate limited, it may cause troubles on other API calls.
+ (twittering-use-profile-image-api): new variable.
+ (twittering-generate-format-table): call `GET users/profile_imagne'
+ API only if `twittering-use-profile-image-api' is non-nil.
+
2010-07-03 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Replace `xml-parse-region' with
View
9 twittering-mode.el
@@ -1409,6 +1409,10 @@ is the display property for the icon.")
is non-nil. If this variable is non-nil, icon images are converted by
invoking \"convert\". Otherwise, cropped images are displayed.")
+(defvar twittering-use-profile-image-api nil
+ "*Whether to use `profile_image' API for retrieving scaled icon images.
+NOTE: This API is rate limited.")
+
(defconst twittering-error-icon-data-pair
'(xpm . "/* XPM */
static char * yellow3_xpm[] = {
@@ -4985,8 +4989,9 @@ following symbols;
(when (and twittering-icon-mode window-system)
(let ((url
(cond
- ((or (null twittering-convert-fix-size)
- (member twittering-convert-fix-size '(48 73)))
+ ((and twittering-use-profile-image-api
+ (or (null twittering-convert-fix-size)
+ (member twittering-convert-fix-size '(48 73))))
(let ((user (cdr (assq 'user-screen-name ,status-sym)))
(size
(if (or (null twittering-convert-fix-size)
Please sign in to comment.
Something went wrong with that request. Please try again.