0

https://github.com/tweetstream/tweetstreamに基づいて Twitter アプリを構築しようとしています。しかし、http: //www.rubydoc.info/gems/tweetstream/TweetStream/Client では、どうすればリツイートを無視できるのでしょうか?

これは機能します

TweetStream::Client.new.follow(14252, 53235) do |status|
  puts "#{status.text}"
end

リツイート除外失敗 #1

# both block arg and actual block given (SyntaxError)

TweetStream::Client.new.follow(14252, 53235).reject(&:retweet) do |status|
  puts "#{status.text}"
end

リツイート除外失敗 #2

# No errors but also no tweets appearing

TweetStream::Client.new.follow(14252, 53235) do |status|
  unless status.retweet
    puts "#{status.text}"
  end
end
4

0 に答える 0