Class: ChatBot::GroupMeApi

Inherits:
Object
  • Object
show all
Defined in:
lib/chatbot/groupme_api.rb

Class Method Summary collapse

Class Method Details

.send_message(message, configuration) ⇒ Object



7
8
9
10
# File 'lib/chatbot/groupme_api.rb', line 7

def self.send_message(message, configuration)
  puts "Sending message to #{configuration.api_uri} with id: #{configuration.bot_id} and message: #{message}"
  Net::HTTP.post_form(URI.parse(configuration.api_uri), { 'bot_id' => configuration.bot_id, 'text' => message })
end