Module: Slack::Web::Api::Endpoints::AdminFunctions

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

Instance Method Summary collapse

Instance Method Details

#admin_functions_list(options = {}) ⇒ Object

Look up functions by a set of apps.

Parameters:

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

    a customizable set of options

Options Hash (options):

  • :team_id (Object)

    The team context to retrieve functions from.

  • :app_ids (array)

    Comma-separated array of app IDs to get functions for; max 50.

  • :include_non_distributed_functions (boolean)

    Whether to also include functions that are not yet distributed to any users in the function count. This is needed for admins that are approving an app request and will only work if the team owns the app.

  • :cursor (string)

    Set cursor to next_cursor returned by the previous call to list items in the next page.

  • :limit (integer)

    The number of results that will be returned by the API on each invocation. Must be between 1 and 1000, both inclusive.

Raises:

  • (ArgumentError)

See Also:



24
25
26
27
28
29
30
31
32
33
# File 'lib/slack/web/api/endpoints/admin_functions.rb', line 24

def admin_functions_list(options = {})
  raise ArgumentError, 'Required arguments :app_ids missing' if options[:app_ids].nil?
  if block_given?
    Pagination::Cursor.new(self, :admin_functions_list, options).each do |page|
      yield page
    end
  else
    post('admin.functions.list', options)
  end
end