Module: Slack::Web::Api::Endpoints::Search
- Included in:
- Slack::Web::Api::Endpoints
- Defined in:
- lib/slack/web/api/endpoints/search.rb
Instance Method Summary collapse
-
#search_all(options = {}) ⇒ Object
Searches for messages and files matching a query.
-
#search_files(options = {}) ⇒ Object
Searches for files matching a query.
-
#search_messages(options = {}) ⇒ Object
Searches for messages matching a query.
Instance Method Details
#search_all(options = {}) ⇒ Object
Searches for messages and files matching a query.
24 25 26 27 |
# File 'lib/slack/web/api/endpoints/search.rb', line 24 def search_all( = {}) raise ArgumentError, 'Required arguments :query missing' if [:query].nil? post('search.all', ) end |
#search_files(options = {}) ⇒ Object
Searches for files matching a query.
44 45 46 47 |
# File 'lib/slack/web/api/endpoints/search.rb', line 44 def search_files( = {}) raise ArgumentError, 'Required arguments :query missing' if [:query].nil? post('search.files', ) end |
#search_messages(options = {}) ⇒ Object
Searches for messages matching a query.
66 67 68 69 70 71 72 73 74 75 |
# File 'lib/slack/web/api/endpoints/search.rb', line 66 def ( = {}) raise ArgumentError, 'Required arguments :query missing' if [:query].nil? if block_given? Pagination::Cursor.new(self, :search_messages, ).each do |page| yield page end else post('search.messages', ) end end |