Sha256: 7f62efa6256c864679a107ca813c12bc447c8bdb4a64a0a0c98607a2d73e27e3

Contents?: true

Size: 657 Bytes

Versions: 14

Compression:

Stored size: 657 Bytes

Contents

require_relative 'ids.id'

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

            id_for(:group, name, '#', :groups, 'channel_not_found') do
              groups_list
            end
          end
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
slack-ruby-client-0.14.4 lib/slack/web/api/mixins/groups.id.rb
slack-ruby-client-0.14.3 lib/slack/web/api/mixins/groups.id.rb
slack-ruby-client-0.14.2 lib/slack/web/api/mixins/groups.id.rb
slack-ruby-client-0.14.1 lib/slack/web/api/mixins/groups.id.rb
slack-ruby-client-0.14.0 lib/slack/web/api/mixins/groups.id.rb
slack-ruby-client-0.13.1 lib/slack/web/api/mixins/groups.id.rb
slack-ruby-client-0.13.0 lib/slack/web/api/mixins/groups.id.rb
slack-ruby-client-0.12.0 lib/slack/web/api/mixins/groups.id.rb
slack-ruby-client-0.11.1 lib/slack/web/api/mixins/groups.id.rb
slack-ruby-client-0.11.0 lib/slack/web/api/mixins/groups.id.rb
slack-ruby-client-0.10.0 lib/slack/web/api/mixins/groups.id.rb
slack-ruby-client-0.9.1 lib/slack/web/api/mixins/groups.id.rb
slack-ruby-client-0.9.0 lib/slack/web/api/mixins/groups.id.rb
slack-ruby-client-0.8.1 lib/slack/web/api/mixins/groups.id.rb