### Home Classes Methods

### In Files

- lib/twitter/profile.rb

### Methods

- #profile_banner_uri
- #profile_banner_uri?
- #profile_banner_uri_https
- #profile_banner_url
- #profile_banner_url_https
- #profile_image_uri
- #profile_image_uri?
- #profile_image_uri_https
- #profile_image_url
- #profile_image_url_https

### Included Modules

- Memoizable

### Class/Module Index

Quicksearch

- Twitter
- Twitter::Arguments
- Twitter::Base
- Twitter::BasicUser
- Twitter::Client
- Twitter::Configuration
- Twitter::Creatable
- Twitter::Cursor
- Twitter::DirectMessage
- Twitter::Entities
- Twitter::Entity
- Twitter::Entity::Hashtag
- Twitter::Entity::Symbol
- Twitter::Entity::URI
- Twitter::Entity::URL
- Twitter::Entity::UserMention
- Twitter::Enumerable
- Twitter::Error
- Twitter::Error::AlreadyFavorited
- Twitter::Error::AlreadyRetweeted
- Twitter::Error::BadGateway
- Twitter::Error::BadRequest
- Twitter::Error::ClientError
- Twitter::Error::Code
- Twitter::Error::ConfigurationError
- Twitter::Error::DuplicateStatus
- Twitter::Error::Forbidden
- Twitter::Error::GatewayTimeout
- Twitter::Error::InternalServerError
- Twitter::Error::NotAcceptable
- Twitter::Error::NotFound
- Twitter::Error::RequestTimeout
- Twitter::Error::ServerError
- Twitter::Error::ServiceUnavailable
- Twitter::Error::TooManyRequests
- Twitter::Error::UnacceptableIO
- Twitter::Error::Unauthorized
- Twitter::Error::UnprocessableEntity
- Twitter::Factory
- Twitter::Geo
- Twitter::Geo::Point
- Twitter::Geo::Polygon
- Twitter::GeoFactory
- Twitter::GeoResults
- Twitter::Identity
- Twitter::Language
- Twitter::List
- Twitter::Media
- Twitter::Media::Photo
- Twitter::MediaFactory
- Twitter::Metadata
- Twitter::OEmbed
- Twitter::Place
- Twitter::Profile
- Twitter::ProfileBanner
- Twitter::REST
- Twitter::REST::API
- Twitter::REST::Client
- Twitter::REST::DirectMessages
- Twitter::REST::Favorites
- Twitter::REST::FriendsAndFollowers
- Twitter::REST::Help
- Twitter::REST::Lists
- Twitter::REST::Media
- Twitter::REST::OAuth
- Twitter::REST::PlacesAndGeo
- Twitter::REST::Request
- Twitter::REST::Request::MultipartWithFile
- Twitter::REST::Response
- Twitter::REST::Response::ParseErrorJson
- Twitter::REST::Response::ParseJson
- Twitter::REST::Response::RaiseError
- Twitter::REST::SavedSearches
- Twitter::REST::Search
- Twitter::REST::SpamReporting
- Twitter::REST::SuggestedUsers
- Twitter::REST::Timelines
- Twitter::REST::Trends
- Twitter::REST::Tweets
- Twitter::REST::Undocumented
- Twitter::REST::Users
- Twitter::REST::Utils
- Twitter::RateLimit
- Twitter::Relationship
- Twitter::Request
- Twitter::SavedSearch
- Twitter::SearchResults
- Twitter::Settings
- Twitter::Size
- Twitter::SourceUser
- Twitter::Streaming
- Twitter::Streaming::Client
- Twitter::Streaming::Connection
- Twitter::Streaming::DeletedTweet
- Twitter::Streaming::Event
- Twitter::Streaming::FriendList
- Twitter::Streaming::MessageParser
- Twitter::Streaming::Response
- Twitter::Streaming::StallWarning
- Twitter::Suggestion
- Twitter::TargetUser
- Twitter::Token
- Twitter::Trend
- Twitter::TrendResults
- Twitter::Tweet
- Twitter::User
- Twitter::Utils
- Twitter::Utils::ClassMethods
- Twitter::Version

No matching classes.

# Twitter::Profile

### Constants

PREDICATE_URI_METHOD_REGEX
PROFILE_IMAGE_SUFFIX_REGEX

### Public Instance Methods

profile_banner_uri(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 [Addressable::URI]

    # File lib/twitter/profile.rb, line 28
    def profile_banner_uri(size = :web)
      parse_encoded_uri(insecure_uri([@attrs[:profile_banner_url], size].join('/'))) unless @attrs[:profile_banner_url].nil?
    end

Also aliased as: profile_banner_url
profile_banner_uri?() click to toggle source

@return [Boolean]

    # File lib/twitter/profile.rb, line 43
    def profile_banner_uri?
      !!@attrs[:profile_banner_url]
    end

profile_banner_uri_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 [Addressable::URI]

    # File lib/twitter/profile.rb, line 37
    def profile_banner_uri_https(size = :web)
      parse_encoded_uri([@attrs[:profile_banner_url], size].join('/')) unless @attrs[:profile_banner_url].nil?
    end

Also aliased as: profile_banner_url_https
profile_banner_url(size = :web) click to toggle source
Alias for: profile_banner_uri
profile_banner_url_https(size = :web) click to toggle source
Alias for: profile_banner_uri_https
profile_image_uri(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 [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

Also aliased as: profile_image_url
profile_image_uri?() click to toggle source

@return [Boolean]

    # File lib/twitter/profile.rb, line 74
    def profile_image_uri?
      !!@attrs[:profile_image_url_https]
    end

profile_image_uri_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 [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

Also aliased as: profile_image_url_https
profile_image_url(size = :normal) click to toggle source
Alias for: profile_image_uri
profile_image_url_https(size = :normal) click to toggle source
Alias for: profile_image_uri_https

[Validate]

Generated with the Darkfish Rdoc Generator 2.