Module: Slack::Web::Search
- Included in:
- Slack::Web
- Defined in:
- lib/slack/web/search.rb
Overview
Module for the search methods. Search your team's files and messages.
Constant Summary collapse
- SCOPE =
Endpoint scope
'search'
Instance Method Summary collapse
-
#search_all(params = {}) ⇒ Object
Searches for messages and files matching a query.
-
#search_files(params = {}) ⇒ Object
Searches for files matching a query.
-
#search_messages(params = {}) ⇒ Object
Searches for messages matching a query.
Instance Method Details
#search_all(params = {}) ⇒ Object
Searches for messages and files matching a query.
30 31 32 33 34 |
# File 'lib/slack/web/search.rb', line 30 def search_all(params = {}) fail ArgumentError, "Required arguments 'query' missing" if params['query'].nil? response = @session.do_post "#{SCOPE}.all", params Slack.parse_response(response) end |
#search_files(params = {}) ⇒ Object
Searches for files matching a query.
54 55 56 57 58 |
# File 'lib/slack/web/search.rb', line 54 def search_files(params = {}) fail ArgumentError, "Required arguments 'query' missing" if params['query'].nil? response = @session.do_post "#{SCOPE}.files", params Slack.parse_response(response) end |
#search_messages(params = {}) ⇒ Object
Searches for messages matching a query.
78 79 80 81 82 |
# File 'lib/slack/web/search.rb', line 78 def (params = {}) fail ArgumentError, "Required arguments 'query' missing" if params['query'].nil? response = @session.do_post "#{SCOPE}.messages", params Slack.parse_response(response) end |