@return [Array<Twitter::Entity::Url>]
# File lib/twitter/user.rb, line 36 def description_urls @description_urls ||= Array(@attrs[:entities][:description][:urls]).map do |entity| Twitter::Entity::Url.fetch_or_new(entity) end end
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]
# File lib/twitter/user.rb, line 67 def profile_image_url(size=:normal) insecure_url(profile_image_url_https(size)) if profile_image_url? end
# File lib/twitter/user.rb, line 85 def profile_image_url? !@attrs[:profile_image_url_https].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]
# File lib/twitter/user.rb, line 75 def profile_image_url_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 resize_profile_image_url(@attrs[:profile_image_url_https], size) if profile_image_url? end
Generated with the Darkfish Rdoc Generator 2.