Module: Slack::Web::Api::Endpoints::AdminInviterequests

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

Instance Method Summary collapse

Instance Method Details

#admin_inviteRequests_approve(options = {}) ⇒ Object

Approve a workspace invite request.

Parameters:

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

    a customizable set of options

Options Hash (options):

  • :invite_request_id (string)

    ID of the request to invite.

  • :team_id (string)

    ID for the workspace where the invite request was made.

Raises:

  • (ArgumentError)

See Also:



18
19
20
21
# File 'lib/slack/web/api/endpoints/admin_inviteRequests.rb', line 18

def admin_inviteRequests_approve(options = {})
  raise ArgumentError, 'Required arguments :invite_request_id missing' if options[:invite_request_id].nil?
  post('admin.inviteRequests.approve', options)
end

#admin_inviteRequests_deny(options = {}) ⇒ Object

Deny a workspace invite request.

Parameters:

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

    a customizable set of options

Options Hash (options):

  • :invite_request_id (string)

    ID of the request to invite.

  • :team_id (string)

    ID for the workspace where the invite request was made.

Raises:

  • (ArgumentError)

See Also:



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

def admin_inviteRequests_deny(options = {})
  raise ArgumentError, 'Required arguments :invite_request_id missing' if options[:invite_request_id].nil?
  post('admin.inviteRequests.deny', options)
end

#admin_inviteRequests_list(options = {}) ⇒ Object

List all pending workspace invite requests.

Parameters:

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

    a customizable set of options

Options Hash (options):

  • :cursor (string)

    Value of the next_cursor field sent as part of the previous API response.

  • :limit (integer)

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

  • :team_id (string)

    ID for the workspace where the invite requests were made.

See Also:



48
49
50
51
52
53
54
55
56
# File 'lib/slack/web/api/endpoints/admin_inviteRequests.rb', line 48

def admin_inviteRequests_list(options = {})
  if block_given?
    Pagination::Cursor.new(self, :admin_inviteRequests_list, options).each do |page|
      yield page
    end
  else
    post('admin.inviteRequests.list', options)
  end
end