module Slack::Endpoint::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).
@option options [Object] :count
Number of items to return per page.
@option options [Object] :page
Page number of results to return.
@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? options[:attachments] = options[:attachments].to_json if Hash === options[:attachments] 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).
@option options [Object] :count
Number of items to return per page.
@option options [Object] :page
Page number of results to return.
@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 48 def search_files(options={}) throw ArgumentError.new("Required arguments :query missing") if options[:query].nil? options[:attachments] = options[:attachments].to_json if Hash === options[:attachments] 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).
@option options [Object] :count
Number of items to return per page.
@option options [Object] :page
Page number of results to return.
@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 72 def search_messages(options={}) throw ArgumentError.new("Required arguments :query missing") if options[:query].nil? options[:attachments] = options[:attachments].to_json if Hash === options[:attachments] post("search.messages", options) end