Sha256: 75afd360923958e9fa9c6b7f90251ade97ff477c624af68e785b2bd3f0d20ea0

Contents?: true

Size: 389 Bytes

Versions: 5

Compression:

Stored size: 389 Bytes

Contents

require 'slack-ruby-client'

Slack.configure do |config|
  config.token = ENV['SLACK_API_TOKEN']
  fail 'Missing ENV[SLACK_API_TOKEN]!' unless config.token
end

client = Slack::Web::Client.new

client.auth_test

general_channel = client.channels_list['channels'].detect { |c| c['name'] == 't3' }

client.chat_postMessage(channel: general_channel['id'], text: 'Hello World', as_user: true)

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
slack-ruby-client-0.3.1 examples/hi_web/hi.rb
slack-ruby-client-0.3.0 examples/hi_web/hi.rb
slack-ruby-client-0.2.1 examples/hi_web/hi.rb
slack-ruby-client-0.2.0 examples/hi_web/hi.rb
slack-ruby-client-0.1.0 examples/hi_web/hi.rb