class Ruboty::Shinchoku::Actions::GetRandomImage

Constants

TUMBLR_URL

Public Instance Methods

call() click to toggle source
# File lib/ruboty/shinchoku/actions/get_ramdom_image.rb, line 7
def call
  message.reply client.random_image(TUMBLR_URL)
end

Private Instance Methods

client() click to toggle source
# File lib/ruboty/shinchoku/actions/get_ramdom_image.rb, line 19
def client
  configure
  Tumblr::Client.new
end
configure() click to toggle source
# File lib/ruboty/shinchoku/actions/get_ramdom_image.rb, line 13
def configure
  Tumblr.configure do |c|
    c.consumer_key = tumblr_api_key
  end
end
tumblr_api_key() click to toggle source
# File lib/ruboty/shinchoku/actions/get_ramdom_image.rb, line 24
def tumblr_api_key
  ENV['TUMBLR_API_KEY']
end