module PanickerApi
Public Instance Methods
general_message(text_to_send = '', bot: nil, target: nil, txt: nil, company: nil)
click to toggle source
# File lib/shopapp/panicker_api.rb, line 6 def general_message(text_to_send = '', bot: nil, target: nil, txt: nil, company: nil) txt ||= text_to_send RestClient.post "https://panic.ozz.fi/shoot.json?key=#{Rails.configuration.settings['system_panic_key']}", { txt: txt, target: target, bot: bot, not_markdown: true }.to_json, { content_type: 'application/json' } rescue Rails.logger.error "Silently failing sending panicker a message #{txt}." Rails.logger.error $! end