Class: Twitter::User

### Home Classes Methods

### In Files

- lib/twitter/user.rb

### Parent

Twitter::BasicUser

### Methods

- #description_urls
- #profile_banner_url
- #profile_banner_url?
- #profile_banner_url_https
- #profile_banner_url_https?
- #profile_image_url
- #profile_image_url?
- #profile_image_url_https
- #profile_image_url_https?
- #status
- #status?

### Included Modules

- Twitter::Creatable
- Twitter::Exceptable

### Class/Module Index

Quicksearch

- Twitter
- Twitter::API
- Twitter::API::Arguments
- Twitter::API::DirectMessages
- Twitter::API::Favorites
- Twitter::API::FriendsAndFollowers
- Twitter::API::Help
- Twitter::API::Lists
- Twitter::API::PlacesAndGeo
- Twitter::API::SavedSearches
- Twitter::API::Search
- Twitter::API::SpamReporting
- Twitter::API::SuggestedUsers
- Twitter::API::Timelines
- Twitter::API::Trends
- Twitter::API::Tweets
- Twitter::API::Undocumented
- Twitter::API::Users
- Twitter::API::Utils
- Twitter::Action
- Twitter::Action::Favorite
- Twitter::Action::Follow
- Twitter::Action::ListMemberAdded
- Twitter::Action::Mention
- Twitter::Action::Reply
- Twitter::Action::Retweet
- Twitter::Action::Status
- Twitter::Action::Tweet
- Twitter::ActionFactory
- Twitter::Base
- Twitter::BasicUser
- Twitter::Client
- Twitter::Configurable
- Twitter::Configuration
- Twitter::Creatable
- Twitter::Cursor
- Twitter::Default
- Twitter::DirectMessage
- Twitter::Entity
- Twitter::Entity::Hashtag
- Twitter::Entity::Url
- Twitter::Entity::UserMention
- Twitter::Error
- Twitter::Error::AlreadyFavorited
- Twitter::Error::AlreadyRetweeted
- Twitter::Error::BadGateway
- Twitter::Error::BadRequest
- Twitter::Error::ClientError
- Twitter::Error::ConfigurationError
- Twitter::Error::DecodeError
- Twitter::Error::EnhanceYourCalm
- Twitter::Error::Forbidden
- Twitter::Error::GatewayTimeout
- Twitter::Error::IdentityMapKeyError
- Twitter::Error::InternalServerError
- Twitter::Error::NotAcceptable
- Twitter::Error::NotFound
- Twitter::Error::RateLimited
- Twitter::Error::ServerError
- Twitter::Error::ServiceUnavailable
- Twitter::Error::TooManyRequests
- Twitter::Error::Unauthorized
- Twitter::Error::UnprocessableEntity
- Twitter::Exceptable
- Twitter::Factory
- Twitter::Geo
- Twitter::Geo::Point
- Twitter::Geo::Polygon
- Twitter::GeoFactory
- Twitter::Identity
- Twitter::IdentityMap
- Twitter::Language
- Twitter::List
- Twitter::Media
- Twitter::Media::Photo
- Twitter::MediaFactory
- Twitter::Metadata
- Twitter::OEmbed
- Twitter::Place
- Twitter::ProfileBanner
- Twitter::RateLimit
- Twitter::Relationship
- Twitter::Request
- Twitter::Request::MultipartWithFile
- Twitter::Response
- Twitter::Response::ParseJson
- Twitter::Response::RaiseError
- Twitter::SavedSearch
- Twitter::SearchResults
- Twitter::Settings
- Twitter::Size
- Twitter::SourceUser
- Twitter::Status
- Twitter::Suggestion
- Twitter::TargetUser
- Twitter::Trend
- Twitter::Tweet
- Twitter::User
- Twitter::Version
- Enumerable
- Kernel

No matching classes.

# Twitter::User

### Constants

PROFILE_IMAGE_SUFFIX_REGEX

### 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_link_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.