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):

  • :app_ids (array)

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

  • :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.

  • :team_id (Object)

    The team context to retrieve functions from.

Raises:

  • (ArgumentError)

See Also:



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

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