module Slack::Endpoint::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] :count

Number of items to return per page.

@option options [Object] :highlight

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

@option options [Object] :page

Page number of results to return.

@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).

@see api.slack.com/methods/search.all @see github.com/aki017/slack-api-docs/blob/master/methods/search.all.md @see github.com/aki017/slack-api-docs/blob/master/methods/search.all.json

# File lib/slack/endpoint/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. May contain booleans, etc.

@option options [Object] :count

Number of items to return per page.

@option options [Object] :highlight

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

@option options [Object] :page

Page number of results to return.

@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).

@see api.slack.com/methods/search.files @see github.com/aki017/slack-api-docs/blob/master/methods/search.files.md @see github.com/aki017/slack-api-docs/blob/master/methods/search.files.json

# File lib/slack/endpoint/search.rb, line 47
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. May contains booleans, etc.

@option options [Object] :count

Pass the number of results you want per "page". Maximum of 100

@option options [Object] :highlight

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

@option options [Object] :page

Page number of results to return.

@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).

@see api.slack.com/methods/search.messages @see github.com/aki017/slack-api-docs/blob/master/methods/search.messages.md @see github.com/aki017/slack-api-docs/blob/master/methods/search.messages.json

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