|
| 1 | +# frozen_string_literal: true |
| 2 | +# This file was auto-generated by lib/tasks/web.rake |
| 3 | + |
| 4 | +module Slack |
| 5 | + module Web |
| 6 | + module Api |
| 7 | + module Endpoints |
| 8 | + module AssistantSearch |
| 9 | + # |
| 10 | + # Searches messages across your Slack organization—perfect for broad, specific, and real-time data retrieval. |
| 11 | + # |
| 12 | + # @option options [string] :query |
| 13 | + # User prompt or search query. |
| 14 | + # @option options [string] :action_token |
| 15 | + # Send action_token as received in a message event. |
| 16 | + # @option options [array] :channel_types |
| 17 | + # Mix and match channel types by providing a comma-separated list of any combination of public_channel, private_channel, mpim, im. |
| 18 | + # @option options [array] :content_types |
| 19 | + # Content types to include, a comma-separated list of any combination of messages, files. |
| 20 | + # @option options [Object] :context_channel_id |
| 21 | + # Context channel ID to support scoping the search when applicable. |
| 22 | + # @option options [string] :cursor |
| 23 | + # The cursor returned by the API. Leave this blank for the first request, and use this to get the next page of results. |
| 24 | + # @option options [boolean] :include_bots |
| 25 | + # If you want the results to include bots. |
| 26 | + # @option options [integer] :limit |
| 27 | + # Number of results to return, up to a max of 20. Defaults to 20. |
| 28 | + # @see https://api.slack.com/methods/assistant.search.context |
| 29 | + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/assistant.search/assistant.search.context.json |
| 30 | + def assistant_search_context(options = {}) |
| 31 | + raise ArgumentError, 'Required arguments :query missing' if options[:query].nil? |
| 32 | + if block_given? |
| 33 | + Pagination::Cursor.new(self, :assistant_search_context, options).each do |page| |
| 34 | + yield page |
| 35 | + end |
| 36 | + else |
| 37 | + post('assistant.search.context', options) |
| 38 | + end |
| 39 | + end |
| 40 | + end |
| 41 | + end |
| 42 | + end |
| 43 | + end |
| 44 | +end |
0 commit comments