Created
August 26, 2015 15:21
-
-
Save lorentzca/96f636dfee1acb3e8f90 to your computer and use it in GitHub Desktop.
日本のトレンドのワードを1つだけ返す
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 'twitter' | |
require 'pp' | |
client = Twitter::REST::Client.new do |config| | |
config.consumer_key = ENV['CONSUMER_KEY'] | |
config.consumer_secret = ENV['CONSUMER_SECRET'] | |
config.access_token = ENV['ACCESS_TOKEN'] | |
config.access_token_secret = ENV['ACCESS_TOKEN_SECRET'] | |
end | |
pp client.local_trends(23424856).to_hash[:trends][0][:name] |
Author
lorentzca
commented
Aug 26, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment