Sha256: bf266b06823877da77f92ba2a1003804267d33d872a082ccffe06b465bcf7e19

Contents?: true

Size: 1.95 KB

Versions: 2

Compression:

Stored size: 1.95 KB

Contents

# frozen_string_literal: true
# This file was auto-generated by lib/tasks/web.rake

module Slack
  module Web
    module Api
      module Endpoints
        module AdminFunctionsPermissions
          #
          # Lookup the visibility of multiple Slack functions and include the users if it is limited to particular named entities.
          #
          # @option options [array] :function_ids
          #   An array of function IDs to get permissions for.
          # @see https://api.slack.com/methods/admin.functions.permissions.lookup
          # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.functions.permissions/admin.functions.permissions.lookup.json
          def admin_functions_permissions_lookup(options = {})
            raise ArgumentError, 'Required arguments :function_ids missing' if options[:function_ids].nil?
            post('admin.functions.permissions.lookup', options)
          end

          #
          # Set the visibility of a Slack function and define the users or workspaces if it is set to named_entities
          #
          # @option options [string] :function_id
          #   The function ID to set permissions for.
          # @option options [enum] :visibility
          #   The function visibility.
          # @option options [array] :user_ids
          #   List of user IDs to allow for named_entities visibility.
          # @see https://api.slack.com/methods/admin.functions.permissions.set
          # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.functions.permissions/admin.functions.permissions.set.json
          def admin_functions_permissions_set(options = {})
            raise ArgumentError, 'Required arguments :function_id missing' if options[:function_id].nil?
            raise ArgumentError, 'Required arguments :visibility missing' if options[:visibility].nil?
            post('admin.functions.permissions.set', options)
          end
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
slack-ruby-client-2.4.0 lib/slack/web/api/endpoints/admin_functions_permissions.rb
slack-ruby-client-2.3.0 lib/slack/web/api/endpoints/admin_functions_permissions.rb