Sha256: d53ddf1b1d80b53760293e903c9a2df3bfe1e4304d964db1d70ed6e46eb807e5
Contents?: true
Size: 628 Bytes
Versions: 5
Compression:
Stored size: 628 Bytes
Contents
# frozen_string_literal: true require_relative 'ids.id' module Slack module Web module Api module Mixins module Users include Ids # # This method returns a user ID given a user name. # # @option options [user] :user # User to get ID for, prefixed with '@'. def users_id(options = {}) name = options[:user] throw ArgumentError.new('Required arguments :user missing') if name.nil? id_for :user, name, '@', :users_list, :members, 'user_not_found' end end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems