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 [Addressable::URI]
# File lib/twitter/profile.rb, line 53 def profile_image_uri(size = :normal) parse_encoded_uri(insecure_uri(profile_image_uri_https(size))) unless @attrs[:profile_image_url_https].nil? end
@return [Boolean]
# File lib/twitter/profile.rb, line 74 def profile_image_uri? !!@attrs[:profile_image_url_https] 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 [Addressable::URI]
# File lib/twitter/profile.rb, line 62 def profile_image_uri_https(size = :normal) # The profile image URL comes in looking like like this: # https://a0.twimg.com/profile_images/1759857427/image1326743606_normal.png # It can be converted to any of the following sizes: # https://a0.twimg.com/profile_images/1759857427/image1326743606.png # https://a0.twimg.com/profile_images/1759857427/image1326743606_mini.png # https://a0.twimg.com/profile_images/1759857427/image1326743606_bigger.png parse_encoded_uri(@attrs[:profile_image_url_https].sub(PROFILE_IMAGE_SUFFIX_REGEX, profile_image_suffix(size))) unless @attrs[:profile_image_url_https].nil? end
Generated with the Darkfish Rdoc Generator 2.