Module: Slack::Endpoint::Search
- Included in:
- Slack::Endpoint
- Defined in:
- lib/slack/endpoint/search.rb
Instance Method Summary collapse
-
#search_all(options = {}) ⇒ Object
This method allows users and applications to search both messages and files in a single call.
-
#search_files(options = {}) ⇒ Object
This method returns files matching a search query.
-
#search_messages(options = {}) ⇒ Object
This method returns messages matching a search query.
Instance Method Details
#search_all(options = {}) ⇒ Object
This method allows users and applications to search both messages and files in a single call.
24 25 26 27 28 |
# File 'lib/slack/endpoint/search.rb', line 24 def search_all(={}) throw ArgumentError.new("Required arguments :query missing") if [:query].nil? [:attachments] = [:attachments].to_json if Hash === [:attachments] post("search.all", ) end |
#search_files(options = {}) ⇒ Object
This method returns files matching a search query.
48 49 50 51 52 |
# File 'lib/slack/endpoint/search.rb', line 48 def search_files(={}) throw ArgumentError.new("Required arguments :query missing") if [:query].nil? [:attachments] = [:attachments].to_json if Hash === [:attachments] post("search.files", ) end |
#search_messages(options = {}) ⇒ Object
This method returns messages matching a search query.
72 73 74 75 76 |
# File 'lib/slack/endpoint/search.rb', line 72 def (={}) throw ArgumentError.new("Required arguments :query missing") if [:query].nil? [:attachments] = [:attachments].to_json if Hash === [:attachments] post("search.messages", ) end |