Module: SlackWeb
- Defined in:
- lib/slack_web.rb
Class Method Summary collapse
Class Method Details
.call(options) ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/slack_web.rb', line 5 def self.call() .fetch(:token) method = .fetch(:method) fail unless method.match(/^[a-z]+\.[A-z]+$/) .delete(:method) api_url = [:slack_api_url] || 'https://slack.com/api' req = Net::HTTP.post_form URI(api_url + '/' + method), JSON.parse req.body end |