Sha256: 3702518fa9ea63adb42889302f7aac5fcde01153bf4a541ab58c783b7458cf5b

Contents?: true

Size: 1.98 KB

Versions: 7

Compression:

Stored size: 1.98 KB

Contents

# This file was auto-generated by lib/tasks/web.rake

desc "Search your team's files and messages."
command 'search' do |g|
  g.desc 'This method allows to to search both messages and files in a single call.'
  g.long_desc %( This method allows to to search both messages and files in a single call. )
  g.command 'all' do |c|
    c.flag 'query', desc: 'Search query. May contains booleans, etc.'
    c.flag 'sort', desc: 'Return matches sorted by either score or timestamp.'
    c.flag 'sort_dir', desc: 'Change sort direction to ascending (asc) or descending (desc).'
    c.flag 'highlight', desc: 'Pass a value of 1 to enable query highlight markers (see below).'
    c.action do |_global_options, options, _args|
      puts JSON.dump($client.search_all(options))
    end
  end

  g.desc 'This method returns files matching a search query.'
  g.long_desc %( This method returns files matching a search query. )
  g.command 'files' do |c|
    c.flag 'query', desc: 'Search query. May contain booleans, etc.'
    c.flag 'sort', desc: 'Return matches sorted by either score or timestamp.'
    c.flag 'sort_dir', desc: 'Change sort direction to ascending (asc) or descending (desc).'
    c.flag 'highlight', desc: 'Pass a value of 1 to enable query highlight markers (see below).'
    c.action do |_global_options, options, _args|
      puts JSON.dump($client.search_files(options))
    end
  end

  g.desc 'This method returns messages matching a search query.'
  g.long_desc %( This method returns messages matching a search query. )
  g.command 'messages' do |c|
    c.flag 'query', desc: 'Search query. May contains booleans, etc.'
    c.flag 'sort', desc: 'Return matches sorted by either score or timestamp.'
    c.flag 'sort_dir', desc: 'Change sort direction to ascending (asc) or descending (desc).'
    c.flag 'highlight', desc: 'Pass a value of 1 to enable query highlight markers (see below).'
    c.action do |_global_options, options, _args|
      puts JSON.dump($client.search_messages(options))
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
slack-ruby-client-0.7.5 bin/commands/search.rb
slack-ruby-client-0.7.4 bin/commands/search.rb
slack-ruby-client-0.7.3 bin/commands/search.rb
slack-ruby-client-0.7.2 bin/commands/search.rb
slack-ruby-client-0.7.1 bin/commands/search.rb
slack-ruby-client-0.7.0 bin/commands/search.rb
slack-ruby-client-0.6.0 bin/commands/search.rb