Sha256: 9f04b0590aec3671ae657878e21b52ca7f66822c88d1b99a04dc9ed10b446229

Contents?: true

Size: 674 Bytes

Versions: 5

Compression:

Stored size: 674 Bytes

Contents

# frozen_string_literal: true
require_relative 'ids.id'

module Slack
  module Web
    module Api
      module Mixins
        module Conversations
          include Ids
          #
          # This method returns a channel ID given a channel name.
          #
          # @option options [channel] :channel
          #   Channel to get ID for, prefixed with #.
          def conversations_id(options = {})
            name = options[:channel]
            raise ArgumentError, 'Required arguments :channel missing' if name.nil?

            id_for :channel, name, '#', :conversations_list, :channels, 'channel_not_found'
          end
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
slack-ruby-client-2.4.0 lib/slack/web/api/mixins/conversations.id.rb
slack-ruby-client-2.3.0 lib/slack/web/api/mixins/conversations.id.rb
slack-ruby-client-2.2.0 lib/slack/web/api/mixins/conversations.id.rb
slack-ruby-client-2.1.0 lib/slack/web/api/mixins/conversations.id.rb
slack-ruby-client-2.0.0 lib/slack/web/api/mixins/conversations.id.rb