module Slack::Web::Api::Endpoints::Search
Public Instance Methods
This method allows to to search both messages and files in a single call.
@option options [Object] :query
Search query. May contains booleans, etc.
@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] :highlight
Pass a value of 1 to enable query highlight markers (see below).
@see api.slack.com/methods/search.all @see github.com/dblock/slack-api-ref/blob/master/methods/search.all.json
# File lib/slack/web/api/endpoints/search.rb, line 21 def search_all(options = {}) throw ArgumentError.new('Required arguments :query missing') if options[:query].nil? post('search.all', options) end
This method returns files matching a search query.
@option options [Object] :query
Search query. May contain booleans, etc.
@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] :highlight
Pass a value of 1 to enable query highlight markers (see below).
@see api.slack.com/methods/search.files @see github.com/dblock/slack-api-ref/blob/master/methods/search.files.json
# File lib/slack/web/api/endpoints/search.rb, line 39 def search_files(options = {}) throw ArgumentError.new('Required arguments :query missing') if options[:query].nil? post('search.files', options) end
This method returns messages matching a search query.
@option options [Object] :query
Search query. May contains booleans, etc.
@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] :highlight
Pass a value of 1 to enable query highlight markers (see below).
@see api.slack.com/methods/search.messages @see github.com/dblock/slack-api-ref/blob/master/methods/search.messages.json
# File lib/slack/web/api/endpoints/search.rb, line 57 def search_messages(options = {}) throw ArgumentError.new('Required arguments :query missing') if options[:query].nil? post('search.messages', options) end