Sha256: c2dff7774abda546e9c10c85ae596b98cd8b7e198204079507ffff57d4d6cc16

Contents?: true

Size: 661 Bytes

Versions: 17

Compression:

Stored size: 661 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

client.chat_postMessage(
  channel: '#general',
  as_user: true,
  attachments: [
    {
      fallback: "Ticket #1943: Can't rest my password - https://groove.hq/path/to/ticket/1943",
      pretext: 'New ticket from Andrea Lee',
      title: "Ticket #1943: Can't reset my password",
      title_link: 'https://groove.hq/path/to/ticket/1943',
      text: 'Help! I tried to reset my password but nothing happened!',
      color: '#7CD197'
    }
  ]
)

Version data entries

17 entries across 17 versions & 2 rubygems

Version Path
slack-ruby-client-bhe-0.5.5 examples/new_ticket/new_ticket.rb
slack-ruby-client-bhe-0.5.4 examples/new_ticket/new_ticket.rb
slack-ruby-client-0.7.7 examples/new_ticket/new_ticket.rb
slack-ruby-client-0.7.6 examples/new_ticket/new_ticket.rb
slack-ruby-client-0.7.5 examples/new_ticket/new_ticket.rb
slack-ruby-client-0.7.4 examples/new_ticket/new_ticket.rb
slack-ruby-client-0.7.3 examples/new_ticket/new_ticket.rb
slack-ruby-client-0.7.2 examples/new_ticket/new_ticket.rb
slack-ruby-client-0.7.1 examples/new_ticket/new_ticket.rb
slack-ruby-client-0.7.0 examples/new_ticket/new_ticket.rb
slack-ruby-client-0.6.0 examples/new_ticket/new_ticket.rb
slack-ruby-client-0.5.4 examples/new_ticket/new_ticket.rb
slack-ruby-client-0.5.3 examples/new_ticket/new_ticket.rb
slack-ruby-client-0.5.2 examples/new_ticket/new_ticket.rb
slack-ruby-client-0.5.1 examples/new_ticket/new_ticket.rb
slack-ruby-client-0.5.0 examples/new_ticket/new_ticket.rb
slack-ruby-client-0.4.0 examples/new_ticket/new_ticket.rb