module Slack::Web::Api::Endpoints::Search

Public Instance Methods

search_all(options = {}) click to toggle source

Searches for messages and files matching a query.

@option options [Object] :query

Search query. May contains booleans, etc.

@option options [Object] :highlight

Pass a value of true to enable query highlight markers (see below).

@option options [Object] :sort

Return matches sorted by either score or timestamp.

@option options [Object] :sort_dir

Change sort direction to ascending (asc) or descending (desc).

@option options [Object] :team_id

encoded team id to search in, required if org token is used.

@see api.slack.com/methods/search.all @see github.com/slack-ruby/slack-api-ref/blob/master/methods/search/search.all.json

# File lib/slack/web/api/endpoints/search.rb, line 24
def search_all(options = {})
  throw ArgumentError.new('Required arguments :query missing') if options[:query].nil?
  post('search.all', options)
end
search_files(options = {}) click to toggle source

Searches for files matching a query.

@option options [Object] :query

Search query.

@option options [Object] :highlight

Pass a value of true to enable query highlight markers (see below).

@option options [Object] :sort

Return matches sorted by either score or timestamp.

@option options [Object] :sort_dir

Change sort direction to ascending (asc) or descending (desc).

@option options [Object] :team_id

encoded team id to search in, required if org token is used.

@see api.slack.com/methods/search.files @see github.com/slack-ruby/slack-api-ref/blob/master/methods/search/search.files.json

# File lib/slack/web/api/endpoints/search.rb, line 44
def search_files(options = {})
  throw ArgumentError.new('Required arguments :query missing') if options[:query].nil?
  post('search.files', options)
end
search_messages(options = {}) click to toggle source

Searches for messages matching a query.

@option options [Object] :query

Search query.

@option options [Object] :highlight

Pass a value of true to enable query highlight markers (see below).

@option options [Object] :sort

Return matches sorted by either score or timestamp.

@option options [Object] :sort_dir

Change sort direction to ascending (asc) or descending (desc).

@option options [Object] :team_id

encoded team id to search in, required if org token is used.

@see api.slack.com/methods/search.messages @see github.com/slack-ruby/slack-api-ref/blob/master/methods/search/search.messages.json

# File lib/slack/web/api/endpoints/search.rb, line 64
def search_messages(options = {})
  throw ArgumentError.new('Required arguments :query missing') if options[:query].nil?
  post('search.messages', options)
end