Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Started handling delete

  • Loading branch information...
commit 8860b97bce4bc36086116f380a2771af3c199ea2 1 parent 64dc08f
@eric-vautour eric-vautour authored committed
Showing with 11 additions and 0 deletions.
  1. +4 −0 lib/twitter/streaming/message_parser.rb
  2. +7 −0 lib/twitter/tweet.rb
View
4 lib/twitter/streaming/message_parser.rb
@@ -11,6 +11,10 @@ def self.parse(data)
DirectMessage.new(data[:direct_message])
elsif data[:friends]
FriendList.new(data[:friends])
+ elsif data[:delete]
+ if data[:delete][:status]
+ Tweet.new(data[:delete][:status].merge(:deleted => true))
+ end
end
end
end
View
7 lib/twitter/tweet.rb
@@ -10,6 +10,7 @@ class Tweet < Twitter::Identity
alias favoriters_count favorite_count
alias in_reply_to_tweet_id in_reply_to_status_id
alias retweeters_count retweet_count
+ attr_reader :deleted
object_attr_reader :GeoFactory, :geo
object_attr_reader :Metadata, :metadata
object_attr_reader :Place, :place
@@ -30,6 +31,12 @@ def filter_level
@attrs[:filter_level] || "none"
end
memoize :filter_level
+
+ # @note Not a real entity
+ # @return [Boolean]
+ def deleted?
+ deleted == true
+ end
# @return [String]
# @note May be > 140 characters.
Please sign in to comment.
Something went wrong with that request. Please try again.