Created
April 3, 2010 03:00
-
-
Save mourdok/354052 to your computer and use it in GitHub Desktop.
API Twitter eg.3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'twitter' | |
puts '------' | |
puts 'Trends' | |
puts '------' | |
puts "\n" | |
Twitter::Trends.current.each do |trend| | |
puts "Name: #{trend.name}" | |
puts "\n" | |
end | |
puts '------------' | |
puts 'Trends daily' | |
puts '------------' | |
puts "\n" | |
Twitter::Trends.daily(:date => Date.new(2009, 4, 2)).each do |trend| | |
puts "Name: #{trend.name}" | |
puts "\n" | |
end | |
puts '-------------' | |
puts 'Trends weekly' | |
puts '-------------' | |
puts "\n" | |
Twitter::Trends.weekly(:date => Date.new(2009, 4, 2)).each do |trend| | |
puts "Name: #{trend.name}" | |
puts "\n" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment