Module: Slack::Web::Api::Mixins::Groups

Includes:
Ids
Included in:
Endpoints
Defined in:
lib/slack/web/api/mixins/groups.id.rb

Instance Method Summary collapse

Instance Method Details

#groups_id(options = {}) ⇒ Object

This method returns a group ID given a group name.

Options Hash (options):

  • :channel (channel)

    Group channel to get ID for, prefixed with #.


14
15
16
17
18
19
20
21
# File 'lib/slack/web/api/mixins/groups.id.rb', line 14

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