class Twitter::Tweet
Attributes
favorite_count[R]
@return [Integer]
filter_level[R]
@return [String]
in_reply_to_screen_name[R]
@return [String]
in_reply_to_status_id[R]
@return [Integer]
in_reply_to_tweet_id[R]
@return [Integer]
in_reply_to_user_id[R]
@return [Integer]
lang[R]
@return [String]
quote_count[R]
@return [Integer]
reply_count[R]
@return [Integer]
retweet_count[R]
@return [Integer]
source[R]
@return [String]
text[R]
@return [String]
Public Class Methods
new(attrs = {})
click to toggle source
Initializes a new object
@param attrs [Hash] @return [Twitter::Tweet]
Calls superclass method
Twitter::Identity::new
# File lib/twitter/tweet.rb, line 36 def initialize(attrs = {}) attrs[:text] = attrs[:full_text] if attrs[:text].nil? && !attrs[:full_text].nil? super end
Public Instance Methods
full_text()
click to toggle source
@note May be > 280 characters. @return [String]
# File lib/twitter/tweet.rb, line 43 def full_text if retweet? prefix = text[/\A(RT @[a-z0-9_]{1,20}: )/i, 1] [prefix, retweeted_status.text].compact.join else text end end
uri()
click to toggle source
@return [Addressable::URI] The URL to the tweet.
# File lib/twitter/tweet.rb, line 54 def uri Addressable::URI.parse("https://twitter.com/#{user.screen_name}/status/#{id}") if user? end
Also aliased as: url