Module: Slack::Web::Api::Endpoints::AdminFunctionsPermissions

Included in:
Slack::Web::Api::Endpoints
Defined in:
lib/slack/web/api/endpoints/admin_functions_permissions.rb

Instance Method Summary collapse

Instance Method Details

#admin_functions_permissions_lookup(options = {}) ⇒ Object

Lookup the visibility of multiple Slack functions and include the users if it is limited to particular named entities.

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :function_ids (array)

    An array of function IDs to get permissions for.

Raises:

  • (ArgumentError)

See Also:



16
17
18
19
# File 'lib/slack/web/api/endpoints/admin_functions_permissions.rb', line 16

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

#admin_functions_permissions_set(options = {}) ⇒ Object

Set the visibility of a Slack function and define the users or workspaces if it is set to named_entities

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :function_id (string)

    The function ID to set permissions for.

  • :visibility (enum)

    The function visibility.

  • :user_ids (array)

    List of user IDs to allow for named_entities visibility.

Raises:

  • (ArgumentError)

See Also:



32
33
34
35
36
# File 'lib/slack/web/api/endpoints/admin_functions_permissions.rb', line 32

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