Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Document new parameters [ci skip]

  • Loading branch information...
commit 75e751409774598fe244bec79cab20bfbb6e9b92 1 parent 47f4b75
@sferik authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 lib/twitter/user.rb
View
6 lib/twitter/user.rb
@@ -50,6 +50,9 @@ class User < Twitter::Identity
alias verified? verified
alias want_retweets? want_retweets
+ # Return the URL to the user's profile image
+ #
+ # @param size [String, Symbol] The size of the image. Must be one of: 'mini', 'normal', 'bigger' or 'original'
# @return [String]
def profile_image_url(size=:normal)
# The profile image URL comes in looking like like this:
@@ -61,6 +64,9 @@ def profile_image_url(size=:normal)
@attrs[:profile_image_url].sub(/_normal(\.gif|\.jpe?g|\.png)$/, profile_image_suffix(size)) unless @attrs[:profile_image_url].nil?
end
+ # Return the secure URL to the user's profile image
+ #
+ # @param size [String, Symbol] The size of the image. Must be one of: 'mini', 'normal', 'bigger' or 'original'
# @return [String]
def profile_image_url_https(size=:normal)
# The profile image URL comes in looking like like this:
Please sign in to comment.
Something went wrong with that request. Please try again.