Class: Slack::CLI::App
Instance Method Summary collapse
Instance Method Details
#export(channel_id) ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/slack/cli/app.rb', line 31 def export(channel_id) args = .merge(channel: channel_id) if args.key?(:oldest) (args[:oldest]) end if args.key?(:latest) args[:latest] = (args[:latest]) end case channel_id when /^C/ puts client.channels.history(args) when /^D/ puts client.im.history(args) else fail ArgumentError, "Unknown channel format (got `#{channel_id}')" end end |