class Ruboty::Yo::Actions::Yo

Public Instance Methods

call() click to toggle source
# File lib/ruboty/yo/actions/yo.rb, line 5
def call
  params = {api_token: ENV['YO_API_TOKEN'], username: message[:to]}
  res = Net::HTTP.post_form(::Ruboty::Yo::ENDPOINT_URL, params)

  unless res.is_a?(Net::HTTPOK)
    message.reply("伝わらなかったよ")
  end
end