Sha256: 8deaaf3a540f7b9e2d82f7233c9b0e75996b41e39d4c80bf236276d55becc40c

Contents?: true

Size: 693 Bytes

Versions: 13

Compression:

Stored size: 693 Bytes

Contents

# frozen_string_literal: true
require 'slack-ruby-client'

Slack.configure do |config|
  config.token = ENV['SLACK_API_TOKEN']
  raise '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 reset 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

13 entries across 13 versions & 1 rubygems

Version Path
slack-ruby-client-2.4.0 examples/new_ticket/new_ticket.rb
slack-ruby-client-2.3.0 examples/new_ticket/new_ticket.rb
slack-ruby-client-2.2.0 examples/new_ticket/new_ticket.rb
slack-ruby-client-2.1.0 examples/new_ticket/new_ticket.rb
slack-ruby-client-2.0.0 examples/new_ticket/new_ticket.rb
slack-ruby-client-1.1.0 examples/new_ticket/new_ticket.rb
slack-ruby-client-1.0.0 examples/new_ticket/new_ticket.rb
slack-ruby-client-0.17.0 examples/new_ticket/new_ticket.rb
slack-ruby-client-0.16.0 examples/new_ticket/new_ticket.rb
slack-ruby-client-0.15.1 examples/new_ticket/new_ticket.rb
slack-ruby-client-0.15.0 examples/new_ticket/new_ticket.rb
slack-ruby-client-0.14.6 examples/new_ticket/new_ticket.rb
slack-ruby-client-0.14.5 examples/new_ticket/new_ticket.rb