Artificial intelligent assistant

RubyでTwitterのDMを取得する方法 RubyDM DMConfigure ①gem install twitter ②Twitter ③access token console.rb:6:in `<main>': undefined method`configure' for Twitter:Module (NoMethodError) require 'twitter' require './key' require 'pp' # Twitter.configure do |config| config.consumer_key = C_KEY config.consumer_secret = C_SEC config.oauth_token = A_TOKEN config.oauth_token_secret = A_SEC end #DM pp Twitter.direct_messages

`undefined method`
Twitter

twittergem
<

example


client = Twitter::REST::Client.new do |config|
config.consumer_key = "YOUR_CONSUMER_KEY"
config.consumer_secret = "YOUR_CONSUMER_SECRET"
config.access_token = "YOUR_ACCESS_TOKEN"
config.access_token_secret = "YOUR_ACCESS_SECRET"
end

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 8b497531410b5a4a8ce8513cbf39352e