ruby_api.rb
# Print data about a list of Tweets
Print data about a list of Tweets
Print data about a list of Tweets
def print_timeline(tweets)
  tweets.each do |tweet|
    d = Time.parse(tweet['created_at']).to_i
    tl = Time.now.to_i
    diff = tl - d 
    if diff < 60
      puts "#{tweet['user']['name']} , #{tweet['text']} , #{tweet['id']}"
    else 
      puts "No tweets were made in the last minute"
    end
  end
end
def print_timeline ( tweets ) tweets . each do | tweet | d = Time . parse ( tweet [ 'created_at' ] ) . to_i tl = Time . now . to_i diff = tl - d if diff < 60 puts "#{tweet['user']['name']} , #{tweet['text']} , #{tweet['id']}" else puts "No tweets were made in the last minute" end end end
Print data about a list of Tweets
Print data about a list of Tweets
tweets
<not_specific>