Sha256: 6550fc1dd9083b928c2a8a878cadaeda882dda96217a03742a5749f472f8cf39
Contents?: true
Size: 628 Bytes
Versions: 1
Compression:
Stored size: 628 Bytes
Contents
class SlackSmartBot def get_users() begin users = [] cursor = nil if config.simulate users = client.web_client.users_list else begin resp = client.web_client.users_list(limit: 1000, cursor: cursor) if resp.key?(:members) and resp[:members].is_a(Array) and resp[:members].size > 0 users << resp[:members] end cursor = resp.get_values(:next_cursor).values[-1] end until cursor.empty? users.flatten! end return users rescue Exception => stack @logger.warn stack end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
slack-smart-bot-1.10.0 | lib/slack/smart-bot/comm/get_users.rb |