Class/Module Index [+]

Quicksearch

Twitter::User

Attributes

connections[R]
contributors_enabled[R]
default_profile[R]
default_profile_image[R]
description[R]
favorite_count[R]
favoriters_count[R]
favorites_count[R]
favourite_count[R]
favouriters_count[R]
favourites_count[R]
follow_request_sent[R]
follower_count[R]
followers_count[R]
friend_count[R]
friends_count[R]
geo_enabled[R]
is_translator[R]
lang[R]
listed_count[R]
location[R]
name[R]
notifications[R]
profile_background_color[R]
profile_background_image_url[R]
profile_background_image_url_https[R]
profile_background_tile[R]
profile_sidebar_border_color[R]
profile_sidebar_fill_color[R]
profile_text_color[R]
profile_use_background_image[R]
protected[R]
status_count[R]
statuses_count[R]
time_zone[R]
translator[R]
tweet_count[R]
tweets_count[R]
update_count[R]
updates_count[R]
url[R]
utc_offset[R]
verified[R]

Public Instance Methods

description_urls() click to toggle source

@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
profile_banner_url(size=:web) click to toggle source

Return the URL to the user’s profile banner image

@param size [String, Symbol] The size of the image. Must be one of: ‘mobile’, ‘mobile_retina’, ‘web’, ‘web_retina’, ‘ipad’, or ‘ipad_retina’ @return [String]

# File lib/twitter/user.rb, line 46
def profile_banner_url(size=:web)
  insecure_url([@attrs[:profile_banner_url], size].join('/')) if profile_banner_url?
end
profile_banner_url?() click to toggle source
# File lib/twitter/user.rb, line 58
def profile_banner_url?
  !@attrs[:profile_banner_url].nil?
end
Also aliased as: profile_banner_url_https?
profile_banner_url_https(size=:web) click to toggle source

Return the secure URL to the user’s profile banner image

@param size [String, Symbol] The size of the image. Must be one of: ‘mobile’, ‘mobile_retina’, ‘web’, ‘web_retina’, ‘ipad’, or ‘ipad_retina’ @return [String]

# File lib/twitter/user.rb, line 54
def profile_banner_url_https(size=:web)
  [@attrs[:profile_banner_url], size].join('/') if profile_banner_url?
end
profile_banner_url_https?() click to toggle source
Alias for: profile_banner_url?
profile_image_url(size=:normal) click to toggle source

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
profile_image_url?() click to toggle source
# File lib/twitter/user.rb, line 85
def profile_image_url?
  !@attrs[:profile_image_url_https].nil?
end
Also aliased as: profile_image_url_https?
profile_image_url_https(size=:normal) click to toggle source

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
profile_image_url_https?() click to toggle source
Alias for: profile_image_url?
status() click to toggle source

@return [Twitter::Tweet]

# File lib/twitter/user.rb, line 91
def status
  @status ||= fetch_or_new_without_self(Twitter::Tweet, @attrs, :status, :user)
end
status?() click to toggle source
# File lib/twitter/user.rb, line 95
def status?
  !@attrs[:status].nil?
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.