Class: AOJ::Twitter

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/aoj/twitter.rb

Constant Summary collapse

CONSUMER_KEY =
"0T4d46LUm3jlf5xDPeRRQIUam"
CONSUMER_SECRET =
"knA6biWCQ6oBpyVSEjHhFz3Mn8Z9UsJc7TD9h5DdZoRxBl0KBp"

Instance Method Summary collapse

Instance Method Details

#post(solution, status) ⇒ Object



11
12
13
# File 'lib/aoj/twitter.rb', line 11

def post(solution, status)
  client.update create_text(solution, status)
end

#request_tokenObject



15
16
17
18
19
20
21
22
# File 'lib/aoj/twitter.rb', line 15

def request_token
  consumer = OAuth::Consumer.new(
    CONSUMER_KEY,
    CONSUMER_SECRET,
    { site: "https://api.twitter.com" }
  )
  consumer.get_request_token
end